test: base playwrignt setup for firefox and chrome

This commit is contained in:
Ilia Mashkov
2026-05-28 12:55:10 +03:00
parent 05cab5f892
commit a9229342e6
6 changed files with 127 additions and 4 deletions
+16
View File
@@ -0,0 +1,16 @@
import type { Page } from '@playwright/test';
/**
* Shared base for all page objects. Subclasses extend this and expose
* domain-specific locators + actions — never raw selectors leaking into tests.
*/
export abstract class BasePage {
protected constructor(protected readonly page: Page) {}
/**
* Navigate to a path relative to baseURL.
*/
async goto(path = '/') {
await this.page.goto(path);
}
}