mirror of
https://github.com/enso-org/enso.git
synced 2025-01-03 19:21:54 +03:00
b83c5a15eb
- Close https://github.com/enso-org/cloud-v2/issues/1604 - Add ability to track backend calls - Remove inconsistent integration test code - Add skeleton classes for settings pages # Important Notes None
57 lines
1.7 KiB
TypeScript
57 lines
1.7 KiB
TypeScript
/** @file Test copying, moving, cutting and pasting. */
|
|
import { expect, test } from '@playwright/test'
|
|
|
|
import { mockAllAndLogin, TEXT } from './actions'
|
|
|
|
test('delete and restore', ({ page }) =>
|
|
mockAllAndLogin({ page })
|
|
.createFolder()
|
|
.driveTable.withRows(async (rows) => {
|
|
await expect(rows).toHaveCount(1)
|
|
})
|
|
.driveTable.rightClickRow(0)
|
|
.contextMenu.moveFolderToTrash()
|
|
.driveTable.expectPlaceholderRow()
|
|
.goToCategory.trash()
|
|
.driveTable.withRows(async (rows) => {
|
|
await expect(rows).toHaveCount(1)
|
|
})
|
|
.driveTable.rightClickRow(0)
|
|
.contextMenu.restoreFromTrash()
|
|
.driveTable.expectTrashPlaceholderRow()
|
|
.goToCategory.cloud()
|
|
.expectStartModal()
|
|
.withStartModal(async (startModal) => {
|
|
await expect(startModal).toBeVisible()
|
|
})
|
|
.close()
|
|
.driveTable.withRows(async (rows) => {
|
|
await expect(rows).toHaveCount(1)
|
|
}))
|
|
|
|
test('delete and restore (keyboard)', ({ page }) =>
|
|
mockAllAndLogin({ page })
|
|
.createFolder()
|
|
.driveTable.withRows(async (rows) => {
|
|
await 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 expect(rows).toHaveCount(1)
|
|
})
|
|
.driveTable.clickRow(0)
|
|
.press('Mod+R')
|
|
.driveTable.expectTrashPlaceholderRow()
|
|
.goToCategory.cloud()
|
|
.expectStartModal()
|
|
.close()
|
|
.driveTable.withRows(async (rows) => {
|
|
await expect(rows).toHaveCount(1)
|
|
}))
|