mirror of
https://github.com/enso-org/enso.git
synced 2024-12-21 13:11:41 +03:00
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
/** @file Test copying, moving, cutting and pasting. */
|
|
import * as test from '@playwright/test'
|
|
|
|
import * as actions from './actions'
|
|
|
|
test.test('delete and restore', ({ page }) =>
|
|
actions
|
|
.mockAllAndLogin({ page })
|
|
.createFolder()
|
|
.driveTable.withRows(async (rows) => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
})
|
|
.driveTable.rightClickRow(0)
|
|
.contextMenu.moveToTrash()
|
|
.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 }) =>
|
|
actions
|
|
.mockAllAndLogin({ page })
|
|
.createFolder()
|
|
.driveTable.withRows(async (rows) => {
|
|
await test.expect(rows).toHaveCount(1)
|
|
})
|
|
.driveTable.clickRow(0)
|
|
.press('Delete')
|
|
.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)
|
|
}),
|
|
)
|