2024-06-20 19:19:01 +03:00
|
|
|
/** @file Actions for the "editor" page. */
|
|
|
|
import * as goToPageActions from './goToPageActions'
|
2024-06-24 19:02:22 +03:00
|
|
|
import PageActions from './PageActions'
|
2024-06-20 19:19:01 +03:00
|
|
|
|
|
|
|
// =========================
|
|
|
|
// === EditorPageActions ===
|
|
|
|
// =========================
|
|
|
|
|
|
|
|
/** Actions for the "editor" page. */
|
2024-06-24 19:02:22 +03:00
|
|
|
export default class EditorPageActions extends PageActions {
|
2024-06-20 19:19:01 +03:00
|
|
|
/** Actions for navigating to another page. */
|
|
|
|
get goToPage(): Omit<goToPageActions.GoToPageActions, 'editor'> {
|
|
|
|
return goToPageActions.goToPageActions(this.step.bind(this))
|
|
|
|
}
|
2024-07-22 12:40:14 +03:00
|
|
|
/**
|
|
|
|
* Waits for the editor to load.
|
|
|
|
*/
|
|
|
|
waitForEditorToLoad(): EditorPageActions {
|
|
|
|
return this.step('wait for the editor to load', async () => {
|
|
|
|
await this.page.waitForSelector('[data-testid=editor]', { state: 'visible' })
|
|
|
|
})
|
|
|
|
}
|
2024-06-20 19:19:01 +03:00
|
|
|
}
|