enso/app/dashboard/e2e/pageSwitcher.spec.ts
somebody1234 1d0dfe17f8
Fix flaky dashboard E2E tests (#10773)
- Potentially fixes https://github.com/enso-org/enso/issues/10667
- Potentially fixes a similar issue with labels test failiing

# Important Notes
None
2024-08-12 12:55:49 +00:00

26 lines
882 B
TypeScript

/** @file Test the login flow. */
import * as test from '@playwright/test'
import * as actions from './actions'
test.test('page switcher', ({ page }) =>
actions
.mockAllAndLogin({ page })
// Create a new project so that the editor page can be switched to.
.newEmptyProject()
.do(async (thePage) => {
await test.expect(actions.locateDriveView(thePage)).not.toBeVisible()
await test.expect(actions.locateEditor(thePage)).toBeVisible()
})
.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()
}),
)