2024-01-31 14:35:41 +03:00
|
|
|
/** @file Test the drive view. */
|
|
|
|
import * as test from '@playwright/test'
|
|
|
|
|
|
|
|
import * as actions from './actions'
|
|
|
|
|
2024-06-20 19:19:01 +03:00
|
|
|
test.test('drive view', ({ page }) =>
|
2024-07-16 12:55:45 +03:00
|
|
|
actions
|
|
|
|
.mockAllAndLogin({ page })
|
|
|
|
.withDriveView(async (view) => {
|
|
|
|
await test.expect(view).toBeVisible()
|
|
|
|
})
|
|
|
|
.driveTable.expectPlaceholderRow()
|
|
|
|
.newEmptyProject()
|
|
|
|
.do(async () => {
|
|
|
|
await test.expect(actions.locateEditor(page)).toBeAttached()
|
|
|
|
})
|
|
|
|
.goToPage.drive()
|
|
|
|
.driveTable.withRows(async (rows) => {
|
|
|
|
await test.expect(rows).toHaveCount(1)
|
|
|
|
})
|
|
|
|
.do(async () => {
|
|
|
|
await test.expect(actions.locateAssetsTable(page)).toBeVisible()
|
|
|
|
})
|
|
|
|
.newEmptyProject()
|
|
|
|
.do(async () => {
|
|
|
|
await test.expect(actions.locateEditor(page)).toBeAttached()
|
|
|
|
})
|
|
|
|
.goToPage.drive()
|
|
|
|
.driveTable.withRows(async (rows) => {
|
|
|
|
await test.expect(rows).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.
|
|
|
|
.driveTable.withRows(async (rows) => {
|
2024-09-04 19:22:50 +03:00
|
|
|
await actions.locateStopProjectButton(rows.nth(1)).click()
|
2024-07-16 12:55:45 +03:00
|
|
|
})
|
2024-07-09 17:47:46 +03:00
|
|
|
// Project context menu
|
2024-07-16 12:55:45 +03:00
|
|
|
.driveTable.rightClickRow(0)
|
2024-09-16 12:03:49 +03:00
|
|
|
.contextMenu.moveNonFolderToTrash()
|
2024-07-16 12:55:45 +03:00
|
|
|
.driveTable.withRows(async (rows) => {
|
|
|
|
await test.expect(rows).toHaveCount(1)
|
|
|
|
}),
|
2024-06-20 19:19:01 +03:00
|
|
|
)
|