fix: add Accounting to sidebar nav + E2E spec (FIBEROPS-240)
This commit is contained in:
50
e2e/accounting.spec.ts
Normal file
50
e2e/accounting.spec.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { login } from './helpers/auth';
|
||||
|
||||
test.describe('Accounting', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await login(page);
|
||||
});
|
||||
|
||||
test('chart of accounts page loads', async ({ page }) => {
|
||||
await page.goto('/accounting');
|
||||
await page.waitForTimeout(3000);
|
||||
await expect(page.locator('h1').filter({ hasText: 'Accounting' }).first()).toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
|
||||
test('accounting sub-nav visible', async ({ page }) => {
|
||||
await page.goto('/accounting');
|
||||
await page.waitForTimeout(3000);
|
||||
await expect(page.locator('a').filter({ hasText: /Expenses/ }).first()).toBeVisible();
|
||||
});
|
||||
|
||||
test('journal entries page loads', async ({ page }) => {
|
||||
await page.goto('/accounting/journal-entries');
|
||||
await page.waitForTimeout(3000);
|
||||
await expect(page.locator('h1').filter({ hasText: 'Accounting' }).first()).toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
|
||||
test('expenses page loads', async ({ page }) => {
|
||||
await page.goto('/accounting/expenses');
|
||||
await page.waitForTimeout(3000);
|
||||
await expect(page.locator('h1').filter({ hasText: 'Accounting' }).first()).toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
|
||||
test('company accounts page loads', async ({ page }) => {
|
||||
await page.goto('/accounting/company-accounts');
|
||||
await page.waitForTimeout(3000);
|
||||
await expect(page.locator('h1').filter({ hasText: 'Accounting' }).first()).toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
|
||||
test('financial reports page loads', async ({ page }) => {
|
||||
await page.goto('/accounting/reports');
|
||||
await page.waitForTimeout(3000);
|
||||
await expect(page.locator('text=Trial Balance').first()).toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
|
||||
test('accounting link in sidebar', async ({ page }) => {
|
||||
await page.goto('/dashboard');
|
||||
await page.waitForTimeout(2000);
|
||||
await expect(page.locator('a[href="/accounting"]')).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user