- Raise use-swipe-gesture mutation score to 66.13% (target 65%+) - Maintain use-reduced-motion mutation score at 76.32% (target 50%+) - Fix use-reduced-motion.ts ESLint set-state-in-effect warning - Add UJ-10 deep searcher journey (category browse → article read → content discovery) - Add 40 new test files (analytics, detail, sections, ui, lib components) - Update test-strategy-plan.md to v2.0 (sync test count to 1591) - Sync README.md with final release metrics Quality gates: TS 0 errors, ESLint 0 errors, 121 suites / 1591 tests passed
68 lines
2.2 KiB
TypeScript
68 lines
2.2 KiB
TypeScript
// @ts-nocheck
|
|
import { test as base } from '@playwright/test';
|
|
import { BasePage, HomePage, AboutPage, ContactPage, ProductsPage, ServicesPage, CasesPage, NewsPage } from '../pages';
|
|
import { getEnvironmentConfig } from '../config/environments';
|
|
import { TestConfig as CustomTestConfig } from '../types';
|
|
|
|
type MyFixtures = {
|
|
basePage: BasePage;
|
|
homePage: HomePage;
|
|
aboutPage: AboutPage;
|
|
contactPage: ContactPage;
|
|
productsPage: ProductsPage;
|
|
servicesPage: ServicesPage;
|
|
casesPage: CasesPage;
|
|
newsPage: NewsPage;
|
|
config: CustomTestConfig;
|
|
};
|
|
|
|
export const test = base.extend<MyFixtures>({
|
|
config: async ({}, use: (value: CustomTestConfig) => Promise<void>) => {
|
|
const env = process.env.TEST_ENV || 'development';
|
|
const config = getEnvironmentConfig(env);
|
|
await use(config);
|
|
},
|
|
|
|
basePage: async ({ page }, use: (value: BasePage) => Promise<void>) => {
|
|
const basePage = new BasePage(page, '/');
|
|
await use(basePage);
|
|
},
|
|
|
|
homePage: async ({ page, config }, use: (value: HomePage) => Promise<void>) => {
|
|
const homePage = new HomePage(page, config);
|
|
await use(homePage);
|
|
},
|
|
|
|
aboutPage: async ({ page, config }, use: (value: AboutPage) => Promise<void>) => {
|
|
const aboutPage = new AboutPage(page, config);
|
|
await use(aboutPage);
|
|
},
|
|
|
|
contactPage: async ({ page, config }, use: (value: ContactPage) => Promise<void>) => {
|
|
const contactPage = new ContactPage(page, config);
|
|
await use(contactPage);
|
|
},
|
|
|
|
productsPage: async ({ page, config }, use: (value: ProductsPage) => Promise<void>) => {
|
|
const productsPage = new ProductsPage(page, config);
|
|
await use(productsPage);
|
|
},
|
|
|
|
servicesPage: async ({ page, config }, use: (value: ServicesPage) => Promise<void>) => {
|
|
const servicesPage = new ServicesPage(page, config);
|
|
await use(servicesPage);
|
|
},
|
|
|
|
casesPage: async ({ page, config }, use: (value: CasesPage) => Promise<void>) => {
|
|
const casesPage = new CasesPage(page, config);
|
|
await use(casesPage);
|
|
},
|
|
|
|
newsPage: async ({ page, config }, use: (value: NewsPage) => Promise<void>) => {
|
|
const newsPage = new NewsPage(page, config);
|
|
await use(newsPage);
|
|
}
|
|
});
|
|
|
|
export { expect } from '@playwright/test';
|