Skip to content

Commit 6e3331f

Browse files
committed
test(workspace): cover unknown seat invite fallback
1 parent a912103 commit 6e3331f

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

e2e/ui/workspace-team-interactions.test.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ const TEAM_FULL: WorkspaceFixture = {
100100
const TEAM_UNKNOWN_SEATS: WorkspaceFixture = {
101101
...TEAM_OWNER,
102102
workspaceName: 'Seat state loading',
103-
// Deliberately model the pre-authority window. The production resolver must
104-
// not infer spare capacity from permissions alone.
103+
// Deliberately model the directory-only context, where invite permission is
104+
// known but seat capacity remains authoritative at invite submission time.
105105
seatSummary: undefined as never,
106106
};
107107

@@ -808,7 +808,7 @@ test('[P1] an already-open full team restores the local invite flow when a seat
808808
await expect.poll(() => inviteUrls(page)).toHaveLength(1);
809809
});
810810

811-
test('[P0] unknown team seat state fails closed across rail and project surfaces', async ({
811+
test('[P0] unknown team seat state keeps local invite available across rail and project surfaces', async ({
812812
page,
813813
}) => {
814814
await wireWorkspaceMocks(page, TEAM_UNKNOWN_SEATS, [TEAM_UNKNOWN_SEATS]);
@@ -823,12 +823,14 @@ test('[P0] unknown team seat state fails closed across rail and project surfaces
823823
await ensureRailOpen(page);
824824

825825
await page.getByTestId('workspace-switcher').click();
826-
await expect(
827-
page.getByRole('menu').getByRole('menuitem', { name: 'Invite colleague' }),
828-
).toHaveCount(0);
829-
await page.locator('.entry-nav-rail__menu-backdrop').click({ position: { x: 2, y: 2 } });
826+
await page.getByRole('menu').getByRole('menuitem', { name: 'Invite colleague' }).click();
827+
const dialog = page.getByRole('dialog', { name: 'Invite members' });
828+
await expect(dialog).toBeVisible();
829+
await dialog.getByRole('button', { name: 'Close' }).click();
830+
830831
await page.getByTestId('entry-nav-all-projects').click();
831-
await expect(page.getByRole('button', { name: 'Invite teammates' })).toHaveCount(0);
832+
await page.getByRole('button', { name: 'Invite teammates' }).click();
833+
await expect(dialog).toBeVisible();
832834
});
833835

834836
test('[P0] ordinary team member sees team projects but no invite or workspace-admin actions', async ({

0 commit comments

Comments
 (0)