enso/app/dashboard/e2e/actions/SetupInvitePageActions.ts
somebody1234 f0d02de5c8
E2E tests for setup flow (#11148)
- Add E2E tests for setup flow
- Remove `styled.Checkbox` in favor of `ariaComponents.Checkbox`
- Remove `styled.Input` in favor of `ariaComponents.Input`
- Remove `styled.Button` in favor of `ariaComponents.Button`
- Rename unnecessary `Settings` prefix from components in `Settings/`

# Important Notes
None
2024-09-27 07:05:10 +00:00

27 lines
1010 B
TypeScript

/** @file Actions for the third step of the "setup" page. */
import { TEXT } from '../actions'
import BaseActions from './BaseActions'
import SetupTeamPageActions from './SetupTeamPageActions'
// ==============================
// === SetupInvitePageActions ===
// ==============================
/** Actions for the "invite users" step of the "setup" page. */
export default class SetupInvitePageActions extends BaseActions {
/** Invite users by email. */
inviteUsers(emails: string) {
return this.step(`Invite users '${emails.split(/[ ;,]+/).join("', '")}'`, async (page) => {
await page.getByLabel(TEXT.inviteEmailFieldLabel).getByRole('textbox').fill(emails)
await page.getByText(TEXT.inviteSubmit).click()
}).into(SetupTeamPageActions)
}
/** Continue to the next step without inviting users. */
skipInvitingUsers() {
return this.step('Skip inviting users in setup', async (page) => {
await page.getByText(TEXT.skip).click()
}).into(SetupTeamPageActions)
}
}