Improve the UI and tests
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { generateTestId } from '../helpers/utils';
|
||||
import { generateTestId, acceptCookieConsent } from '../helpers/utils';
|
||||
|
||||
test.describe('Add New Product/Recipe', () => {
|
||||
// Use authenticated state
|
||||
test.use({ storageState: 'tests/.auth/user.json' });
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Accept cookie consent if present
|
||||
await acceptCookieConsent(page);
|
||||
});
|
||||
|
||||
test('should open Add wizard from dashboard', async ({ page }) => {
|
||||
await page.goto('/app/dashboard');
|
||||
await acceptCookieConsent(page);
|
||||
|
||||
// Click unified Add button
|
||||
const addButton = page.getByRole('button', { name: /^add$|^añadir$|^\+$/i }).first();
|
||||
|
||||
Reference in New Issue
Block a user