test(ui): follow installed locale in admin pagination fixture
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import AxeBuilder from '@axe-core/playwright';
|
||||
import { expect, test as base, type APIRequestContext, type APIResponse, type Locator, type Page, type TestInfo } from '@playwright/test';
|
||||
import { translations } from '../src/i18n/translations';
|
||||
import { enUS, nbNO } from '@mui/x-data-grid/locales';
|
||||
|
||||
const apiUrl = 'http://localhost:5302/api';
|
||||
const password = 'E2ePassword123!';
|
||||
@@ -132,8 +133,9 @@ test('[P7-10 Users A01] finite bilingual light/dark widths retain long identitie
|
||||
if (sample.width>=768) {
|
||||
const grid=page.getByRole('grid');
|
||||
await expect(grid.getByRole('row').nth(1)).toBeVisible();
|
||||
const locale=(sample.language==='nb' ? nbNO : enUS).components.MuiDataGrid.defaultProps.localeText;
|
||||
while (!await page.getByText(email, { exact: true }).first().isVisible()) {
|
||||
const next=page.getByRole('button', { name: 'Go to next page', exact: true });
|
||||
const next=page.getByRole('button', { name: locale.paginationItemAriaLabel!('next'), exact: true });
|
||||
await expect(next).toBeEnabled();
|
||||
const before=await grid.getByRole('row').nth(1).innerText();
|
||||
await next.click();
|
||||
|
||||
Reference in New Issue
Block a user