mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACS-3640] Reverting reverted changes for a 11 y aca 881740 snackbar messages disappear without option to adjust timing (#2785)
* 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 * ACS-3640 Correction for e2e * ACS-3640 Reverting reverted corrections for e2e * ACS-3640 Use data automation id * ACS-3640 Update ADF version
This commit is contained in:
@@ -487,7 +487,8 @@ describe('Copy content', () => {
|
||||
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`);
|
||||
@@ -507,7 +508,8 @@ describe('Copy content', () => {
|
||||
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`);
|
||||
@@ -531,7 +533,8 @@ describe('Copy content', () => {
|
||||
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`);
|
||||
@@ -553,7 +556,8 @@ describe('Copy content', () => {
|
||||
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`);
|
||||
@@ -573,7 +577,8 @@ describe('Copy content', () => {
|
||||
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`);
|
||||
@@ -599,7 +604,8 @@ describe('Copy content', () => {
|
||||
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) {
|
||||
@@ -627,7 +633,8 @@ describe('Copy content', () => {
|
||||
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`);
|
||||
@@ -650,7 +657,8 @@ describe('Copy content', () => {
|
||||
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`);
|
||||
@@ -681,7 +689,8 @@ describe('Copy content', () => {
|
||||
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();
|
||||
|
||||
@@ -704,7 +713,8 @@ describe('Copy content', () => {
|
||||
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();
|
||||
|
||||
@@ -729,7 +739,8 @@ describe('Copy content', () => {
|
||||
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();
|
||||
|
||||
@@ -755,7 +766,8 @@ describe('Copy content', () => {
|
||||
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();
|
||||
|
||||
|
@@ -164,7 +164,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(file1)).toBe(false, `${file1} still present in source folder`);
|
||||
@@ -182,7 +183,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(folder1)).toBe(false, `${folder1} still present in source folder`);
|
||||
@@ -204,7 +206,8 @@ describe('Move content', () => {
|
||||
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`);
|
||||
@@ -224,7 +227,8 @@ describe('Move content', () => {
|
||||
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`);
|
||||
@@ -243,7 +247,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)).toBe(false, `${existingFolder} still present in source folder`);
|
||||
@@ -268,7 +273,8 @@ describe('Move content', () => {
|
||||
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`);
|
||||
@@ -319,7 +325,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(file1, destinationRF)).toBe(true, `${file1} from ${destinationRF} not present`);
|
||||
@@ -338,7 +345,8 @@ describe('Move content', () => {
|
||||
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`);
|
||||
@@ -360,7 +368,8 @@ describe('Move content', () => {
|
||||
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`);
|
||||
@@ -382,7 +391,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(file4, folderSiteRF)).toBe(true, `${file4} from ${folderSiteRF} not present`);
|
||||
@@ -443,7 +453,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(file1, destinationSF)).toBe(true, `${file1} from ${destinationSF} not present`);
|
||||
@@ -462,7 +473,8 @@ describe('Move content', () => {
|
||||
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`);
|
||||
@@ -484,7 +496,8 @@ describe('Move content', () => {
|
||||
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`);
|
||||
@@ -506,7 +519,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(file4, folderSiteSF)).toBe(true, `${file4} from ${folderSiteSF} not present`);
|
||||
@@ -593,7 +607,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(file1, destinationFav)).toBe(true, `${file1} from ${destinationFav} not present`);
|
||||
@@ -612,7 +627,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(folder1, sourceFav)).toBe(false, `${folder1} from ${sourceFav} is present`);
|
||||
@@ -635,7 +651,8 @@ describe('Move content', () => {
|
||||
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`);
|
||||
@@ -657,7 +674,8 @@ describe('Move content', () => {
|
||||
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 +695,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`);
|
||||
@@ -701,7 +720,8 @@ describe('Move content', () => {
|
||||
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`);
|
||||
|
@@ -98,7 +98,8 @@ describe('Delete and undo delete', () => {
|
||||
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`);
|
||||
@@ -109,7 +110,8 @@ describe('Delete and undo delete', () => {
|
||||
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();
|
||||
@@ -238,7 +240,8 @@ describe('Delete and undo delete', () => {
|
||||
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}`);
|
||||
@@ -278,7 +281,8 @@ describe('Delete and undo delete', () => {
|
||||
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`);
|
||||
@@ -290,7 +294,8 @@ describe('Delete and undo delete', () => {
|
||||
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 () => {
|
||||
@@ -298,7 +303,8 @@ describe('Delete and undo delete', () => {
|
||||
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 () => {
|
||||
@@ -390,7 +396,8 @@ describe('Delete and undo delete', () => {
|
||||
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`);
|
||||
@@ -401,7 +408,8 @@ describe('Delete and undo delete', () => {
|
||||
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();
|
||||
@@ -536,7 +544,8 @@ describe('Delete and undo delete', () => {
|
||||
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`);
|
||||
@@ -547,7 +556,8 @@ describe('Delete and undo delete', () => {
|
||||
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();
|
||||
@@ -581,7 +591,8 @@ describe('Delete and undo delete', () => {
|
||||
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 () => {
|
||||
@@ -589,7 +600,8 @@ describe('Delete and undo delete', () => {
|
||||
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 () => {
|
||||
|
@@ -81,7 +81,8 @@ describe('Restore from Trash', () => {
|
||||
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');
|
||||
@@ -94,7 +95,8 @@ describe('Restore from Trash', () => {
|
||||
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');
|
||||
@@ -107,7 +109,8 @@ describe('Restore from Trash', () => {
|
||||
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`);
|
||||
@@ -118,7 +121,8 @@ describe('Restore from Trash', () => {
|
||||
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();
|
||||
|
Reference in New Issue
Block a user