Initial commit of the Playwright test framework, including: - Configuration files for Playwright, Docker, and Sauce Labs - Test case structure and page object models - CI/CD pipeline configuration - Utilities and business logic implementations This framework will be used for end-to-end testing of the FMG application.
23 lines
No EOL
944 B
TypeScript
23 lines
No EOL
944 B
TypeScript
import { type Locator, type Page } from '@playwright/test';
|
|
import { LookupPage } from './LookupPage';
|
|
|
|
export class VinLookupPage extends LookupPage {
|
|
readonly vinLookupTextBox: Locator;
|
|
readonly invalidVinInlineError: Locator;
|
|
readonly cameraButton: Locator;
|
|
readonly whereCanIFindMyVinLink: Locator;
|
|
|
|
url = process.env['BASE_URL']! + '/fmg/?fmgPage=vin-lookup';
|
|
|
|
constructor(page: Page) {
|
|
super(page);
|
|
this.vinLookupTextBox = page.getByRole('textbox', { name: 'Enter your VIN' });
|
|
this.invalidVinInlineError = this.page.locator('span.d-inline-flex.small.mt-1:has-text("Invalid VIN")');
|
|
this.cameraButton = this.page.getByRole('textbox', { name: 'Camera icon/button' });
|
|
this.whereCanIFindMyVinLink = this.page.getByRole('link', { name: 'Where can I find my VIN?', exact: true });
|
|
}
|
|
|
|
async enterVin(vin: string) {
|
|
await this.vinLookupTextBox.fill(vin);
|
|
}
|
|
} |