2024-01-31 14:35:41 +03:00
|
|
|
/** @file Test the login flow. */
|
|
|
|
import * as test from '@playwright/test'
|
|
|
|
|
|
|
|
import * as actions from './actions'
|
|
|
|
|
2024-06-20 19:19:01 +03:00
|
|
|
test.test('page switcher', ({ page }) =>
|
2024-07-16 12:55:45 +03:00
|
|
|
actions
|
|
|
|
.mockAllAndLogin({ page })
|
|
|
|
// Create a new project so that the editor page can be switched to.
|
|
|
|
.newEmptyProject()
|
|
|
|
.goToPage.drive()
|
|
|
|
.do(async thePage => {
|
|
|
|
await test.expect(actions.locateDriveView(thePage)).toBeVisible()
|
|
|
|
await test.expect(actions.locateEditor(thePage)).not.toBeVisible()
|
|
|
|
})
|
|
|
|
.goToPage.editor()
|
|
|
|
.do(async thePage => {
|
|
|
|
await test.expect(actions.locateDriveView(thePage)).not.toBeVisible()
|
|
|
|
await test.expect(actions.locateEditor(thePage)).toBeVisible()
|
|
|
|
})
|
2024-06-20 19:19:01 +03:00
|
|
|
)
|