mirror of
https://github.com/enso-org/enso.git
synced 2024-12-30 07:01:38 +03:00
736134e491
Fixes #11604 Most issues were caused by a problem with Project List flooding the network with its requests - this was fixed on develop. But one assertion was flaky - it assumed we will see the "real" run result on `write` node, but sometimes it is immediately overwritten by dry run. But the most important part of this PR is adding traces to Electron packages - it's should be much easier now to debug E2E test failures. Also renamed the previously misnamed "E2E tests" to "[GUI] integration tests".
52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
/** @file Test copying, moving, cutting and pasting. */
|
|
import * as test from '@playwright/test'
|
|
|
|
import { mockAllAndLogin, TEXT } from './actions'
|
|
|
|
test.test('delete and restore', ({ page }) =>
|
|
mockAllAndLogin({ page })
|
|
.createFolder()
|
|
.driveTable.withRows(async (rows) => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
})
|
|
.driveTable.rightClickRow(0)
|
|
.contextMenu.moveFolderToTrash()
|
|
.driveTable.expectPlaceholderRow()
|
|
.goToCategory.trash()
|
|
.driveTable.withRows(async (rows) => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
})
|
|
.driveTable.rightClickRow(0)
|
|
.contextMenu.restoreFromTrash()
|
|
.driveTable.expectTrashPlaceholderRow()
|
|
.goToCategory.cloud()
|
|
.driveTable.withRows(async (rows) => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
}),
|
|
)
|
|
|
|
test.test('delete and restore (keyboard)', ({ page }) =>
|
|
mockAllAndLogin({ page })
|
|
.createFolder()
|
|
.driveTable.withRows(async (rows) => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
})
|
|
.driveTable.clickRow(0)
|
|
.press('Delete')
|
|
.do(async (thePage) => {
|
|
await thePage.getByRole('button', { name: TEXT.delete }).getByText(TEXT.delete).click()
|
|
})
|
|
.driveTable.expectPlaceholderRow()
|
|
.goToCategory.trash()
|
|
.driveTable.withRows(async (rows) => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
})
|
|
.driveTable.clickRow(0)
|
|
.press('Mod+R')
|
|
.driveTable.expectTrashPlaceholderRow()
|
|
.goToCategory.cloud()
|
|
.driveTable.withRows(async (rows) => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
}),
|
|
)
|