8d47d8ae38
## Summary
- **Settings selector**: The Settings navigation item is now rendered as
a `<button>` (via `NavigationDrawerItem` with `onClick`) instead of an
`<a>` link (with `to`). Updated `leftMenu.ts` POM and
`create-kanban-view.spec.ts` to use `getByRole('button', { name:
'Settings' })`.
- **create-record URL field**: The Linkedin field interaction was
missing an initial label click to trigger the hover portal rendering.
Added `recordFieldList.getByText('Linkedin').first().click()` before the
value click, matching the pattern used by the working Emails field.
## Test plan
- [ ] E2E `signup_invite_email.spec.ts` passes (uses
`leftMenu.goToSettings()`)
- [ ] E2E `create-kanban-view.spec.ts` passes (uses Settings click
directly)
- [ ] E2E `create-record.spec.ts` passes (Linkedin URL field
interaction)
- [ ] Existing passing E2E tests remain green
Made with [Cursor](https://cursor.com)
59 lines
1.9 KiB
TypeScript
59 lines
1.9 KiB
TypeScript
import { randomUUID } from 'crypto';
|
|
import { expect, test } from './fixture';
|
|
|
|
test('Sign up with invite link via email', async ({
|
|
page,
|
|
loginPage,
|
|
leftMenu,
|
|
membersSection,
|
|
settingsPage,
|
|
profileSection,
|
|
confirmationModal,
|
|
}) => {
|
|
const email = `test${randomUUID().replaceAll('-', '')}@apple.dev`;
|
|
const firstName = 'John';
|
|
const lastName = 'Doe';
|
|
|
|
const inviteLink: string =
|
|
await test.step('Go to Settings and copy invite link', async () => {
|
|
await page.goto(process.env.LINK); // skip login page (and redirect) when running on environments with multi-workspace enabled
|
|
await leftMenu.goToSettings();
|
|
await settingsPage.goToMembersSection();
|
|
await membersSection.copyInviteLink();
|
|
return await page.evaluate('navigator.clipboard.readText()');
|
|
});
|
|
|
|
await test.step('Go to invite link', async () => {
|
|
await settingsPage.logout();
|
|
|
|
await Promise.all([
|
|
expect(page.getByText(/Join .+ team/)).toBeVisible(),
|
|
|
|
page.goto(inviteLink),
|
|
]);
|
|
});
|
|
|
|
await test.step('Create new account', async () => {
|
|
await loginPage.clickLoginWithEmail();
|
|
await loginPage.typeEmail(email);
|
|
await loginPage.clickContinueButton();
|
|
await loginPage.typePassword(process.env.DEFAULT_PASSWORD);
|
|
await loginPage.clickSignUpButton();
|
|
await loginPage.typeFirstName(firstName);
|
|
await loginPage.typeLastName(lastName);
|
|
await loginPage.clickContinueButton();
|
|
});
|
|
|
|
await test.step('Delete account from workspace', async () => {
|
|
await expect(page.getByRole('button', { name: 'Settings' })).toBeVisible();
|
|
await leftMenu.goToSettings();
|
|
await settingsPage.goToProfileSection();
|
|
await profileSection.deleteAccount();
|
|
await expect(page.getByText('Account Deletion')).toBeVisible();
|
|
await confirmationModal.typePlaceholderToInput();
|
|
await confirmationModal.clickConfirmButton();
|
|
|
|
await page.waitForURL('**/welcome');
|
|
});
|
|
});
|