mirror of
https://github.com/enso-org/enso.git
synced 2024-12-22 17:11:31 +03:00
6f7a51470d
- Implement https://github.com/enso-org/cloud-v2/issues/961 - Allow directory management on Local backend - Setting a custom root directory is currently *out of scope* of this PR. - Listing directories - Deleting directories and files - Adjust project-related APIs to accept parent directory path (as required by PM when not interacting with root directory) - QoL improvements related to testing this PR - New watch script (`npm run watch2`, `npm run watch:linux`) in `app/ide-desktop/lib/client/`) for testing IDE2 on Electron without having to build the entire app - Adjustments to `gui2`'s `vite.config.ts` to allow React HMR when doing dev in Electron # Important Notes - Support for deleting files and folders uses the API introduced by #9359 - so it will not work until that PR is merged in. - Support for uploading files uses the API specified by #9360 - so it will not work until that issue is closed.
37 lines
1.5 KiB
TypeScript
37 lines
1.5 KiB
TypeScript
/** @file Test the drive view. */
|
|
import * as test from '@playwright/test'
|
|
|
|
import * as actions from './actions'
|
|
|
|
test.test.beforeEach(actions.mockAllAndLogin)
|
|
|
|
test.test('drive view', async ({ page }) => {
|
|
const assetRows = actions.locateAssetRows(page)
|
|
|
|
// Drive view
|
|
await test.expect(actions.locateDriveView(page)).toBeVisible()
|
|
await actions.expectPlaceholderRow(page)
|
|
// Assets table with one asset
|
|
await actions.locateNewProjectButton(page).click()
|
|
await test.expect(actions.locateEditor(page)).toBeVisible()
|
|
await actions.locateDrivePageIcon(page).click()
|
|
// The placeholder row becomes hidden.
|
|
await test.expect(assetRows).toHaveCount(1)
|
|
await test.expect(actions.locateAssetsTable(page)).toBeVisible()
|
|
await actions.locateNewProjectButton(page).click()
|
|
await test.expect(assetRows).toHaveCount(2)
|
|
await test.expect(actions.locateEditor(page)).toBeVisible()
|
|
await actions.locateDrivePageIcon(page).click()
|
|
await test.expect(assetRows).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.
|
|
await actions.locateStopProjectButton(assetRows.nth(0)).click()
|
|
// Project context menu
|
|
await assetRows.nth(0).click({ button: 'right' })
|
|
const contextMenu = actions.locateContextMenus(page)
|
|
await test.expect(contextMenu).toBeVisible()
|
|
await actions.locateMoveToTrashButton(contextMenu).click()
|
|
await test.expect(assetRows).toHaveCount(1)
|
|
})
|