mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
Revert snackbar changes (#2778)
* Revert "[AAE-10766] upgrade to new About component (#2769)"
This reverts commit 5ce4835e4c
.
* restore about dialog changes
* latest ADF alpha
This commit is contained in:
@@ -485,12 +485,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await copyDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(fileName)).toBe(true, `${fileName} not present in source folder`);
|
||||
@@ -508,12 +505,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await copyDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(folderName)).toBe(true, `${folderName} not present in source folder`);
|
||||
@@ -535,12 +529,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await copyDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(items[0])).toBe(true, `${items[0]} not present in source folder`);
|
||||
@@ -560,12 +551,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await copyDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(fileName)).toBe(true, `${fileName}.txt not present in source folder`);
|
||||
@@ -583,12 +571,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await copyDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(folderName)).toBe(true, `${folderName} not present in source folder`);
|
||||
@@ -612,12 +597,9 @@ 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'}`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await copyDialog.waitForDialogToClose();
|
||||
for (const item of items) {
|
||||
@@ -643,12 +625,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await copyDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(fileName)).toBe(true, `${fileName} not present in source folder`);
|
||||
@@ -669,12 +648,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await copyDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(folderName)).toBe(true, `${folderName} not present in source folder`);
|
||||
@@ -703,12 +679,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await page.clickSnackBarAction();
|
||||
|
||||
@@ -729,12 +702,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await page.clickSnackBarAction();
|
||||
|
||||
@@ -757,12 +727,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await page.clickSnackBarAction();
|
||||
|
||||
@@ -786,12 +753,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await page.clickSnackBarAction();
|
||||
|
||||
|
@@ -162,12 +162,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file1)).toBe(false, `${file1} still present in source folder`);
|
||||
@@ -183,12 +180,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(folder1)).toBe(false, `${folder1} still present in source folder`);
|
||||
@@ -208,12 +202,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file2)).toBe(false, `${file2} still present in source folder`);
|
||||
@@ -231,12 +222,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).not.toContain('Undo');
|
||||
expect(msg).not.toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(`${existingFile}.txt`)).toBe(true, `${existingFile}.txt not present in source folder`);
|
||||
@@ -253,12 +241,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(existingFolder)).toBe(false, `${existingFolder} still present in source folder`);
|
||||
@@ -281,12 +266,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file4)).toBe(false, `${file4} still present in source folder`);
|
||||
@@ -335,12 +317,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file1, destinationRF)).toBe(true, `${file1} from ${destinationRF} not present`);
|
||||
@@ -357,12 +336,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file2, destinationRF)).toBe(true, `${file2} from ${destinationRF} not present`);
|
||||
@@ -382,12 +358,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).not.toContain('Undo');
|
||||
expect(msg).not.toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(existingFile, sourceRF)).toBe(true, `${existingFile} from ${sourceRF} not present`);
|
||||
@@ -407,12 +380,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file4, folderSiteRF)).toBe(true, `${file4} from ${folderSiteRF} not present`);
|
||||
@@ -471,12 +441,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file1, destinationSF)).toBe(true, `${file1} from ${destinationSF} not present`);
|
||||
@@ -493,12 +460,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file2, destinationSF)).toBe(true, `${file2} from ${destinationSF} not present`);
|
||||
@@ -518,12 +482,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).not.toContain('Undo');
|
||||
expect(msg).not.toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(existingFile, sourceSF)).toBe(true, `${existingFile} from ${sourceSF} not present`);
|
||||
@@ -543,12 +504,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file4, folderSiteSF)).toBe(true, `${file4} from ${folderSiteSF} not present`);
|
||||
@@ -633,12 +591,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file1, destinationFav)).toBe(true, `${file1} from ${destinationFav} not present`);
|
||||
@@ -655,12 +610,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(folder1, sourceFav)).toBe(false, `${folder1} from ${sourceFav} is present`);
|
||||
@@ -681,12 +633,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file2, destinationFav)).toBe(true, `${file2} from ${destinationFav} not present`);
|
||||
@@ -706,12 +655,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).not.toContain('Undo');
|
||||
expect(msg).not.toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(existingFile, sourceFav)).toBe(true, `${existingFile} from ${sourceFav} not present`);
|
||||
@@ -731,8 +677,7 @@ describe('Move content', () => {
|
||||
await BrowserActions.click(moveDialog.moveButton);
|
||||
const msg = await page.getSnackBarMessage();
|
||||
expect(msg).toContain('Moved 1 item');
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(existingFolder, sourceFav)).toBe(false, `${existingFolder} from ${sourceFav} is present`);
|
||||
@@ -754,12 +699,9 @@ 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');
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(msg).toContain('Undo');
|
||||
|
||||
await moveDialog.waitForDialogToClose();
|
||||
expect(await dataTable.isItemPresent(file4, folderSiteFav)).toBe(true, `${file4} from ${folderSiteFav} not present`);
|
||||
|
@@ -96,13 +96,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
|
||||
expect(message).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`);
|
||||
@@ -111,13 +107,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
|
||||
expect(message).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();
|
||||
@@ -244,13 +236,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
|
||||
expect(message).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}`);
|
||||
@@ -288,13 +276,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).not.toContain('Undo');
|
||||
|
||||
expect(message).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`);
|
||||
@@ -304,23 +288,17 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(message).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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).not.toContain('Undo');
|
||||
expect(message).not.toContain(`Undo`);
|
||||
});
|
||||
|
||||
it('[C217132] undo delete of file', async () => {
|
||||
@@ -410,13 +388,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
|
||||
expect(message).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`);
|
||||
@@ -425,13 +399,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
|
||||
expect(message).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();
|
||||
@@ -564,13 +534,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
|
||||
expect(message).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`);
|
||||
@@ -579,13 +545,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
|
||||
expect(message).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();
|
||||
@@ -617,23 +579,17 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('Undo');
|
||||
expect(message).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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).not.toContain('Undo');
|
||||
expect(message).not.toContain(`Undo`);
|
||||
});
|
||||
|
||||
it('[C280524] undo delete of file', async () => {
|
||||
|
@@ -79,13 +79,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('View');
|
||||
|
||||
expect(text).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');
|
||||
@@ -96,13 +92,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('View');
|
||||
|
||||
expect(text).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');
|
||||
@@ -113,13 +105,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).toContain('View');
|
||||
|
||||
expect(text).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`);
|
||||
@@ -128,13 +116,9 @@ 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`);
|
||||
|
||||
const action = await page.getSnackBarAction();
|
||||
expect(action).not.toContain('View');
|
||||
|
||||
expect(text).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