enso/app/ide-desktop/lib/dashboard/e2e/driveView.spec.ts
somebody1234 cf9d757457
Even more dashboard fixes (#10541)
- Fix https://github.com/enso-org/cloud-v2/issues/1383
- Fix file download - both on Electron, and in browser
- Refresh versions list when uploading neww file version
- Fix app crashing when asset is opened in asset panel while switching to Local Backend
- Don't show asset id when asset is opened in asset panel, but user is on the Local backend, resulting in the internal Asset ID being shown
- Fix drag-n-drop
- ⚠️ `npm run dev` is NOT fixed in this PR - however it should already be fixed in another PR which has already been merged. This needs testing to confirm whether it is fixed though.

Other changes:
- Add support for "duplicate project" endpoint on Local Backend
- Fix downloading project from nested directory on Local Backend (not working)
- Refactor more E2E tests to use the "new" architecture
- Simplify "new" E2E architecture to minimize boilerplate

# Important Notes
- When testing downloads, both Electron and browser should be tested as they use completely separate implementations for how files are downloaded.
2024-07-16 09:55:45 +00:00

45 lines
1.4 KiB
TypeScript

/** @file Test the drive view. */
import * as test from '@playwright/test'
import * as actions from './actions'
test.test('drive view', ({ page }) =>
actions
.mockAllAndLogin({ page })
.withDriveView(async view => {
await test.expect(view).toBeVisible()
})
.driveTable.expectPlaceholderRow()
.newEmptyProject()
.do(async () => {
await test.expect(actions.locateEditor(page)).toBeAttached()
})
.goToPage.drive()
.driveTable.withRows(async rows => {
await test.expect(rows).toHaveCount(1)
})
.do(async () => {
await test.expect(actions.locateAssetsTable(page)).toBeVisible()
})
.newEmptyProject()
.do(async () => {
await test.expect(actions.locateEditor(page)).toBeAttached()
})
.goToPage.drive()
.driveTable.withRows(async rows => {
await test.expect(rows).toHaveCount(2)
})
// The last opened project needs to be stopped, to remove the toast notification notifying the
// user that project creation may take a while. Previously opened projects are stopped when the
// new project is created.
.driveTable.withRows(async rows => {
await actions.locateStopProjectButton(rows.nth(0)).click()
})
// Project context menu
.driveTable.rightClickRow(0)
.contextMenu.moveToTrash()
.driveTable.withRows(async rows => {
await test.expect(rows).toHaveCount(1)
})
)