first implementation
This commit is contained in:
parent
1eb4641ed9
commit
a56a4c076a
14 changed files with 898 additions and 729 deletions
|
|
@ -97,15 +97,20 @@ test.describe("Admin Invites Page", () => {
|
|||
await godfatherSelect.selectOption({ label: REGULAR_USER_EMAIL });
|
||||
await page.click('button:has-text("Create Invite")');
|
||||
|
||||
// Wait for the invite to appear
|
||||
await expect(page.locator("table")).toContainText("ready");
|
||||
// Wait for the new invite to appear and capture its code
|
||||
// The new invite should be the first row with godfather = REGULAR_USER_EMAIL and status = ready
|
||||
const newInviteRow = page.locator("tr").filter({ hasText: REGULAR_USER_EMAIL }).filter({ hasText: "ready" }).first();
|
||||
await expect(newInviteRow).toBeVisible();
|
||||
|
||||
// Click revoke on the first ready invite
|
||||
const revokeButton = page.locator('button:has-text("Revoke")').first();
|
||||
await revokeButton.click();
|
||||
// Get the invite code from this row (first cell)
|
||||
const inviteCode = await newInviteRow.locator("td").first().textContent();
|
||||
|
||||
// Verify the status changed to revoked
|
||||
await expect(page.locator("table")).toContainText("revoked");
|
||||
// Click revoke on this specific row
|
||||
await newInviteRow.locator('button:has-text("Revoke")').click();
|
||||
|
||||
// Verify this specific invite now shows "revoked"
|
||||
const revokedRow = page.locator("tr").filter({ hasText: inviteCode! });
|
||||
await expect(revokedRow).toContainText("revoked");
|
||||
});
|
||||
|
||||
test("status filter works", async ({ page }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue