test: Migrate Cypress E2E tests to Playwright (#18970)

This commit is contained in:
shortstacked
2025-09-02 10:16:32 +01:00
committed by GitHub
parent d183652c0d
commit 38de3ee8a4
17 changed files with 423 additions and 374 deletions

View File

@@ -16,4 +16,33 @@ export class SettingsPage extends BasePage {
async goToSettings() {
await this.page.goto('/settings');
}
async goToPersonalSettings() {
await this.page.goto('/settings/personal');
}
getPersonalDataForm() {
return this.page.getByTestId('personal-data-form');
}
getFirstNameField() {
return this.getPersonalDataForm().locator('input[name="firstName"]');
}
getLastNameField() {
return this.getPersonalDataForm().locator('input[name="lastName"]');
}
getSaveSettingsButton() {
return this.page.getByTestId('save-settings-button');
}
async fillPersonalData(firstName: string, lastName: string) {
await this.getFirstNameField().fill(firstName);
await this.getLastNameField().fill(lastName);
}
async saveSettings() {
await this.getSaveSettingsButton().click();
}
}