mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA] Document List - e2e fix (#522)
* e2e fix * fix name column as link * fix 1
This commit is contained in:
committed by
Denys Vuika
parent
537eeebaf9
commit
9dba35baed
@@ -115,26 +115,26 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('unselect selected items - single click', () => {
|
||||
dataTable.selectMultipleItems([ file1, file2, folder1, folder2 ])
|
||||
dataTable.selectMultipleItemsRow([ file1, file2, folder1, folder2 ])
|
||||
.then(() => expect(dataTable.countSelectedRows()).toEqual(4, 'incorrect selected rows number'))
|
||||
.then(() => dataTable.clickOnItemName(file1))
|
||||
.then(() => dataTable.clickOnItemNameRow(file1))
|
||||
.then(() => expect(dataTable.countSelectedRows()).toEqual(1, 'incorrect selected rows number'))
|
||||
.then(() => dataTable.clearSelection());
|
||||
});
|
||||
|
||||
it('unselect selected items - CMD+click', () => {
|
||||
dataTable.selectMultipleItems([ file1, file2, folder1, folder2 ])
|
||||
dataTable.selectMultipleItemsRow([ file1, file2, folder1, folder2 ])
|
||||
.then(() => expect(dataTable.countSelectedRows()).toEqual(4, 'incorrect selected rows number'))
|
||||
.then(() => browser.actions().sendKeys(protractor.Key.COMMAND).perform())
|
||||
.then(() => dataTable.clickOnItemName(file1))
|
||||
.then(() => dataTable.clickOnItemName(file2))
|
||||
.then(() => dataTable.clickOnItemNameRow(file1))
|
||||
.then(() => dataTable.clickOnItemNameRow(file2))
|
||||
.then(() => browser.actions().sendKeys(protractor.Key.NULL).perform())
|
||||
.then(() => expect(dataTable.countSelectedRows()).toEqual(2, 'incorrect selected rows number'))
|
||||
.then(() => dataTable.clearSelection());
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple files are selected', () => {
|
||||
dataTable.selectMultipleItems([file1, file2])
|
||||
dataTable.selectMultipleItemsRow([file1, file2])
|
||||
.then(() => toolbar.actions.openMoreMenu())
|
||||
.then(menu => {
|
||||
expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`);
|
||||
@@ -148,7 +148,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple folders are selected', () => {
|
||||
dataTable.selectMultipleItems([folder1, folder2])
|
||||
dataTable.selectMultipleItemsRow([folder1, folder2])
|
||||
.then(() => toolbar.actions.openMoreMenu())
|
||||
.then(menu => {
|
||||
expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`);
|
||||
@@ -162,49 +162,49 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('should not display View action when multiple entries selected', async () => {
|
||||
await dataTable.selectMultipleItems([folder1, file1, folder2]);
|
||||
await dataTable.selectMultipleItemsRow([folder1, file1, folder2]);
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'Action is displayed');
|
||||
});
|
||||
|
||||
|
||||
it('should display View action when one file is selected', async () => {
|
||||
await dataTable.selectMultipleItems([file1]);
|
||||
await dataTable.selectMultipleItemsRow([file1]);
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(true, 'Action is not displayed');
|
||||
});
|
||||
|
||||
it('should not display View action when only folders selected', async () => {
|
||||
await dataTable.selectMultipleItems([folder1, folder2]);
|
||||
await dataTable.selectMultipleItemsRow([folder1, folder2]);
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'Action is displayed');
|
||||
});
|
||||
|
||||
it('should display Download action for selected items', async () => {
|
||||
await dataTable.selectMultipleItems([folder1, file1, folder2]);
|
||||
await dataTable.selectMultipleItemsRow([folder1, file1, folder2]);
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Action is not displayed');
|
||||
});
|
||||
|
||||
it('should not display Download action for empty selection', async () => {
|
||||
await dataTable.selectMultipleItems([folder1, file1, folder2]);
|
||||
await dataTable.selectMultipleItemsRow([folder1, file1, folder2]);
|
||||
await dataTable.clearSelection();
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(false, 'Action is displayed');
|
||||
});
|
||||
|
||||
it('should display Edit action when single folder selected', async () => {
|
||||
await dataTable.selectMultipleItems([folder1]);
|
||||
await dataTable.selectMultipleItemsRow([folder1]);
|
||||
expect(toolbar.actions.isButtonPresent('Edit')).toBe(true, 'Action is not displayed');
|
||||
});
|
||||
|
||||
it('should not display Edit action when multiple folders selected', async () => {
|
||||
await dataTable.selectMultipleItems([folder1, file1, folder2]);
|
||||
await dataTable.selectMultipleItemsRow([folder1, file1, folder2]);
|
||||
expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Action is displayed');
|
||||
});
|
||||
|
||||
it('should not display Edit action if no folders selected', async () => {
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
await dataTable.selectMultipleItemsRow([file1, file2]);
|
||||
expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Action is displayed');
|
||||
});
|
||||
|
||||
it('correct actions appear when both files and folders are selected', () => {
|
||||
dataTable.selectMultipleItems([file1, file2, folder1, folder2])
|
||||
dataTable.selectMultipleItemsRow([file1, file2, folder1, folder2])
|
||||
.then(() => toolbar.actions.openMoreMenu())
|
||||
.then(menu => {
|
||||
expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`);
|
||||
@@ -232,7 +232,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
beforeEach(done => {
|
||||
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES)
|
||||
.then(() => dataTable.waitForHeader())
|
||||
.then(() => dataTable.doubleClickOnItemName(siteName))
|
||||
.then(() => dataTable.doubleClickOnItemNameRow(siteName))
|
||||
.then(() => dataTable.waitForHeader())
|
||||
.then(done);
|
||||
});
|
||||
@@ -253,7 +253,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple files are selected', () => {
|
||||
dataTable.selectMultipleItems([file1Admin, file2Admin])
|
||||
dataTable.selectMultipleItemsRow([file1Admin, file2Admin])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files');
|
||||
@@ -272,7 +272,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple folders are selected', () => {
|
||||
dataTable.selectMultipleItems([folder1Admin, folder2Admin])
|
||||
dataTable.selectMultipleItemsRow([folder1Admin, folder2Admin])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed');
|
||||
@@ -291,7 +291,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when both files and folders are selected', () => {
|
||||
dataTable.selectMultipleItems([file1Admin, file2Admin, folder1Admin, folder2Admin])
|
||||
dataTable.selectMultipleItemsRow([file1Admin, file2Admin, folder1Admin, folder2Admin])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed');
|
||||
@@ -320,7 +320,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple files are selected', () => {
|
||||
dataTable.selectMultipleItems([file1Admin, file2Admin])
|
||||
dataTable.selectMultipleItemsRow([file1Admin, file2Admin])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files');
|
||||
@@ -339,7 +339,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple folders are selected', () => {
|
||||
dataTable.selectMultipleItems([folder1Admin, folder2Admin])
|
||||
dataTable.selectMultipleItemsRow([folder1Admin, folder2Admin])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed');
|
||||
@@ -358,7 +358,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when both files and folders are selected', () => {
|
||||
dataTable.selectMultipleItems([file1Admin, file2Admin, folder1Admin, folder2Admin])
|
||||
dataTable.selectMultipleItemsRow([file1Admin, file2Admin, folder1Admin, folder2Admin])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files');
|
||||
@@ -395,7 +395,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple files are selected', () => {
|
||||
dataTable.selectMultipleItems([file1, file2])
|
||||
dataTable.selectMultipleItemsRow([file1, file2])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files');
|
||||
@@ -430,7 +430,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple files are selected', () => {
|
||||
dataTable.selectMultipleItems([file1, file2])
|
||||
dataTable.selectMultipleItemsRow([file1, file2])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed');
|
||||
@@ -465,7 +465,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple files are selected', () => {
|
||||
dataTable.selectMultipleItems([file1, file2])
|
||||
dataTable.selectMultipleItemsRow([file1, file2])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed');
|
||||
@@ -484,7 +484,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple folders are selected', () => {
|
||||
dataTable.selectMultipleItems([folder1, folder2])
|
||||
dataTable.selectMultipleItemsRow([folder1, folder2])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed');
|
||||
@@ -503,7 +503,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when both files and folders are selected', () => {
|
||||
dataTable.selectMultipleItems([file1, file2, folder1, folder2])
|
||||
dataTable.selectMultipleItemsRow([file1, file2, folder1, folder2])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed');
|
||||
expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files');
|
||||
@@ -539,7 +539,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple files are selected', () => {
|
||||
dataTable.selectMultipleItems([fileForDelete1, fileForDelete2])
|
||||
dataTable.selectMultipleItemsRow([fileForDelete1, fileForDelete2])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('Permanently delete'))
|
||||
.toBe(true, 'Permanently delete is displayed for selected files');
|
||||
@@ -549,7 +549,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when multiple folders are selected', () => {
|
||||
dataTable.selectMultipleItems([folderForDelete1, folderForDelete2])
|
||||
dataTable.selectMultipleItemsRow([folderForDelete1, folderForDelete2])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('Permanently delete'))
|
||||
.toBe(true, 'Permanently delete is displayed for selected files');
|
||||
@@ -559,7 +559,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
});
|
||||
|
||||
it('correct actions appear when both files and folders are selected', () => {
|
||||
dataTable.selectMultipleItems([fileForDelete1, fileForDelete2, folderForDelete1, folderForDelete2])
|
||||
dataTable.selectMultipleItemsRow([fileForDelete1, fileForDelete2, folderForDelete1, folderForDelete2])
|
||||
.then(() => {
|
||||
expect(toolbar.actions.isButtonPresent('Permanently delete'))
|
||||
.toBe(true, 'Permanently delete is displayed for selected files');
|
||||
|
Reference in New Issue
Block a user