mirror of
https://github.com/enso-org/enso.git
synced 2024-12-26 11:14:27 +03:00
ebf4cd5c1f
- Remove unnecessary modules - Remove `ts-plugin-namespace-auto-import` as it was a workaround to use the non-conventional `import *` convention - Remove `esbuild-plugin-copy-directories` as it is unuse - Inline modules that are only ever used once - Inline `project-manager-shim` into `gui2` - it is only used during `gui2`'s dev mode - Inline `content-config` into `client` - Flatten `app/ide-desktop/lib/` to `app/ide-desktop/` - Flatten `app/ide-desktop/lib/dashboard/` to `app/dashboard/` # Important Notes - As mentioned above, all remaining modules have been moved up from `app/ide-desktop/lib/` to `app/ide-desktop/`. It's not ideal but I'd rather hold off on moving them anywhere else before we have a consensus on what should go where. - (That is to say, this may not be the final directory structure - but I figure it's fine to get *something* done so that hopefully the rest of the restructuring is simpler.)
64 lines
1.8 KiB
TypeScript
64 lines
1.8 KiB
TypeScript
/** @file Test copying, moving, cutting and pasting. */
|
|
import * as test from '@playwright/test'
|
|
|
|
import * as actions from './actions'
|
|
|
|
// =================
|
|
// === Constants ===
|
|
// =================
|
|
|
|
/** The name of the uploaded file. */
|
|
const FILE_NAME = 'foo.txt'
|
|
/** The contents of the uploaded file. */
|
|
const FILE_CONTENTS = 'hello world'
|
|
/** The name of the created secret. */
|
|
const SECRET_NAME = 'a secret name'
|
|
/** The value of the created secret. */
|
|
const SECRET_VALUE = 'a secret value'
|
|
|
|
// =============
|
|
// === Tests ===
|
|
// =============
|
|
|
|
test.test('create folder', ({ page }) =>
|
|
actions
|
|
.mockAllAndLogin({ page })
|
|
.createFolder()
|
|
.driveTable.withRows(async rows => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
await test.expect(rows.nth(0)).toBeVisible()
|
|
await test.expect(rows.nth(0)).toHaveText(/^New Folder 1/)
|
|
})
|
|
)
|
|
|
|
test.test('create project', ({ page }) =>
|
|
actions
|
|
.mockAllAndLogin({ page })
|
|
.newEmptyProject()
|
|
.do(thePage => test.expect(actions.locateEditor(thePage)).toBeAttached())
|
|
.goToPage.drive()
|
|
.driveTable.withRows(rows => test.expect(rows).toHaveCount(1))
|
|
)
|
|
|
|
test.test('upload file', ({ page }) =>
|
|
actions
|
|
.mockAllAndLogin({ page })
|
|
.uploadFile(FILE_NAME, FILE_CONTENTS)
|
|
.driveTable.withRows(async rows => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
await test.expect(rows.nth(0)).toBeVisible()
|
|
await test.expect(rows.nth(0)).toHaveText(new RegExp('^' + FILE_NAME))
|
|
})
|
|
)
|
|
|
|
test.test('create secret', ({ page }) =>
|
|
actions
|
|
.mockAllAndLogin({ page })
|
|
.createSecret(SECRET_NAME, SECRET_VALUE)
|
|
.driveTable.withRows(async rows => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
await test.expect(rows.nth(0)).toBeVisible()
|
|
await test.expect(rows.nth(0)).toHaveText(new RegExp('^' + SECRET_NAME))
|
|
})
|
|
)
|