2024-08-13 14:50:07 +03:00
|
|
|
/** @file Actions for the "setup" page. */
|
2024-06-20 19:19:01 +03:00
|
|
|
import * as actions from '../actions'
|
|
|
|
import BaseActions from './BaseActions'
|
|
|
|
import DrivePageActions from './DrivePageActions'
|
|
|
|
|
|
|
|
// ==============================
|
|
|
|
// === SetUsernamePageActions ===
|
|
|
|
// ==============================
|
|
|
|
|
|
|
|
/** Actions for the "set username" page. */
|
2024-08-13 14:50:07 +03:00
|
|
|
export default class SetupPageActions extends BaseActions {
|
2024-06-20 19:19:01 +03:00
|
|
|
/** 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)
|
|
|
|
}
|
|
|
|
}
|