Skip to content

Commit

Permalink
fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fhennig committed Nov 5, 2024
1 parent 49c98f5 commit 00cc739
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions website/tests/pages/review/review.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export class ReviewPage {
public readonly approveAllButton: Locator;
public readonly deleteFirstButton: Locator;
public readonly deleteAllButton: Locator;
public readonly confirmButton: Locator;
public readonly confirmReleaseButton: Locator;
public readonly confirmDeleteButton: Locator;

constructor(public readonly page: Page) {
this.approveAllButton = page.getByRole('button', { name: 'Release', exact: false });
Expand All @@ -21,7 +22,8 @@ export class ReviewPage {
exact: false,
});

this.confirmButton = page.getByRole('button', { name: 'Confirm', exact: false });
this.confirmReleaseButton = page.getByRole('button', { name: 'Release', exact: true });
this.confirmDeleteButton = page.getByRole('button', { name: 'Discard', exact: true });
}

public async goto(groupId: number) {
Expand Down Expand Up @@ -81,15 +83,15 @@ export class ReviewPage {
public async approveAll() {
await expect(this.approveAllButton).toBeVisible();
await this.approveAllButton.click();
await expect(this.confirmButton).toBeVisible();
await this.confirmButton.click();
await expect(this.confirmReleaseButton).toBeVisible();
await this.confirmReleaseButton.click();
}

public async deleteAll() {
await expect(this.deleteFirstButton).toBeVisible();
await this.deleteFirstButton.click();
await this.deleteAllButton.click();
await expect(this.confirmButton).toBeVisible();
await this.confirmButton.click();
await expect(this.confirmDeleteButton).toBeVisible();
await this.confirmDeleteButton.click();
}
}

0 comments on commit 00cc739

Please sign in to comment.