[AAE-10766] upgrade to new About component (#2769)

* [AAE-10766] upgrade to new About component

* upgrade to latest ADF alpha

* update e2e to reflect snackbar changes

* Revert "update e2e to reflect snackbar changes"

This reverts commit 6164804bab.

* ACS-3640 a 11 y aca 881740 snackbar messages disappear without option to adjust timing (#2734)

* ACS-3640 Increasing time of autoclosing snackbar and adding X icon to close snackbar

* ACS-3640 Fix lint issues

* ACS-3640 Addressing PR comments

* ACS-3640 Fix lint issue

* ACS-3640 Added aria label for action icon

* ACS-3640 Fixed one left file

* ACS-3640 Fixed lint issues

* use latest adf

* ACS-3640 Correction for e2e

Co-authored-by: Denys Vuika <denys.vuika@gmail.com>

* remove the action check from the snackbar

* update e2e

* update e2e

* update e2e

* Update e2e

Co-authored-by: AleksanderSklorz <115619721+AleksanderSklorz@users.noreply.github.com>
Co-authored-by: Aleksander Sklorz <Aleksander.Sklorz@hyland.com>
This commit is contained in:
Denys Vuika
2022-11-14 23:55:06 +00:00
committed by GitHub
co-authored by Denys Vuika AleksanderSklorz Aleksander Sklorz
parent bc4905631b
commit 5ce4835e4c
13 changed files with 418 additions and 140 deletions
+48 -12
View File
@@ -485,9 +485,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await copyDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileName)).toBe(true, `${fileName} not present in source folder`);
@@ -505,9 +508,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await copyDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(folderName)).toBe(true, `${folderName} not present in source folder`);
@@ -529,9 +535,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 2 items');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await copyDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(items[0])).toBe(true, `${items[0]} not present in source folder`);
@@ -551,9 +560,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await copyDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileName)).toBe(true, `${fileName}.txt not present in source folder`);
@@ -571,9 +583,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await copyDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(folderName)).toBe(true, `${folderName} not present in source folder`);
@@ -597,9 +612,12 @@ describe('Copy content', () => {
await copyDialog.dataTable.doubleClickOnRowByName('documentLibrary');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain(`Copied ${noOfItems} ${noOfItems === 1 ? 'item' : 'items'}`);
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await copyDialog.waitForDialogToClose();
for (const item of items) {
@@ -625,9 +643,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await copyDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(fileName)).toBe(true, `${fileName} not present in source folder`);
@@ -648,9 +669,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await copyDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(folderName)).toBe(true, `${folderName} not present in source folder`);
@@ -679,9 +703,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await page.clickSnackBarAction();
@@ -702,9 +729,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await page.clickSnackBarAction();
@@ -727,9 +757,12 @@ describe('Copy content', () => {
await copyDialog.dataTable.doubleClickOnRowByName(source);
await copyDialog.selectDestination(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await page.clickSnackBarAction();
@@ -753,9 +786,12 @@ describe('Copy content', () => {
await copyDialog.selectLocation('Personal Files');
await copyDialog.dataTable.doubleClickOnRowByName(destination);
await BrowserActions.click(copyDialog.copyButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Copied 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await page.clickSnackBarAction();
+78 -20
View File
@@ -162,9 +162,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationPF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file1)).toBe(false, `${file1} still present in source folder`);
@@ -180,9 +183,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationPF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(folder1)).toBe(false, `${folder1} still present in source folder`);
@@ -202,9 +208,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationPF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 2 items');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file2)).toBe(false, `${file2} still present in source folder`);
@@ -222,9 +231,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationPF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Move unsuccessful, a file with the same name already exists');
expect(msg).not.toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).not.toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(`${existingFile}.txt`)).toBe(true, `${existingFile}.txt not present in source folder`);
@@ -241,9 +253,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationPF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(existingFolder)).toBe(false, `${existingFolder} still present in source folder`);
@@ -266,9 +281,12 @@ describe('Move content', () => {
await moveDialog.dataTable.doubleClickOnRowByName('documentLibrary');
await moveDialog.selectDestination(folderSitePF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 2 items');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file4)).toBe(false, `${file4} still present in source folder`);
@@ -317,9 +335,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationRF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file1, destinationRF)).toBe(true, `${file1} from ${destinationRF} not present`);
@@ -336,9 +357,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationRF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 2 items');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file2, destinationRF)).toBe(true, `${file2} from ${destinationRF} not present`);
@@ -358,9 +382,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationRF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Move unsuccessful, a file with the same name already exists');
expect(msg).not.toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).not.toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(existingFile, sourceRF)).toBe(true, `${existingFile} from ${sourceRF} not present`);
@@ -380,9 +407,12 @@ describe('Move content', () => {
await moveDialog.dataTable.doubleClickOnRowByName('documentLibrary');
await moveDialog.selectDestination(folderSiteRF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file4, folderSiteRF)).toBe(true, `${file4} from ${folderSiteRF} not present`);
@@ -441,9 +471,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationSF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file1, destinationSF)).toBe(true, `${file1} from ${destinationSF} not present`);
@@ -460,9 +493,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationSF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 2 items');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file2, destinationSF)).toBe(true, `${file2} from ${destinationSF} not present`);
@@ -482,9 +518,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationSF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Move unsuccessful, a file with the same name already exists');
expect(msg).not.toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).not.toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(existingFile, sourceSF)).toBe(true, `${existingFile} from ${sourceSF} not present`);
@@ -504,9 +543,12 @@ describe('Move content', () => {
await moveDialog.dataTable.doubleClickOnRowByName('documentLibrary');
await moveDialog.selectDestination(folderSiteSF);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file4, folderSiteSF)).toBe(true, `${file4} from ${folderSiteSF} not present`);
@@ -591,9 +633,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationFav);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file1, destinationFav)).toBe(true, `${file1} from ${destinationFav} not present`);
@@ -610,9 +655,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationFav);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(folder1, sourceFav)).toBe(false, `${folder1} from ${sourceFav} is present`);
@@ -633,9 +681,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationFav);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 2 items');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file2, destinationFav)).toBe(true, `${file2} from ${destinationFav} not present`);
@@ -655,9 +706,12 @@ describe('Move content', () => {
await moveDialog.selectLocation('Personal Files');
await moveDialog.selectDestination(destinationFav);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Move unsuccessful, a file with the same name already exists');
expect(msg).not.toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).not.toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(existingFile, sourceFav)).toBe(true, `${existingFile} from ${sourceFav} not present`);
@@ -677,7 +731,8 @@ describe('Move content', () => {
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 1 item');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(existingFolder, sourceFav)).toBe(false, `${existingFolder} from ${sourceFav} is present`);
@@ -699,9 +754,12 @@ describe('Move content', () => {
await moveDialog.dataTable.doubleClickOnRowByName('documentLibrary');
await moveDialog.selectDestination(folderSiteFav);
await BrowserActions.click(moveDialog.moveButton);
const msg = await page.getSnackBarMessage();
expect(msg).toContain('Moved 2 items');
expect(msg).toContain('Undo');
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
await moveDialog.waitForDialogToClose();
expect(await dataTable.isItemPresent(file4, folderSiteFav)).toBe(true, `${file4} from ${folderSiteFav} not present`);
@@ -96,9 +96,13 @@ describe('Delete and undo delete', () => {
it('[C280528] delete a file and check notification', async () => {
await dataTable.selectItem(recentFile1, parent);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`${recentFile1} deleted`);
expect(message).toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
expect(await dataTable.isItemPresent(recentFile1)).toBe(false, `${recentFile1} was not removed from list`);
await page.clickTrashAndWait();
expect(await dataTable.isItemPresent(recentFile1)).toBe(true, `${recentFile1} is not in trash`);
@@ -107,9 +111,13 @@ describe('Delete and undo delete', () => {
it('[C280529] delete multiple files and check notification', async () => {
await dataTable.selectMultipleItems([recentFile2, recentFile3], parent);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`Deleted 2 items`);
expect(message).toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
expect(await dataTable.isItemPresent(recentFile2)).toBe(false, `${recentFile2} was not removed from list`);
expect(await dataTable.isItemPresent(recentFile3)).toBe(false, `${recentFile3} was not removed from list`);
await page.clickTrashAndWait();
@@ -236,9 +244,13 @@ describe('Delete and undo delete', () => {
let items = await page.dataTable.getRowsCount();
await dataTable.selectItem(file1);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`${file1} deleted`);
expect(message).toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
expect(await dataTable.isItemPresent(file1)).toBe(false, `${file1} was not removed from list`);
items--;
expect(await page.pagination.getRange()).toContain(`1-${items} of ${items}`);
@@ -276,9 +288,13 @@ describe('Delete and undo delete', () => {
it('[C217127] delete a folder containing locked files', async () => {
await dataTable.selectItem(folder2);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`${folder2} couldn't be deleted`);
expect(message).not.toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).not.toContain('Undo');
expect(await dataTable.isItemPresent(folder2)).toBe(true, `${folder2} was removed from list`);
await page.clickTrash();
expect(await dataTable.isItemPresent(folder2)).toBe(false, `${folder2} is in trash`);
@@ -288,17 +304,23 @@ describe('Delete and undo delete', () => {
it('[C217129] notification on multiple items deletion - some items fail to delete', async () => {
await dataTable.selectMultipleItems([file4, folder3]);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`Deleted 1 item, 1 couldn't be deleted`);
expect(message).toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
});
it('[C217130] notification on multiple items deletion - all items fail to delete', async () => {
await dataTable.selectMultipleItems([folder4, folder5]);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toEqual(`2 items couldn't be deleted`);
expect(message).not.toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).not.toContain('Undo');
});
it('[C217132] undo delete of file', async () => {
@@ -388,9 +410,13 @@ describe('Delete and undo delete', () => {
it('[C280316] delete a file and check notification', async () => {
await dataTable.selectItem(sharedFile1);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`${sharedFile1} deleted`);
expect(message).toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
expect(await dataTable.isItemPresent(sharedFile1)).toBe(false, `${sharedFile1} was not removed from list`);
await page.clickTrashAndWait();
expect(await dataTable.isItemPresent(sharedFile1)).toBe(true, `${sharedFile1} is not in trash`);
@@ -399,9 +425,13 @@ describe('Delete and undo delete', () => {
it('[C280513] delete multiple files and check notification', async () => {
await dataTable.selectMultipleItems([sharedFile2, sharedFile3]);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`Deleted 2 items`);
expect(message).toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
expect(await dataTable.isItemPresent(sharedFile2)).toBe(false, `${sharedFile2} was not removed from list`);
expect(await dataTable.isItemPresent(sharedFile3)).toBe(false, `${sharedFile3} was not removed from list`);
await page.clickTrashAndWait();
@@ -534,9 +564,13 @@ describe('Delete and undo delete', () => {
it('[C280516] delete a file and check notification', async () => {
await dataTable.selectItem(favFile1);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`${favFile1} deleted`);
expect(message).toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
expect(await dataTable.isItemPresent(favFile1)).toBe(false, `${favFile1} was not removed from list`);
await page.clickTrashAndWait();
expect(await dataTable.isItemPresent(favFile1)).toBe(true, `${favFile1} is not in trash`);
@@ -545,9 +579,13 @@ describe('Delete and undo delete', () => {
it('[C280517] delete multiple files and check notification', async () => {
await dataTable.selectMultipleItems([favFile2, favFile3], parent);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`Deleted 2 items`);
expect(message).toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
expect(await dataTable.isItemPresent(favFile2)).toBe(false, `${favFile2} was not removed from list`);
expect(await dataTable.isItemPresent(favFile3)).toBe(false, `${favFile3} was not removed from list`);
await page.clickTrashAndWait();
@@ -579,17 +617,23 @@ describe('Delete and undo delete', () => {
it('[C280520] notification on multiple items deletion - some items fail to delete', async () => {
await dataTable.selectMultipleItems([favFile4, favFolder3], parent);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toContain(`Deleted 1 item, 1 couldn't be deleted`);
expect(message).toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).toContain('Undo');
});
it('[C280521] notification on multiple items deletion - all items fail to delete', async () => {
await dataTable.selectMultipleItems([favFolder4, favFolder5], parent);
await toolbar.clickMoreActionsDelete();
const message = await page.getSnackBarMessage();
expect(message).toEqual(`2 items couldn't be deleted`);
expect(message).not.toContain(`Undo`);
const action = await page.getSnackBarAction();
expect(action).not.toContain('Undo');
});
it('[C280524] undo delete of file', async () => {
+20 -4
View File
@@ -79,9 +79,13 @@ describe('Restore from Trash', () => {
it('[C217177] restore file', async () => {
await dataTable.selectItem(file);
await BrowserActions.click(toolbar.restoreButton);
const text = await page.getSnackBarMessage();
expect(text).toContain(`${file} restored`);
expect(text).toContain(`View`);
const action = await page.getSnackBarAction();
expect(action).toContain('View');
expect(await dataTable.isItemPresent(file)).toBe(false, 'Item was not removed from list');
await page.clickPersonalFilesAndWait();
expect(await page.dataTable.isItemPresent(file)).toBe(true, 'Item not displayed in list');
@@ -92,9 +96,13 @@ describe('Restore from Trash', () => {
it('[C280438] restore folder', async () => {
await dataTable.selectItem(folder);
await BrowserActions.click(toolbar.restoreButton);
const text = await page.getSnackBarMessage();
expect(text).toContain(`${folder} restored`);
expect(text).toContain(`View`);
const action = await page.getSnackBarAction();
expect(action).toContain('View');
expect(await dataTable.isItemPresent(folder)).toBe(false, 'Item was not removed from list');
await page.clickPersonalFilesAndWait();
expect(await page.dataTable.isItemPresent(folder)).toBe(true, 'Item not displayed in list');
@@ -105,9 +113,13 @@ describe('Restore from Trash', () => {
it('[C290104] restore library', async () => {
await dataTable.selectItem(site);
await BrowserActions.click(toolbar.restoreButton);
const text = await page.getSnackBarMessage();
expect(text).toContain(`${site} restored`);
expect(text).toContain(`View`);
const action = await page.getSnackBarAction();
expect(action).toContain('View');
expect(await dataTable.isItemPresent(site)).toBe(false, `${site} was not removed from list`);
await page.clickFileLibrariesAndWait();
expect(await page.dataTable.isItemPresent(site)).toBe(true, `${site} not displayed in list`);
@@ -116,9 +128,13 @@ describe('Restore from Trash', () => {
it('[C217182] restore multiple items', async () => {
await dataTable.selectMultipleItems([file, folder]);
await BrowserActions.click(toolbar.restoreButton);
const text = await page.getSnackBarMessage();
expect(text).toContain(`Restore successful`);
expect(text).not.toContain(`View`);
const action = await page.getSnackBarAction();
expect(action).not.toContain('View');
expect(await dataTable.isItemPresent(file)).toBe(false, 'Item was not removed from list');
expect(await dataTable.isItemPresent(folder)).toBe(false, 'Item was not removed from list');
await page.clickPersonalFilesAndWait();