🚨(e2e) upgrade eslint to v9 with e2e app
We upgraded ESLint to version 9 in the e2e app, which includes several improvements and fixes. This change also involves updating the ESLint configuration files to the new format and ensuring compatibility with the latest ESLint features.
This commit is contained in:
@@ -5,14 +5,19 @@ import { keyCloakSignIn } from './utils-common';
|
||||
const saveStorageState = async (
|
||||
browserConfig: FullProject<unknown, unknown>,
|
||||
) => {
|
||||
const browserName = browserConfig?.name || 'chromium';
|
||||
if (!browserConfig) {
|
||||
throw new Error('No browser config found');
|
||||
}
|
||||
|
||||
const { storageState, ...useConfig } = browserConfig?.use;
|
||||
const browserName = browserConfig.name || 'chromium';
|
||||
|
||||
const { storageState, ...useConfig } = browserConfig.use;
|
||||
const browser = await chromium.launch();
|
||||
const context = await browser.newContext(useConfig);
|
||||
const page = await context.newPage();
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line playwright/no-networkidle
|
||||
await page.goto('/', { waitUntil: 'networkidle' });
|
||||
await page.content();
|
||||
await expect(page.getByText('Docs').first()).toBeVisible();
|
||||
@@ -45,11 +50,9 @@ const saveStorageState = async (
|
||||
};
|
||||
|
||||
async function globalSetup(config: FullConfig) {
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
const chromeConfig = config.projects.find((p) => p.name === 'chromium')!;
|
||||
const firefoxConfig = config.projects.find((p) => p.name === 'firefox')!;
|
||||
const webkitConfig = config.projects.find((p) => p.name === 'webkit')!;
|
||||
/* eslint-enable @typescript-eslint/no-non-null-assertion */
|
||||
|
||||
await saveStorageState(chromeConfig);
|
||||
await saveStorageState(webkitConfig);
|
||||
|
||||
Reference in New Issue
Block a user