enso/app/dashboard/e2e/actions/SetupPageActions.ts
somebody1234 0fc09f8723
Show errors in forms in authentication flow (#10739)
- Fix https://github.com/enso-org/cloud-v2/issues/1422
- Show errors on "login" page by switching to custom Form component
- Also convert "registration", "reset password" and "forgot password" pages to use the new component
- Preserve email when navigating between auth pages

# Important Notes
None
2024-08-13 11:50:07 +00:00

20 lines
715 B
TypeScript

/** @file Actions for the "setup" page. */
import * as actions from '../actions'
import BaseActions from './BaseActions'
import DrivePageActions from './DrivePageActions'
// ==============================
// === SetUsernamePageActions ===
// ==============================
/** Actions for the "set username" page. */
export default class SetupPageActions extends BaseActions {
/** Set the userame for a new user that does not yet have a username. */
setUsername(username: string) {
return this.step(`Set username to '${username}'`, async (page) => {
await actions.locateUsernameInput(page).fill(username)
await actions.locateSetUsernameButton(page).click()
}).into(DrivePageActions)
}
}