feat: plantilla base workspace SaaS
This commit is contained in:
108
frontend/e2e/modules.spec.ts
Normal file
108
frontend/e2e/modules.spec.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import { test, expect } from '@playwright/test'
|
||||
|
||||
test.describe('Modulos', () => {
|
||||
|
||||
test.describe('Import Invoices', () => {
|
||||
|
||||
test('factura TEM carga sin error', async ({ page }) => {
|
||||
await page.goto('/dashboard/invoices?operation_type=imp&invoice_type=TEM')
|
||||
await expect(page).toHaveURL(/invoices/)
|
||||
await expect(page.locator('main')).toBeVisible()
|
||||
})
|
||||
|
||||
test('factura DEF carga sin error', async ({ page }) => {
|
||||
await page.goto('/dashboard/invoices?operation_type=imp&invoice_type=DEF')
|
||||
await expect(page).toHaveURL(/invoices/)
|
||||
await expect(page.locator('main')).toBeVisible()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
test.describe('Export Invoices', () => {
|
||||
|
||||
test('exportacion carga sin error', async ({ page }) => {
|
||||
await page.goto('/dashboard/invoices?operation_type=exp')
|
||||
await expect(page).toHaveURL(/invoices/)
|
||||
await expect(page.locator('main')).toBeVisible()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
test.describe('Fixed Catalogs', () => {
|
||||
|
||||
test('carga sin error', async ({ page }) => {
|
||||
await page.goto('/dashboard/reference_data/code_pedimento_regimens')
|
||||
await expect(page).toHaveURL(/reference_data/)
|
||||
await expect(page.locator('main')).toBeVisible()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
test.describe('General Catalogs', () => {
|
||||
|
||||
test('company information carga sin error', async ({ page }) => {
|
||||
await page.goto('/dashboard/general_catalogs/company_information')
|
||||
await expect(page).toHaveURL(/company_information/)
|
||||
await expect(page.locator('main')).toBeVisible()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
test.describe('Transportes', () => {
|
||||
|
||||
test('transporters carga sin error', async ({ page }) => {
|
||||
await page.goto('/dashboard/general_catalogs/transporters')
|
||||
await expect(page).toHaveURL(/transporters/)
|
||||
await expect(page.locator('main')).toBeVisible()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
test.describe('Goods', () => {
|
||||
|
||||
test('fixed asset classes carga sin error', async ({ page }) => {
|
||||
await page.goto('/dashboard/goods/fixed-asset-classes')
|
||||
await expect(page).toHaveURL(/goods/)
|
||||
await expect(page.locator('main')).toBeVisible()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
test.describe('Settings', () => {
|
||||
|
||||
test('general carga sin error', async ({ page }) => {
|
||||
await page.goto('/dashboard/settings/general')
|
||||
await expect(page).toHaveURL(/settings/)
|
||||
await expect(page.locator('body')).toBeVisible()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
test.describe('Reportes', () => {
|
||||
|
||||
test('invoices carga sin error', async ({ page }) => {
|
||||
await page.goto('/dashboard/reports/invoices')
|
||||
await expect(page).toHaveURL(/reports/)
|
||||
await expect(page.locator('main')).toBeVisible()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
test.describe('Logout', () => {
|
||||
|
||||
test('cerrar sesion redirige a login', async ({ page }) => {
|
||||
await page.goto('/dashboard')
|
||||
await page.waitForLoadState('networkidle')
|
||||
// Abrir el dropdown del usuario; el trigger es un Sidebar.MenuButton que
|
||||
// puede no responder al click central → forzar con teclado.
|
||||
const userBtn = page.getByRole('button').filter({ hasText: '@' }).first()
|
||||
await userBtn.focus()
|
||||
await page.keyboard.press('Enter')
|
||||
// El menú está parcialmente en inglés ("Log out").
|
||||
await page.getByRole('menuitem', { name: /Log out|Cerrar sesión/i }).click({ timeout: 10000 })
|
||||
await expect(page).toHaveURL(/(login|workspace\.aduanasoft\.com)/, { timeout: 15000 })
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user