test: base playwrignt setup for firefox and chrome
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user