Skip to content

Commit

Permalink
Update admin tests to reflect new table layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenWeathers committed Apr 8, 2024
1 parent 2824bf1 commit 3585f8a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion e2e/tests/admin/alerts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test.describe("The Admin Alerts Page", () => {

await ap.goto();

const title = ap.page.locator("h1");
const title = ap.page.locator('[data-testid="tablenav-title"]');
await expect(title).toHaveText("Alerts");
});
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/admin/apikeys.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test.describe("The Admin API Keys Page", () => {

await ap.goto();

const title = ap.page.locator("h1");
const title = ap.page.locator('[data-testid="tablenav-title"]');
await expect(title).toHaveText("API Keys");
});
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/admin/organizations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test.describe("The Admin Organizations Page", () => {

await ap.goto();

const title = ap.page.locator("h1");
const title = ap.page.locator('[data-testid="tablenav-title"]');
await expect(title).toHaveText("Organizations");
});
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/admin/poker-games.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test.describe("The Admin Poker Games Page", () => {

await ap.goto();

const title = ap.page.locator("h1");
const title = ap.page.locator('[data-testid="tablenav-title"]');
await expect(title).toHaveText("Battles");
});
});
Expand Down
4 changes: 3 additions & 1 deletion e2e/tests/admin/team.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ test.describe("The Admin Team Page", () => {
const team = await registeredPage.createTeam(testTeamName);

await ap.goto(team.id);
await expect(ap.page.locator("h1")).toContainText(testTeamName);
await expect(
ap.page.locator('[data-testid="tablenav-title"]').nth(0),
).toContainText(testTeamName);
});
});
});
2 changes: 1 addition & 1 deletion e2e/tests/admin/teams.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test.describe("The Admin Teams Page", () => {

await ap.goto();

const title = ap.page.locator("h1");
const title = ap.page.locator('[data-testid="tablenav-title"]');
await expect(title).toHaveText("Teams");
});
});
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/admin/users.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ test.describe("The Admin Users Page", () => {

await ap.goto();

const title = ap.page.locator("h1");
await expect(title).toHaveText("Users");
const title = ap.page.locator('[data-testid="tablenav-title"]');
await expect(title).toHaveText("Registered Users");
});
});
});

0 comments on commit 3585f8a

Please sign in to comment.