Expired links (#94)
1. Handle expired links on signup 2.Reject invitations when user is already a member 3. Make sure not to display errors due to Next.js redirection during team creation 4. Fix documentation sidebar
This commit is contained in:
committed by
GitHub
parent
ae9c33aea4
commit
97d2cf9f85
@@ -57,11 +57,15 @@ export class InvitationsPageObject {
|
||||
}
|
||||
|
||||
navigateToMembers() {
|
||||
return this.page
|
||||
.locator('a', {
|
||||
hasText: 'Members',
|
||||
})
|
||||
.click();
|
||||
return expect(async () => {
|
||||
await this.page
|
||||
.locator('a', {
|
||||
hasText: 'Members',
|
||||
})
|
||||
.click();
|
||||
|
||||
return expect(this.page.url()).toContain('members');
|
||||
}).toPass()
|
||||
}
|
||||
|
||||
async openInviteForm() {
|
||||
|
||||
@@ -60,6 +60,31 @@ test.describe('Invitations', () => {
|
||||
'Owner',
|
||||
);
|
||||
});
|
||||
|
||||
test('user cannot invite a member of the team again', async ({ page }) => {
|
||||
await invitations.navigateToMembers();
|
||||
|
||||
const email = invitations.auth.createRandomEmail();
|
||||
|
||||
const invites = [
|
||||
{
|
||||
email,
|
||||
role: 'member',
|
||||
},
|
||||
];
|
||||
|
||||
await invitations.openInviteForm();
|
||||
await invitations.inviteMembers(invites);
|
||||
|
||||
await expect(invitations.getInvitations()).toHaveCount(1);
|
||||
|
||||
// Try to invite the same member again
|
||||
// This should fail
|
||||
await invitations.openInviteForm();
|
||||
await invitations.inviteMembers(invites);
|
||||
await page.waitForTimeout(500);
|
||||
await expect(invitations.getInvitations()).toHaveCount(1);
|
||||
});
|
||||
});
|
||||
|
||||
test.describe('Full Invitation Flow', () => {
|
||||
|
||||
Reference in New Issue
Block a user