mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACA-1709] create separate methods for navigating to desired doc list (#756)
* create separate methods for navigating to desired doc list * remove timeout committed by mistake
This commit is contained in:
parent
0a5d56fe05
commit
c9f5bc7de3
@ -23,8 +23,8 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { promise } from 'protractor';
|
||||
import { Header, DataTable, Pagination, Toolbar, Breadcrumb, Sidenav } from '../components/components';
|
||||
import { SIDEBAR_LABELS } from './../configs';
|
||||
import { Page } from './page';
|
||||
|
||||
export class BrowsingPage extends Page {
|
||||
@ -38,4 +38,67 @@ export class BrowsingPage extends Page {
|
||||
async signOut() {
|
||||
await this.header.userInfo.signOut();
|
||||
}
|
||||
|
||||
|
||||
// helper methods
|
||||
|
||||
async clickPersonalFilesAndWait() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await this.dataTable.waitForHeader();
|
||||
}
|
||||
|
||||
async clickPersonalFiles() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
}
|
||||
|
||||
|
||||
async clickFileLibrariesAndWait() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await this.dataTable.waitForHeader();
|
||||
}
|
||||
|
||||
async clickFileLibraries() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
}
|
||||
|
||||
|
||||
async clickRecentFilesAndWait() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await this.dataTable.waitForHeader();
|
||||
}
|
||||
|
||||
async clickRecentFiles() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
}
|
||||
|
||||
|
||||
async clickSharedFilesAndWait() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await this.dataTable.waitForHeader();
|
||||
}
|
||||
|
||||
async clickSharedFiles() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
}
|
||||
|
||||
|
||||
async clickFavoritesAndWait() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await this.dataTable.waitForHeader();
|
||||
}
|
||||
|
||||
async clickFavorites() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
}
|
||||
|
||||
|
||||
async clickTrashAndWait() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await this.dataTable.waitForHeader();
|
||||
}
|
||||
|
||||
async clickTrash() {
|
||||
await this.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,12 +111,6 @@ export abstract class Page {
|
||||
|
||||
async clickSnackBarAction() {
|
||||
try {
|
||||
|
||||
// await this.waitForSnackBarToAppear();
|
||||
|
||||
// return browser.executeScript(function (elem) {
|
||||
// elem.click();
|
||||
// }, this.snackBarAction);
|
||||
return await this.snackBarAction.click();
|
||||
} catch (e) {
|
||||
console.log(e, '.......failed on click snack bar action.........');
|
||||
@ -130,4 +124,5 @@ export abstract class Page {
|
||||
async getGenericErrorTitle() {
|
||||
return await this.genericErrorTitle.getText();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SITE_VISIBILITY, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -103,15 +103,13 @@ describe('Context menu actions - multiple selection : ', () => {
|
||||
describe('Generic tests', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
|
||||
it('Context menu appears on right click on a multiple selection of items - [C286268]', async () => {
|
||||
await dataTable.selectMultipleItems([ file1, file2 ]);
|
||||
// await dataTable.rightClickOnItem(file1);
|
||||
await dataTable.rightClickOnMultipleSelection();
|
||||
expect(await dataTable.hasContextMenu()).toBe(true, 'Context menu is not displayed');
|
||||
});
|
||||
@ -131,8 +129,7 @@ describe('Context menu actions - multiple selection : ', () => {
|
||||
describe('on Personal Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -179,8 +176,7 @@ describe('Context menu actions - multiple selection : ', () => {
|
||||
describe('on File Libraries', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.clearSelection();
|
||||
@ -230,8 +226,7 @@ describe('Context menu actions - multiple selection : ', () => {
|
||||
describe('on Shared Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -253,8 +248,7 @@ describe('Context menu actions - multiple selection : ', () => {
|
||||
describe('Recent Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -276,8 +270,7 @@ describe('Context menu actions - multiple selection : ', () => {
|
||||
describe('Favorites', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -328,8 +321,7 @@ describe('Context menu actions - multiple selection : ', () => {
|
||||
describe('Trash', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
|
@ -23,9 +23,8 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { browser, protractor } from 'protractor';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SITE_VISIBILITY, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -93,8 +92,7 @@ describe('Context menu actions - single selection : ', () => {
|
||||
describe('Generic tests', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -131,8 +129,7 @@ describe('Context menu actions - single selection : ', () => {
|
||||
});
|
||||
|
||||
it('Context menu does not appear for a library - [C286276]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.rightClickOnItem(siteName);
|
||||
expect(await dataTable.hasContextMenu()).toBe(false, 'Context menu is displayed for a site');
|
||||
});
|
||||
@ -141,8 +138,7 @@ describe('Context menu actions - single selection : ', () => {
|
||||
describe('on Personal Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -180,8 +176,7 @@ describe('Context menu actions - single selection : ', () => {
|
||||
describe('File Libraries', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
done();
|
||||
@ -220,8 +215,7 @@ describe('Context menu actions - single selection : ', () => {
|
||||
describe('Shared Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -245,8 +239,7 @@ describe('Context menu actions - single selection : ', () => {
|
||||
describe('Recent Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -269,8 +262,7 @@ describe('Context menu actions - single selection : ', () => {
|
||||
describe('Favorites', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -309,8 +301,7 @@ describe('Context menu actions - single selection : ', () => {
|
||||
describe('Trash', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { SIDEBAR_LABELS, SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { CreateOrEditFolderDialog } from '../../components/dialog/create-edit-folder-dialog';
|
||||
import { Menu } from '../../components/menu/menu';
|
||||
@ -51,9 +51,9 @@ describe('Create folder', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const personalFilesPage = new BrowsingPage();
|
||||
const page = new BrowsingPage();
|
||||
const createDialog = new CreateOrEditFolderDialog();
|
||||
const { dataTable } = personalFilesPage;
|
||||
const { dataTable } = page;
|
||||
const menu = new Menu();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
@ -77,8 +77,7 @@ describe('Create folder', () => {
|
||||
|
||||
describe('on Personal Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -88,15 +87,15 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('option is enabled when having enough permissions - [C216339]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openNewMenu();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openNewMenu();
|
||||
const isEnabled = await menu.getItemByLabel('Create folder').isEnabled();
|
||||
expect(isEnabled).toBe(true, 'Create folder is not enabled');
|
||||
});
|
||||
|
||||
it('creates new folder with name - [C216341]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await createDialog.enterName(folderName1);
|
||||
await createDialog.clickCreate();
|
||||
@ -107,8 +106,8 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('creates new folder with name and description - [C216340]', async (done) => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await createDialog.enterName(folderName2);
|
||||
await createDialog.enterDescription(folderDescription);
|
||||
@ -122,15 +121,15 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('enabled option tooltip - [C216342]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openNewMenu();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openNewMenu();
|
||||
await browser.actions().mouseMove(menu.getItemByLabel('Create folder')).perform();
|
||||
expect(await menu.getItemTooltip('Create folder')).toContain('Create new folder');
|
||||
});
|
||||
|
||||
it('dialog UI elements - [C216345]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
const dialogTitle = await createDialog.getTitle();
|
||||
const isFolderNameDisplayed = await createDialog.nameInput.isDisplayed();
|
||||
@ -146,8 +145,8 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('with empty folder name - [C216346]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await createDialog.deleteNameWithBackspace();
|
||||
const isCreateEnabled = await createDialog.createButton.isEnabled();
|
||||
@ -158,8 +157,8 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('with folder name ending with a dot "." - [C216348]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await createDialog.enterName('folder-name.');
|
||||
const isCreateEnabled = await createDialog.createButton.isEnabled();
|
||||
@ -172,8 +171,8 @@ describe('Create folder', () => {
|
||||
it('with folder name containing special characters - [C216347]', async () => {
|
||||
const namesWithSpecialChars = [ 'a*a', 'a"a', 'a<a', 'a>a', `a\\a`, 'a/a', 'a?a', 'a:a', 'a|a' ];
|
||||
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
|
||||
for (const name of namesWithSpecialChars) {
|
||||
@ -184,8 +183,8 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('with folder name containing only spaces - [C280406]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await createDialog.enterName(' ');
|
||||
const isCreateEnabled = await createDialog.createButton.isEnabled();
|
||||
@ -196,8 +195,8 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('cancel folder creation - [C216349]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await createDialog.enterName('test');
|
||||
await createDialog.enterDescription('test description');
|
||||
@ -206,19 +205,19 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('duplicate folder name - [C216350]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await createDialog.enterName(duplicateFolderName);
|
||||
await createDialog.clickCreate();
|
||||
const message = await personalFilesPage.getSnackBarMessage();
|
||||
const message = await page.getSnackBarMessage();
|
||||
expect(message).toEqual(`There's already a folder with this name. Try a different name.`);
|
||||
expect(await createDialog.component.isPresent()).toBe(true, 'dialog is not present');
|
||||
});
|
||||
|
||||
it('trim ending spaces from folder name - [C216351]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(parent);
|
||||
await personalFilesPage.sidenav.openCreateDialog();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await createDialog.enterName(nameWithSpaces);
|
||||
await createDialog.clickCreate();
|
||||
@ -233,8 +232,7 @@ describe('Create folder', () => {
|
||||
const fileLibrariesPage = new BrowsingPage();
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await fileLibrariesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await fileLibrariesPage.clickFileLibrariesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -48,7 +47,7 @@ describe('Delete and undo delete', () => {
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await apis.admin.trashcan.emptyTrash();
|
||||
await apis.user.trashcan.emptyTrash();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -80,8 +79,7 @@ describe('Delete and undo delete', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -110,7 +108,7 @@ describe('Delete and undo delete', () => {
|
||||
expect(await dataTable.getRowByName(file1).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
items--;
|
||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(file1).isPresent()).toBe(true, 'Item is not in trash');
|
||||
|
||||
await apis.user.trashcan.restore(file1Id);
|
||||
@ -128,7 +126,7 @@ describe('Delete and undo delete', () => {
|
||||
expect(await dataTable.getRowByName(file2).isPresent()).toBe(false, `${file2} was not removed from list`);
|
||||
items = items - 2;
|
||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(file1).isPresent()).toBe(true, `${file1} is not in trash`);
|
||||
expect(await dataTable.getRowByName(file2).isPresent()).toBe(true, `${file2} is not in trash`);
|
||||
|
||||
@ -145,7 +143,7 @@ describe('Delete and undo delete', () => {
|
||||
expect(await dataTable.getRowByName(folder1).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
items--;
|
||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(folder1).isPresent()).toBe(true, 'Item is not in trash');
|
||||
expect(await dataTable.getRowByName(file3).isPresent()).toBe(false, 'Item is in trash');
|
||||
|
||||
@ -159,7 +157,7 @@ describe('Delete and undo delete', () => {
|
||||
const message = await page.getSnackBarMessage();
|
||||
expect(message).toContain(`${folder2} couldn't be deleted`);
|
||||
expect(await dataTable.getRowByName(folder2).isPresent()).toBe(true, 'Item was removed from list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(folder2).isPresent()).toBe(false, 'Item is in trash');
|
||||
expect(await dataTable.getRowByName(file4).isPresent()).toBe(false, 'Item is in trash');
|
||||
});
|
||||
@ -258,8 +256,7 @@ describe('Delete and undo delete', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -282,7 +279,7 @@ describe('Delete and undo delete', () => {
|
||||
const message = await page.getSnackBarMessage();
|
||||
expect(message).toContain(`${sharedFile1} deleted`);
|
||||
expect(await dataTable.getRowByName(sharedFile1).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(sharedFile1).isPresent()).toBe(true, 'Item is not in trash');
|
||||
|
||||
await apis.user.trashcan.restore(sharedFile1Id);
|
||||
@ -298,7 +295,7 @@ describe('Delete and undo delete', () => {
|
||||
expect(message).toContain(`Deleted 2 items`);
|
||||
expect(await dataTable.getRowByName(sharedFile2).isPresent()).toBe(false, `${sharedFile2} was not removed from list`);
|
||||
expect(await dataTable.getRowByName(sharedFile3).isPresent()).toBe(false, `${sharedFile3} was not removed from list`);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(sharedFile2).isPresent()).toBe(true, `${sharedFile2} is not in trash`);
|
||||
expect(await dataTable.getRowByName(sharedFile3).isPresent()).toBe(true, `${sharedFile3} is not in trash`);
|
||||
|
||||
@ -323,7 +320,7 @@ describe('Delete and undo delete', () => {
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Delete');
|
||||
await page.clickSnackBarAction();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(sharedFile2).isPresent()).toBe(false, 'Item was not restored');
|
||||
});
|
||||
|
||||
@ -332,7 +329,7 @@ describe('Delete and undo delete', () => {
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Delete');
|
||||
await page.clickSnackBarAction();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(sharedFile3).isPresent()).toBe(false, `${sharedFile3} was not restored`);
|
||||
expect(await dataTable.getRowByName(sharedFile4).isPresent()).toBe(false, `${sharedFile4} was not restored`);
|
||||
});
|
||||
@ -368,8 +365,7 @@ describe('Delete and undo delete', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -400,7 +396,7 @@ describe('Delete and undo delete', () => {
|
||||
expect(await dataTable.getRowByName(favoriteFile1).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
items--;
|
||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(favoriteFile1).isPresent()).toBe(true, 'Item is not in trash');
|
||||
|
||||
await apis.user.trashcan.restore(favoriteFile1Id);
|
||||
@ -418,7 +414,7 @@ describe('Delete and undo delete', () => {
|
||||
expect(await dataTable.getRowByName(favoriteFile2).isPresent()).toBe(false, `${favoriteFile2} was not removed from list`);
|
||||
items = items - 2;
|
||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(favoriteFile1).isPresent()).toBe(true, `${favoriteFile1} is not in trash`);
|
||||
expect(await dataTable.getRowByName(favoriteFile2).isPresent()).toBe(true, `${favoriteFile2} is not in trash`);
|
||||
|
||||
@ -434,7 +430,7 @@ describe('Delete and undo delete', () => {
|
||||
expect(await dataTable.getRowByName(favoriteFolder1).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
items--;
|
||||
expect(await page.pagination.range.getText()).toContain(`1-${items} of ${items}`);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(favoriteFolder1).isPresent()).toBe(true, 'Item is not in trash');
|
||||
expect(await dataTable.getRowByName(favoriteFile3).isPresent()).toBe(false, 'Item is in trash');
|
||||
|
||||
@ -448,7 +444,7 @@ describe('Delete and undo delete', () => {
|
||||
const message = await page.getSnackBarMessage();
|
||||
expect(message).toContain(`${favoriteFolder2} couldn't be deleted`);
|
||||
expect(await dataTable.getRowByName(favoriteFolder2).isPresent()).toBe(true, 'Item was removed from list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(favoriteFolder2).isPresent()).toBe(false, 'Item is in trash');
|
||||
expect(await dataTable.getRowByName(favoriteFile4).isPresent()).toBe(false, 'Item is in trash');
|
||||
});
|
||||
@ -542,7 +538,7 @@ describe('Delete and undo delete', () => {
|
||||
|
||||
await loginPage.loginWith(username);
|
||||
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await page.clickRecentFiles();
|
||||
const empty = await dataTable.isEmptyList();
|
||||
if (empty) {
|
||||
await browser.sleep(6000);
|
||||
@ -553,8 +549,7 @@ describe('Delete and undo delete', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -576,7 +571,7 @@ describe('Delete and undo delete', () => {
|
||||
const message = await page.getSnackBarMessage();
|
||||
expect(message).toContain(`${recentFile1} deleted`);
|
||||
expect(await dataTable.getRowByName(recentFile1).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(recentFile1).isPresent()).toBe(true, 'Item is not in trash');
|
||||
|
||||
await apis.user.trashcan.restore(recentFile1Id);
|
||||
@ -591,7 +586,7 @@ describe('Delete and undo delete', () => {
|
||||
expect(message).toContain(`Deleted 2 items`);
|
||||
expect(await dataTable.getRowByName(recentFile2).isPresent()).toBe(false, `${recentFile2} was not removed from list`);
|
||||
expect(await dataTable.getRowByName(recentFile3).isPresent()).toBe(false, `${recentFile3} was not removed from list`);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(recentFile2).isPresent()).toBe(true, `${recentFile2} is not in trash`);
|
||||
expect(await dataTable.getRowByName(recentFile3).isPresent()).toBe(true, `${recentFile3} is not in trash`);
|
||||
|
||||
@ -620,7 +615,7 @@ describe('Delete and undo delete', () => {
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Delete');
|
||||
await page.clickSnackBarAction();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(recentFile2).isPresent()).toBe(false, 'Item is in Trash');
|
||||
});
|
||||
|
||||
@ -633,7 +628,7 @@ describe('Delete and undo delete', () => {
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Delete');
|
||||
await page.clickSnackBarAction();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.getRowByName(recentFile3).isPresent()).toBe(false, `${recentFile3} is in Trash`);
|
||||
expect(await dataTable.getRowByName(recentFile4).isPresent()).toBe(false, `${recentFile4} is in Trash`);
|
||||
});
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { protractor, browser } from 'protractor';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SIDEBAR_LABELS, SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { CreateOrEditFolderDialog } from '../../components/dialog/create-edit-folder-dialog';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
@ -52,10 +52,10 @@ describe('Edit folder', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const personalFilesPage = new BrowsingPage();
|
||||
const page = new BrowsingPage();
|
||||
const editDialog = new CreateOrEditFolderDialog();
|
||||
const { dataTable } = personalFilesPage;
|
||||
const editButton = personalFilesPage.toolbar.getButtonByTitleAttribute('Edit');
|
||||
const { dataTable } = page;
|
||||
const editButton = page.toolbar.getButtonByTitleAttribute('Edit');
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await apis.admin.people.createUser({ username });
|
||||
@ -74,8 +74,7 @@ describe('Edit folder', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(parent);
|
||||
await dataTable.waitForHeader();
|
||||
done();
|
||||
@ -164,7 +163,7 @@ describe('Edit folder', () => {
|
||||
await editDialog.waitForDialogToOpen();
|
||||
await editDialog.enterName(duplicateFolderName);
|
||||
await editDialog.clickUpdate();
|
||||
const message = await personalFilesPage.getSnackBarMessage();
|
||||
const message = await page.getSnackBarMessage();
|
||||
expect(message).toEqual(`There's already a folder with this name. Try a different name.`);
|
||||
expect(await editDialog.component.isPresent()).toBe(true, 'dialog is not present');
|
||||
});
|
||||
@ -175,7 +174,7 @@ describe('Edit folder', () => {
|
||||
await editDialog.nameInput.sendKeys(' ');
|
||||
await editDialog.clickUpdate();
|
||||
await editDialog.waitForDialogToClose();
|
||||
expect(await personalFilesPage.snackBar.isPresent()).not.toBe(true, 'notification appears');
|
||||
expect(await page.snackBar.isPresent()).not.toBe(true, 'notification appears');
|
||||
expect(await dataTable.getRowByName(folderName).isPresent()).toBe(true, 'Folder not displayed in list view');
|
||||
});
|
||||
});
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SIDEBAR_LABELS, SITE_VISIBILITY } from '../../configs';
|
||||
import { SITE_VISIBILITY } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -101,8 +101,7 @@ describe('Mark items as favorites', () => {
|
||||
describe('on Personal Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -208,8 +207,7 @@ describe('Mark items as favorites', () => {
|
||||
describe('on Recent Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -290,8 +288,7 @@ describe('Mark items as favorites', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -368,8 +365,7 @@ describe('Mark items as favorites', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.refresh();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -413,8 +409,7 @@ describe('Mark items as favorites', () => {
|
||||
describe ('on File Libraries', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await page.dataTable.doubleClickOnRowByName(siteName);
|
||||
await page.dataTable.waitForHeader();
|
||||
done();
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { ConfirmDialog } from './../../components/components';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -48,8 +47,8 @@ describe('Permanently delete from Trash', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const trashPage = new BrowsingPage();
|
||||
const { dataTable, toolbar } = trashPage;
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable, toolbar } = page;
|
||||
|
||||
const confirmDialog = new ConfirmDialog();
|
||||
|
||||
@ -65,8 +64,7 @@ describe('Permanently delete from Trash', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await trashPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -81,11 +79,11 @@ describe('Permanently delete from Trash', () => {
|
||||
it('delete file - [C217091]', async () => {
|
||||
await dataTable.selectItem(file1);
|
||||
await toolbar.getButtonByTitleAttribute('Permanently delete').click();
|
||||
await trashPage.waitForDialog();
|
||||
await page.waitForDialog();
|
||||
// await trashPage.getDialogActionByLabel('Delete').click();
|
||||
// await trashPage.waitForDialogToClose();
|
||||
await confirmDialog.clickButton('Delete');
|
||||
const text = await trashPage.getSnackBarMessage();
|
||||
const text = await page.getSnackBarMessage();
|
||||
|
||||
expect(text).toEqual(`${file1} deleted`);
|
||||
expect(await dataTable.getRowByName(file1).isPresent()).toBe(false, 'Item was not deleted');
|
||||
@ -94,11 +92,11 @@ describe('Permanently delete from Trash', () => {
|
||||
it('delete folder - [C280416]', async () => {
|
||||
await dataTable.selectItem(folder1);
|
||||
await toolbar.getButtonByTitleAttribute('Permanently delete').click();
|
||||
await trashPage.waitForDialog();
|
||||
await page.waitForDialog();
|
||||
// await trashPage.getDialogActionByLabel('Delete').click();
|
||||
// await trashPage.waitForDialogToClose();
|
||||
await confirmDialog.clickButton('Delete');
|
||||
const text = await trashPage.getSnackBarMessage();
|
||||
const text = await page.getSnackBarMessage();
|
||||
|
||||
expect(text).toEqual(`${folder1} deleted`);
|
||||
expect(await dataTable.getRowByName(folder1).isPresent()).toBe(false, 'Item was not deleted');
|
||||
@ -107,11 +105,11 @@ describe('Permanently delete from Trash', () => {
|
||||
it('delete multiple items - [C280417]', async () => {
|
||||
await dataTable.selectMultipleItems([ file2, folder2 ]);
|
||||
await toolbar.getButtonByTitleAttribute('Permanently delete').click();
|
||||
await trashPage.waitForDialog();
|
||||
await page.waitForDialog();
|
||||
// await trashPage.getDialogActionByLabel('Delete').click();
|
||||
// await trashPage.waitForDialogToClose();
|
||||
await confirmDialog.clickButton('Delete');
|
||||
const text = await trashPage.getSnackBarMessage();
|
||||
const text = await page.getSnackBarMessage();
|
||||
|
||||
expect(text).toEqual(`2 items deleted`);
|
||||
expect(await dataTable.getRowByName(file2).isPresent()).toBe(false, 'Item was not deleted');
|
||||
@ -121,7 +119,7 @@ describe('Permanently delete from Trash', () => {
|
||||
it('Confirmation dialog UI - [C269113]', async () => {
|
||||
await dataTable.selectItem(file3);
|
||||
await toolbar.getButtonByTitleAttribute('Permanently delete').click();
|
||||
await trashPage.waitForDialog();
|
||||
await page.waitForDialog();
|
||||
|
||||
expect(await confirmDialog.isDialogOpen()).toBe(true, 'Confirm delete dialog not open');
|
||||
expect(await confirmDialog.getTitle()).toContain('Delete from trash');
|
||||
@ -136,7 +134,7 @@ describe('Permanently delete from Trash', () => {
|
||||
it('Keep action cancels the deletion - [C269115]', async () => {
|
||||
await dataTable.selectItem(file3);
|
||||
await toolbar.getButtonByTitleAttribute('Permanently delete').click();
|
||||
await trashPage.waitForDialog();
|
||||
await page.waitForDialog();
|
||||
|
||||
expect(await confirmDialog.isButtonEnabled('Keep')).toBe(true, 'KEEP button is not enabled');
|
||||
await confirmDialog.clickButton('Keep');
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { APP_ROUTES, SIDEBAR_LABELS } from '../../configs';
|
||||
import { APP_ROUTES } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -50,7 +50,7 @@ describe('Restore from Trash', () => {
|
||||
|
||||
afterAll(async (done) => {
|
||||
await Promise.all([
|
||||
apis.admin.trashcan.emptyTrash(),
|
||||
apis.user.trashcan.emptyTrash(),
|
||||
logoutPage.load()
|
||||
]);
|
||||
done();
|
||||
@ -72,8 +72,7 @@ describe('Restore from Trash', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -89,8 +88,7 @@ describe('Restore from Trash', () => {
|
||||
expect(text).toContain(`${file} restored`);
|
||||
expect(text).toContain(`View`);
|
||||
expect(await dataTable.getRowByName(file).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
expect(await page.dataTable.getRowByName(file).isPresent()).toBe(true, 'Item not displayed in list');
|
||||
|
||||
await apis.user.nodes.deleteNodeById(fileId, false);
|
||||
@ -103,8 +101,7 @@ describe('Restore from Trash', () => {
|
||||
expect(text).toContain(`${folder} restored`);
|
||||
expect(text).toContain(`View`);
|
||||
expect(await dataTable.getRowByName(folder).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
expect(await page.dataTable.getRowByName(folder).isPresent()).toBe(true, 'Item not displayed in list');
|
||||
|
||||
await apis.user.nodes.deleteNodeById(folderId, false);
|
||||
@ -118,8 +115,7 @@ describe('Restore from Trash', () => {
|
||||
expect(text).not.toContain(`View`);
|
||||
expect(await dataTable.getRowByName(file).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
expect(await dataTable.getRowByName(folder).isPresent()).toBe(false, 'Item was not removed from list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
expect(await page.dataTable.getRowByName(file).isPresent()).toBe(true, 'Item not displayed in list');
|
||||
expect(await page.dataTable.getRowByName(folder).isPresent()).toBe(true, 'Item not displayed in list');
|
||||
|
||||
@ -164,8 +160,7 @@ describe('Restore from Trash', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -178,7 +173,7 @@ describe('Restore from Trash', () => {
|
||||
});
|
||||
|
||||
it('Restore a file when another file with same name exists on the restore location - [C217178]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrashAndWait();
|
||||
await dataTable.selectItem(file1);
|
||||
await toolbar.getButtonByTitleAttribute('Restore').click();
|
||||
const text = await page.getSnackBarMessage();
|
||||
@ -186,7 +181,7 @@ describe('Restore from Trash', () => {
|
||||
});
|
||||
|
||||
it('Restore a file when original location no longer exists - [C217179]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrashAndWait();
|
||||
await dataTable.selectItem(file2);
|
||||
await toolbar.getButtonByTitleAttribute('Restore').click();
|
||||
const text = await page.getSnackBarMessage();
|
||||
@ -239,8 +234,7 @@ describe('Restore from Trash', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SIDEBAR_LABELS, SITE_VISIBILITY } from '../../configs';
|
||||
import { SITE_VISIBILITY } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { ShareDialog } from '../../components/dialog/share-dialog';
|
||||
import { Viewer } from '../../components/viewer/viewer';
|
||||
@ -97,8 +97,7 @@ describe('Share a file', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(parent);
|
||||
await dataTable.waitForHeader();
|
||||
done();
|
||||
@ -164,7 +163,7 @@ describe('Share a file', () => {
|
||||
expect(url).toContain(sharedId);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file3).isPresent()).toBe(true, `${file3} is not in the Shared files list`);
|
||||
});
|
||||
|
||||
@ -268,7 +267,7 @@ describe('Share a file', () => {
|
||||
expect(url).toContain(sharedId);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file9).isPresent()).toBe(true, `${file9} is not in the Shared files list`);
|
||||
});
|
||||
});
|
||||
@ -309,8 +308,7 @@ describe('Share a file', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.doubleClickOnRowByName(parentInSite);
|
||||
@ -370,7 +368,7 @@ describe('Share a file', () => {
|
||||
expect(url).toContain(sharedId);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file3).isPresent()).toBe(true, `${file3} is not in the Shared files list`);
|
||||
});
|
||||
|
||||
@ -474,7 +472,7 @@ describe('Share a file', () => {
|
||||
expect(url).toContain(sharedId);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file9).isPresent()).toBe(true, `${file9} is not in the Shared files list`);
|
||||
});
|
||||
});
|
||||
@ -509,8 +507,7 @@ describe('Share a file', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.refresh();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -574,7 +571,7 @@ describe('Share a file', () => {
|
||||
expect(url).toContain(sharedId);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file3).isPresent()).toBe(true, `${file3} is not in the Shared files list`);
|
||||
});
|
||||
|
||||
@ -678,7 +675,7 @@ describe('Share a file', () => {
|
||||
expect(url).toContain(sharedId);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file9).isPresent()).toBe(true, `${file9} is not in the Shared files list`);
|
||||
});
|
||||
});
|
||||
@ -715,8 +712,7 @@ describe('Share a file', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.refresh();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -890,8 +886,7 @@ describe('Share a file', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -955,7 +950,7 @@ describe('Share a file', () => {
|
||||
expect(url).toContain(sharedId);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file3).isPresent()).toBe(true, `${file3} is not in the Shared files list`);
|
||||
});
|
||||
|
||||
@ -1059,7 +1054,7 @@ describe('Share a file', () => {
|
||||
expect(url).toContain(sharedId);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file9).isPresent()).toBe(true, `${file9} is not in the Shared files list`);
|
||||
});
|
||||
});
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Viewer } from '../../components/viewer/viewer';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -87,8 +86,7 @@ describe('Single click on item name', () => {
|
||||
});
|
||||
|
||||
it('Hyperlink does not appear for items in the Trash - [C284899]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
|
||||
expect(await dataTable.hasLinkOnName(deletedFile1)).toBe(false, 'Link on name is present');
|
||||
expect(await dataTable.hasLinkOnName(deletedFolder1)).toBe(false, 'Link on name is present');
|
||||
@ -96,8 +94,7 @@ describe('Single click on item name', () => {
|
||||
|
||||
describe('on Personal Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -122,8 +119,7 @@ describe('Single click on item name', () => {
|
||||
|
||||
describe('on File Libraries', () => {
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -141,8 +137,7 @@ describe('Single click on item name', () => {
|
||||
|
||||
describe('on Shared Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -161,8 +156,7 @@ describe('Single click on item name', () => {
|
||||
|
||||
describe('on Recent Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -181,8 +175,7 @@ describe('Single click on item name', () => {
|
||||
|
||||
describe('on Favorites', () => {
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS, FILES } from '../../configs';
|
||||
import { SITE_VISIBILITY, SITE_ROLES, FILES } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { Viewer } from '../../components/viewer/viewer';
|
||||
@ -112,8 +112,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280476]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
@ -129,8 +128,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Shared Files - [C280477]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
expect(await toolbar.isButtonPresent('View')).toBe(false, `View is displayed for selected files`);
|
||||
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for selected files`);
|
||||
@ -144,8 +142,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C280478]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
expect(await toolbar.isButtonPresent('View')).toBe(false, `View is displayed for selected files`);
|
||||
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for selected files`);
|
||||
@ -167,8 +164,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280455]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectItem(file1);
|
||||
@ -186,8 +182,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Shared Files - [C280456]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await page.dataTable.selectItem(file1);
|
||||
expect(await toolbar.isButtonPresent('View')).toBe(true, `View is not displayed for ${file1}`);
|
||||
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${file1}`);
|
||||
@ -203,8 +198,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C213121]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectItem(file1);
|
||||
expect(await toolbar.isButtonPresent('View')).toBe(true, `View is not displayed for ${file1}`);
|
||||
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${file1}`);
|
||||
@ -227,8 +221,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280444]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectItem(folder1);
|
||||
@ -246,8 +239,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C286266]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectItem(folder1);
|
||||
expect(await toolbar.isButtonPresent('View')).toBe(false, `View is not displayed for ${folder1}`);
|
||||
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${folder1}`);
|
||||
@ -272,8 +264,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280464]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
@ -289,8 +280,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Shared Files - [C286284]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
expect(await toolbar.isButtonPresent('View')).toBe(false, `View is displayed for selected files`);
|
||||
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for selected files`);
|
||||
@ -304,8 +294,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C286285]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
expect(await toolbar.isButtonPresent('View')).toBe(false, `View is displayed for selected files`);
|
||||
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for selected files`);
|
||||
@ -328,8 +317,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280465]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectMultipleItems([folder1, folder2]);
|
||||
@ -345,8 +333,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C286286]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectMultipleItems([folder1, folder2]);
|
||||
expect(await toolbar.isButtonPresent('View')).toBe(false, `View is displayed for selected files`);
|
||||
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for selected files`);
|
||||
@ -369,8 +356,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280466]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectMultipleItems([file1, folder1]);
|
||||
@ -386,8 +372,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C286287]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectMultipleItems([file1, folder1]);
|
||||
expect(await toolbar.isButtonPresent('View')).toBe(false, `View is displayed for selected files`);
|
||||
expect(await toolbar.isButtonPresent('Download')).toBe(true, `Download is not displayed for selected files`);
|
||||
@ -409,8 +394,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280599]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.rightClickOnItem(file1);
|
||||
@ -428,8 +412,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Shared Files - [C286264]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.rightClickOnItem(file1);
|
||||
expect(await contextMenu.isMenuItemPresent('Download')).toBe(true, `Download is not displayed for ${file1}`);
|
||||
expect(await contextMenu.isMenuItemPresent('View')).toBe(true, `View is not displayed for ${file1}`);
|
||||
@ -446,8 +429,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C286262]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.rightClickOnItem(file1);
|
||||
expect(await contextMenu.isMenuItemPresent('Download')).toBe(true, `Download is not displayed for ${file1}`);
|
||||
expect(await contextMenu.isMenuItemPresent('View')).toBe(true, `View is not displayed for ${file1}`);
|
||||
@ -472,8 +454,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280600]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.rightClickOnItem(folder1);
|
||||
@ -490,8 +471,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C286263]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.rightClickOnItem(folder1);
|
||||
expect(await contextMenu.isMenuItemPresent('Download')).toBe(true, `Download is not enabled for ${folder1}`);
|
||||
// enable when ACA-1737 is done
|
||||
@ -517,8 +497,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280647]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
@ -533,8 +512,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Shared Files - [C286283]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
await dataTable.rightClickOnMultipleSelection();
|
||||
expect(await contextMenu.isMenuItemPresent('View')).toBe(false, 'View is displayed');
|
||||
@ -547,8 +525,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C286280]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectMultipleItems([file1, file2]);
|
||||
await dataTable.rightClickOnMultipleSelection();
|
||||
expect(await contextMenu.isMenuItemPresent('View')).toBe(false, 'View is displayed');
|
||||
@ -570,8 +547,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280666]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectMultipleItems([folder1, folder2]);
|
||||
@ -586,8 +562,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C286281]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectMultipleItems([folder1, folder2]);
|
||||
await dataTable.rightClickOnMultipleSelection();
|
||||
expect(await contextMenu.isMenuItemPresent('View')).toBe(false, 'View is displayed');
|
||||
@ -609,8 +584,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - [C280669]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectMultipleItems([file1, folder1]);
|
||||
@ -625,8 +599,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - [C286282]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectMultipleItems([file1, folder1]);
|
||||
await dataTable.rightClickOnMultipleSelection();
|
||||
expect(await contextMenu.isMenuItemPresent('View')).toBe(false, 'View is displayed');
|
||||
@ -647,8 +620,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('file from File Libraries - [C268128]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.doubleClickOnRowByName(docxFile);
|
||||
@ -672,8 +644,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('file from Shared Files - [C286310]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(docxFile);
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
|
||||
@ -694,8 +665,7 @@ describe('Granular permissions available actions : ', () => {
|
||||
});
|
||||
|
||||
it('file from Favorites - [C286311]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(docxFile);
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { browser, protractor } from 'protractor';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SITE_VISIBILITY, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -116,8 +116,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
describe('Personal Files', () => {
|
||||
beforeEach(async done => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -187,10 +186,8 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
|
||||
describe('File Libraries', () => {
|
||||
beforeEach(async done => {
|
||||
// await browser.actions().mouseMove(browser.$('body'), { x: 0, y: 0 }).click().perform();
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.clearSelection();
|
||||
@ -238,8 +235,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
beforeEach(async done => {
|
||||
// await browser.actions().mouseMove(browser.$('body'), { x: 0, y: 0 }).click().perform();
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -259,10 +255,8 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
|
||||
describe('Recent Files', () => {
|
||||
beforeEach(async done => {
|
||||
// await browser.actions().mouseMove(browser.$('body'), { x: 0, y: 0 }).click().perform();
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -284,8 +278,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
beforeEach(async done => {
|
||||
// await browser.actions().mouseMove(browser.$('body'), { x: 0, y: 0 }).click().perform();
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -330,8 +323,7 @@ describe('Toolbar actions - multiple selection : ', () => {
|
||||
describe('Trash', () => {
|
||||
beforeEach(async done => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SITE_VISIBILITY, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -93,15 +93,13 @@ describe('Toolbar actions - single selection : ', () => {
|
||||
|
||||
describe('General tests', () => {
|
||||
it('actions not displayed for top level of File Libraries - [C213135]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.selectItem(siteName);
|
||||
expect(await toolbar.isEmpty()).toBe(true, 'toolbar not empty');
|
||||
});
|
||||
|
||||
it('selected row is marked with a check circle icon - [C213134]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.selectItem(fileUser);
|
||||
expect(await dataTable.hasCheckMarkIcon(fileUser)).toBe(true, 'check mark missing');
|
||||
});
|
||||
@ -110,8 +108,7 @@ describe('Toolbar actions - single selection : ', () => {
|
||||
describe('Personal Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -152,8 +149,7 @@ describe('Toolbar actions - single selection : ', () => {
|
||||
describe('File Libraries', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.clearSelection();
|
||||
@ -196,8 +192,7 @@ describe('Toolbar actions - single selection : ', () => {
|
||||
describe('Shared Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -225,8 +220,7 @@ describe('Toolbar actions - single selection : ', () => {
|
||||
describe('Recent Files', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -253,8 +247,7 @@ describe('Toolbar actions - single selection : ', () => {
|
||||
describe('Favorites', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -295,8 +288,7 @@ describe('Toolbar actions - single selection : ', () => {
|
||||
describe('Trash', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
await dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SIDEBAR_LABELS, SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { ShareDialog } from '../../components/dialog/share-dialog';
|
||||
import { ConfirmDialog } from '../../components/dialog/confirm-dialog';
|
||||
@ -88,8 +88,7 @@ describe('Unshare a file', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.refresh();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(parent);
|
||||
await dataTable.waitForHeader();
|
||||
done();
|
||||
@ -140,7 +139,7 @@ describe('Unshare a file', () => {
|
||||
expect(await apis.user.nodes.isFileShared(file2Id)).toBe(false, `${file2} is shared`);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file2).isPresent()).toBe(false, `${file2} is in the Shared files list`);
|
||||
|
||||
await browser.get(url);
|
||||
@ -182,7 +181,7 @@ describe('Unshare a file', () => {
|
||||
expect(await apis.user.nodes.isFileShared(file4Id)).toBe(false, `${file4} is shared`);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file4).isPresent()).toBe(false, `${file4} is in the Shared files list`);
|
||||
|
||||
await browser.get(url);
|
||||
@ -222,8 +221,7 @@ describe('Unshare a file', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.refresh();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.doubleClickOnRowByName(parentInSite);
|
||||
@ -273,7 +271,7 @@ describe('Unshare a file', () => {
|
||||
expect(await apis.user.nodes.isFileShared(file2Id)).toBe(false, `${file2} is shared`);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file2).isPresent()).toBe(false, `${file2} is in the Shared files list`);
|
||||
|
||||
await browser.get(url);
|
||||
@ -315,7 +313,7 @@ describe('Unshare a file', () => {
|
||||
expect(await apis.user.nodes.isFileShared(file4Id)).toBe(false, `${file4} is shared`);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file4).isPresent()).toBe(false, `${file4} is in the Shared files list`);
|
||||
|
||||
await browser.get(url);
|
||||
@ -348,8 +346,7 @@ describe('Unshare a file', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.refresh();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -398,7 +395,7 @@ describe('Unshare a file', () => {
|
||||
expect(await apis.user.nodes.isFileShared(file2Id)).toBe(false, `${file2} is shared`);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file2).isPresent()).toBe(false, `${file2} is in the Shared files list`);
|
||||
|
||||
await browser.get(url);
|
||||
@ -440,7 +437,7 @@ describe('Unshare a file', () => {
|
||||
expect(await apis.user.nodes.isFileShared(file4Id)).toBe(false, `${file4} is shared`);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file4).isPresent()).toBe(false, `${file4} is in the Shared files list`);
|
||||
|
||||
await browser.get(url);
|
||||
@ -473,8 +470,7 @@ describe('Unshare a file', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.refresh();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -603,8 +599,7 @@ describe('Unshare a file', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.refresh();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -653,7 +648,7 @@ describe('Unshare a file', () => {
|
||||
expect(await apis.user.nodes.isFileShared(file2Id)).toBe(false, `${file2} is shared`);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file2).isPresent()).toBe(false, `${file2} is in the Shared files list`);
|
||||
|
||||
await browser.get(url);
|
||||
@ -695,7 +690,7 @@ describe('Unshare a file', () => {
|
||||
expect(await apis.user.nodes.isFileShared(file4Id)).toBe(false, `${file4} is shared`);
|
||||
|
||||
// TODO: disable check cause api is slow to update
|
||||
// await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
// await page.clickSharedFiles();
|
||||
// expect(await dataTable.getRowByName(file4).isPresent()).toBe(false, `${file4} is in the Shared files list`);
|
||||
|
||||
await browser.get(url);
|
||||
@ -749,8 +744,7 @@ describe('Unshare a file', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - file shared by other user - [C286682]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(sitePrivate);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectItem(file1);
|
||||
@ -762,8 +756,7 @@ describe('Unshare a file', () => {
|
||||
});
|
||||
|
||||
it('on File Libraries - file shared by the user - [C286701]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(sitePrivate);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.selectItem(file2);
|
||||
@ -775,8 +768,7 @@ describe('Unshare a file', () => {
|
||||
});
|
||||
|
||||
it('on Shared Files - file shared by other user - [C286687]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.selectItem(file1);
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Shared link settings');
|
||||
@ -786,8 +778,7 @@ describe('Unshare a file', () => {
|
||||
});
|
||||
|
||||
it('on Shared Files - file shared by the user - [C286702]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.selectItem(file1);
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Shared link settings');
|
||||
@ -797,8 +788,7 @@ describe('Unshare a file', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - file shared by other user - [C286697]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectItem(file1);
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Share');
|
||||
@ -808,8 +798,7 @@ describe('Unshare a file', () => {
|
||||
});
|
||||
|
||||
it('on Favorites - file shared by the user - [C286703]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.selectItem(file1);
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Share');
|
||||
|
@ -23,9 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// import { browser, protractor, promise } from 'protractor';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -53,8 +51,7 @@ describe('Upload files', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -121,8 +121,7 @@ describe('Page titles', () => {
|
||||
});
|
||||
|
||||
it('File Preview page - [C280415]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await page.dataTable.doubleClickOnRowByName(file);
|
||||
expect(await browser.getTitle()).toContain(PAGE_TITLES.VIEWER);
|
||||
await Utils.pressEscape();
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { EXTENSIBILITY_CONFIGS, SIDEBAR_LABELS } from '../../configs';
|
||||
import { EXTENSIBILITY_CONFIGS } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
@ -53,8 +53,8 @@ describe('Extensions - Context submenu', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const personalFilesPage = new BrowsingPage();
|
||||
const {dataTable} = personalFilesPage;
|
||||
const page = new BrowsingPage();
|
||||
const {dataTable} = page;
|
||||
const contextMenu = dataTable.menu;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
@ -72,8 +72,7 @@ describe('Extensions - Context submenu', () => {
|
||||
beforeEach(async (done) => {
|
||||
await Utils.pressEscape();
|
||||
await dataTable.clearSelection();
|
||||
await personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { BrowsingPage, LoginPage, LogoutPage } from '../../pages/pages';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { EXTENSIBILITY_CONFIGS, SIDEBAR_LABELS } from '../../configs';
|
||||
import { EXTENSIBILITY_CONFIGS } from '../../configs';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
describe('Extensions - DocumentList presets', () => {
|
||||
@ -64,8 +64,8 @@ describe('Extensions - DocumentList presets', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const personalFilesPage = new BrowsingPage();
|
||||
const { dataTable } = personalFilesPage;
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable } = page;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await apis.admin.people.createUser({ username });
|
||||
@ -79,9 +79,7 @@ describe('Extensions - DocumentList presets', () => {
|
||||
});
|
||||
|
||||
beforeEach(async done => {
|
||||
await personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { InfoDrawer } from './../../components/info-drawer/info-drawer';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { SIDEBAR_LABELS, EXTENSIBILITY_CONFIGS } from '../../configs';
|
||||
import { EXTENSIBILITY_CONFIGS } from '../../configs';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
describe('Extensions - Info Drawer', () => {
|
||||
@ -88,8 +88,7 @@ describe('Extensions - Info Drawer', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await page.dataTable.clearSelection();
|
||||
done();
|
||||
});
|
||||
@ -151,8 +150,7 @@ describe('Extensions - Info Drawer', () => {
|
||||
await loginPage.load();
|
||||
await Utils.setSessionStorageFromConfig('"aca.extension.config"', EXTENSIBILITY_CONFIGS.INFO_DRAWER_EMPTY);
|
||||
await loginPage.loginWith(username);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Viewer } from './../../components/components';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { SIDEBAR_LABELS, EXTENSIBILITY_CONFIGS, FILES } from '../../configs';
|
||||
import { EXTENSIBILITY_CONFIGS, FILES } from '../../configs';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
|
||||
describe('Extensions - Viewer', () => {
|
||||
@ -96,8 +96,7 @@ describe('Extensions - Viewer', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -54,41 +53,41 @@ describe('Empty list views', () => {
|
||||
});
|
||||
|
||||
it('empty Personal Files - [C280131]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.clickPersonalFiles();
|
||||
expect(await dataTable.isEmptyList()).toBe(true, 'list is not empty');
|
||||
expect(await dataTable.getEmptyDragAndDropText()).toContain('Drag and drop');
|
||||
});
|
||||
|
||||
it('empty File Libraries - [C217099]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await page.clickFileLibraries();
|
||||
expect(await dataTable.isEmptyList()).toBe(true, 'list is not empty');
|
||||
expect(await dataTable.getEmptyStateTitle()).toContain(`You aren't a member of any File Libraries yet`);
|
||||
expect(await dataTable.getEmptyStateSubtitle()).toContain('Join libraries to upload, view, and share files.');
|
||||
});
|
||||
|
||||
it('empty Shared Files - [C280132]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await page.clickSharedFiles();
|
||||
expect(await dataTable.isEmptyList()).toBe(true, 'list is not empty');
|
||||
expect(await dataTable.getEmptyStateTitle()).toContain('No shared files or folders');
|
||||
expect(await dataTable.getEmptyStateSubtitle()).toContain('Items you share using the Share option are shown here.');
|
||||
});
|
||||
|
||||
it('empty Recent Files - [C213169]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES)
|
||||
await page.clickRecentFiles();
|
||||
expect(await dataTable.isEmptyList()).toBe(true, 'list is not empty');
|
||||
expect(await dataTable.getEmptyStateTitle()).toContain('No recent files');
|
||||
expect(await dataTable.getEmptyStateSubtitle()).toContain('Items you upload or edit in the last 30 days are shown here.');
|
||||
});
|
||||
|
||||
it('empty Favorites - [C280133]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await page.clickFavorites();
|
||||
expect(await dataTable.isEmptyList()).toBe(true, 'list is not empty');
|
||||
expect(await dataTable.getEmptyStateTitle()).toContain('No favorite files or folders');
|
||||
expect(await dataTable.getEmptyStateSubtitle()).toContain('Favorite items that you want to easily find later.');
|
||||
});
|
||||
|
||||
it('empty Trash - [C280134]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await dataTable.isEmptyList()).toBe(true, 'list is not empty');
|
||||
expect(await dataTable.getEmptyStateTitle()).toContain('Trash is empty');
|
||||
expect(await dataTable.getEmptyStateText()).toContain('Items you delete are moved to the Trash.');
|
||||
|
@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -46,8 +46,8 @@ describe('Favorites', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const favoritesPage = new BrowsingPage();
|
||||
const { dataTable, breadcrumb } = favoritesPage;
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable, breadcrumb } = page;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await apis.admin.people.createUser({ username });
|
||||
@ -77,15 +77,14 @@ describe('Favorites', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await favoritesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await apis.admin.sites.deleteSite(siteName);
|
||||
await apis.user.nodes.deleteNodes([ favFolderName, parentFolder ]);
|
||||
await apis.admin.trashcan.emptyTrash();
|
||||
await apis.user.trashcan.emptyTrash();
|
||||
await logoutPage.load();
|
||||
done();
|
||||
});
|
||||
|
@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -49,8 +49,8 @@ describe('File Libraries', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const fileLibrariesPage = new BrowsingPage();
|
||||
const { dataTable } = fileLibrariesPage;
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable } = page;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await apis.admin.people.createUser({ username });
|
||||
@ -71,8 +71,7 @@ describe('File Libraries', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await fileLibrariesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -67,8 +66,7 @@ describe('Generic errors', () => {
|
||||
});
|
||||
|
||||
it('File / folder not found - [C217313]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(parent);
|
||||
await dataTable.doubleClickOnRowByName(file1);
|
||||
const URL = await browser.getCurrentUrl();
|
||||
@ -88,8 +86,7 @@ describe('Generic errors', () => {
|
||||
});
|
||||
|
||||
it('Permission denied - [C217314]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(parent);
|
||||
await dataTable.doubleClickOnRowByName(file2);
|
||||
const URL = await browser.getCurrentUrl();
|
||||
|
@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -39,10 +39,8 @@ describe('Special permissions', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const recentFilesPage = new BrowsingPage();
|
||||
const favoritesPage = new BrowsingPage();
|
||||
const sharedPage = new BrowsingPage();
|
||||
const { dataTable } = recentFilesPage;
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable } = page;
|
||||
|
||||
xit('');
|
||||
|
||||
@ -86,29 +84,26 @@ describe('Special permissions', () => {
|
||||
});
|
||||
|
||||
it('on Recent Files - [C213173]', async () => {
|
||||
await recentFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
||||
await apis.admin.sites.deleteSiteMember(sitePrivate, username);
|
||||
await recentFilesPage.refresh();
|
||||
await page.refresh();
|
||||
expect(await dataTable.countRows()).toBe(0, 'Incorrect number of items');
|
||||
});
|
||||
|
||||
it('on Favorites - [C213227]', async () => {
|
||||
await favoritesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
||||
await apis.admin.sites.deleteSiteMember(sitePrivate, username);
|
||||
await favoritesPage.refresh();
|
||||
await page.refresh();
|
||||
expect(await dataTable.countRows()).toBe(0, 'Incorrect number of items');
|
||||
});
|
||||
|
||||
it('on Shared Files - [C213116]', async () => {
|
||||
await sharedPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
||||
await apis.admin.sites.deleteSiteMember(sitePrivate, username);
|
||||
await sharedPage.refresh();
|
||||
await page.refresh();
|
||||
expect(await dataTable.countRows()).toBe(0, 'Incorrect number of items');
|
||||
});
|
||||
});
|
||||
@ -141,22 +136,19 @@ describe('Special permissions', () => {
|
||||
});
|
||||
|
||||
it(`on Recent Files - [C213178]`, async () => {
|
||||
await recentFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
||||
expect(await dataTable.getItemLocation(fileName)).toEqual('');
|
||||
});
|
||||
|
||||
it(`on Favorites - [C213672]`, async () => {
|
||||
await favoritesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
||||
expect(await dataTable.getItemLocation(fileName)).toEqual('');
|
||||
});
|
||||
|
||||
it(`on Shared Files - [C213668]`, async () => {
|
||||
await sharedPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
expect(await dataTable.countRows()).toBe(1, 'Incorrect number of items');
|
||||
expect(await dataTable.getItemLocation(fileName)).toEqual('');
|
||||
});
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { SIDEBAR_LABELS, APP_ROUTES } from '../../configs';
|
||||
import { APP_ROUTES } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -40,8 +40,8 @@ describe('Personal Files', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const personalFilesPage = new BrowsingPage();
|
||||
const { dataTable } = personalFilesPage;
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable } = page;
|
||||
|
||||
const adminFolder = `admin-folder-${Utils.random()}`;
|
||||
|
||||
@ -75,8 +75,7 @@ describe('Personal Files', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -98,8 +97,7 @@ describe('Personal Files', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -138,20 +136,20 @@ describe('Personal Files', () => {
|
||||
});
|
||||
|
||||
it('redirects to Personal Files on clicking the link from sidebar - [C213245]', async () => {
|
||||
await personalFilesPage.dataTable.doubleClickOnRowByName(userFolder);
|
||||
await personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.doubleClickOnRowByName(userFolder);
|
||||
await page.clickPersonalFiles();
|
||||
const url = await browser.getCurrentUrl();
|
||||
expect(url.endsWith(APP_ROUTES.PERSONAL_FILES)).toBe(true, 'incorrect url');
|
||||
});
|
||||
|
||||
it('page loads correctly after browser refresh - [C213246]', async () => {
|
||||
await personalFilesPage.refresh();
|
||||
await page.refresh();
|
||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.PERSONAL_FILES);
|
||||
});
|
||||
|
||||
it('page load by URL - [C213247]', async () => {
|
||||
const url = await browser.getCurrentUrl();
|
||||
await personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
await browser.get(url);
|
||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.PERSONAL_FILES);
|
||||
});
|
||||
|
@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SITE_VISIBILITY, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -47,8 +47,8 @@ describe('Recent Files', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const recentFilesPage = new BrowsingPage();
|
||||
const { dataTable, breadcrumb } = recentFilesPage;
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable, breadcrumb } = page;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await apis.admin.people.createUser({ username });
|
||||
@ -70,15 +70,14 @@ describe('Recent Files', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await recentFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await apis.user.nodes.deleteNodesById([ folderId, file2Id ]);
|
||||
await apis.user.sites.deleteSite(siteName);
|
||||
await apis.admin.trashcan.emptyTrash();
|
||||
await apis.user.trashcan.emptyTrash();
|
||||
await logoutPage.load();
|
||||
done();
|
||||
});
|
||||
|
@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -48,8 +48,8 @@ describe('Shared Files', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const sharedFilesPage = new BrowsingPage();
|
||||
const { dataTable, breadcrumb } = sharedFilesPage;
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable, breadcrumb } = page;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await apis.admin.people.createUser({ username });
|
||||
@ -76,8 +76,7 @@ describe('Shared Files', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await sharedFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -92,7 +91,7 @@ describe('File / folder tooltips', () => {
|
||||
|
||||
describe('on Personal Files', () => {
|
||||
beforeAll(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(parent);
|
||||
done();
|
||||
});
|
||||
@ -133,7 +132,7 @@ describe('File / folder tooltips', () => {
|
||||
describe('on Recent Files', () => {
|
||||
beforeAll(async (done) => {
|
||||
await apis.user.search.waitForApi(username, { expect: 8 });
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -174,7 +173,7 @@ describe('File / folder tooltips', () => {
|
||||
xdescribe('on Shared Files', () => {
|
||||
beforeAll(async (done) => {
|
||||
await apis.user.shared.waitForApi({ expect: 8 });
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -213,8 +212,7 @@ describe('File / folder tooltips', () => {
|
||||
|
||||
describe('on Favorites', () => {
|
||||
beforeAll(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -271,8 +269,7 @@ describe('File / folder tooltips', () => {
|
||||
file1TrashId, file2TrashId, file3TrashId, file4TrashId, file5TrashId, file6TrashId, file7TrashId, file8TrashId
|
||||
], false);
|
||||
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs';
|
||||
import { SITE_VISIBILITY, SITE_ROLES } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -53,8 +53,8 @@ describe('Trash', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const logoutPage = new LogoutPage();
|
||||
const trashPage = new BrowsingPage();
|
||||
const { dataTable, breadcrumb } = trashPage;
|
||||
const page = new BrowsingPage();
|
||||
const { dataTable, breadcrumb } = page;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await apis.admin.people.createUser({ username });
|
||||
@ -97,8 +97,7 @@ describe('Trash', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await trashPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -136,8 +135,7 @@ describe('Trash', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await trashPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { SIDEBAR_LABELS, SITE_VISIBILITY } from '../../configs';
|
||||
import { SITE_VISIBILITY } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -86,44 +86,43 @@ describe('Breadcrumb', () => {
|
||||
});
|
||||
|
||||
it('Personal Files breadcrumb main node - [C260964]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.clickPersonalFiles();
|
||||
expect(await breadcrumb.getItemsCount()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.getCurrentItemName()).toBe('Personal Files');
|
||||
});
|
||||
|
||||
it('File Libraries breadcrumb main node - [C260966]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await page.clickFileLibraries();
|
||||
expect(await breadcrumb.getItemsCount()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.getCurrentItemName()).toBe('File Libraries');
|
||||
});
|
||||
|
||||
it('Recent Files breadcrumb main node - [C260971]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await page.clickRecentFiles();
|
||||
expect(await breadcrumb.getItemsCount()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.getCurrentItemName()).toBe('Recent Files');
|
||||
});
|
||||
|
||||
it('Shared Files breadcrumb main node - [C260972]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await page.clickSharedFiles();
|
||||
expect(await breadcrumb.getItemsCount()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.getCurrentItemName()).toBe('Shared Files');
|
||||
});
|
||||
|
||||
it('Favorites breadcrumb main node - [C260973]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await page.clickFavorites();
|
||||
expect(await breadcrumb.getItemsCount()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.getCurrentItemName()).toBe('Favorites');
|
||||
});
|
||||
|
||||
it('Trash breadcrumb main node - [C260974]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await breadcrumb.getItemsCount()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.getCurrentItemName()).toBe('Trash');
|
||||
});
|
||||
|
||||
it('Personal Files breadcrumb for a folder hierarchy - [C260965]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.dataTable.doubleClickOnRowByName(subFolder1);
|
||||
await page.dataTable.doubleClickOnRowByName(subFolder2);
|
||||
@ -132,8 +131,7 @@ describe('Breadcrumb', () => {
|
||||
});
|
||||
|
||||
it('File Libraries breadcrumb for a folder hierarchy - [C260967]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await page.dataTable.doubleClickOnRowByName(siteName);
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.dataTable.doubleClickOnRowByName(subFolder1);
|
||||
@ -143,8 +141,7 @@ describe('Breadcrumb', () => {
|
||||
});
|
||||
|
||||
it('User can navigate to any location by clicking on a step from the breadcrumb - [C213235]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.dataTable.doubleClickOnRowByName(subFolder1);
|
||||
await page.dataTable.doubleClickOnRowByName(subFolder2);
|
||||
@ -154,8 +151,7 @@ describe('Breadcrumb', () => {
|
||||
});
|
||||
|
||||
it('Tooltip appears on hover on a step in breadcrumb - [C213237]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.dataTable.doubleClickOnRowByName(subFolder1);
|
||||
await page.dataTable.doubleClickOnRowByName(subFolder2);
|
||||
@ -163,8 +159,7 @@ describe('Breadcrumb', () => {
|
||||
});
|
||||
|
||||
it('Breadcrumb updates correctly when folder is renamed - [C213238]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await page.dataTable.doubleClickOnRowByName(parent2);
|
||||
await page.dataTable.doubleClickOnRowByName(folder1);
|
||||
await page.dataTable.wait();
|
||||
@ -175,12 +170,11 @@ describe('Breadcrumb', () => {
|
||||
});
|
||||
|
||||
it('Browser back navigates to previous location regardless of breadcrumb steps - [C213240]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.dataTable.doubleClickOnRowByName(subFolder1);
|
||||
await page.dataTable.doubleClickOnRowByName(subFolder2);
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
await page.dataTable.waitForEmptyState();
|
||||
await browser.navigate().back();
|
||||
const expectedBreadcrumb = [ 'Personal Files', parent, subFolder1, subFolder2 ];
|
||||
|
@ -50,74 +50,74 @@ describe('Sidebar', () => {
|
||||
});
|
||||
|
||||
it('navigates to "File Libraries" - [C217150]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await page.clickFileLibraries();
|
||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.FILE_LIBRARIES);
|
||||
expect(await sidenav.isActiveByLabel(SIDEBAR_LABELS.FILE_LIBRARIES)).toBe(true);
|
||||
});
|
||||
|
||||
it('navigates to "Personal Files" - [C280409]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.clickPersonalFiles();
|
||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.PERSONAL_FILES);
|
||||
expect(await sidenav.isActiveByLabel(SIDEBAR_LABELS.PERSONAL_FILES)).toBe(true);
|
||||
});
|
||||
|
||||
it('navigates to "Shared Files" - [C213110]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await page.clickSharedFiles();
|
||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.SHARED_FILES);
|
||||
expect(await sidenav.isActiveByLabel(SIDEBAR_LABELS.SHARED_FILES)).toBe(true);
|
||||
});
|
||||
|
||||
it('navigates to "Recent Files" - [C213166]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await page.clickRecentFiles();
|
||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.RECENT_FILES);
|
||||
expect(await sidenav.isActiveByLabel(SIDEBAR_LABELS.RECENT_FILES)).toBe(true);
|
||||
});
|
||||
|
||||
it('navigates to "Favorites" - [C213225]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await page.clickFavorites();
|
||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.FAVORITES);
|
||||
expect(await sidenav.isActiveByLabel(SIDEBAR_LABELS.FAVORITES)).toBe(true);
|
||||
});
|
||||
|
||||
it('navigates to "Trash" - [C213216]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.TRASHCAN);
|
||||
expect(await sidenav.isActiveByLabel(SIDEBAR_LABELS.TRASH)).toBe(true);
|
||||
});
|
||||
|
||||
// TODO: incomplete test
|
||||
xit('Personal Files tooltip - [C217151]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.clickPersonalFiles();
|
||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.PERSONAL_FILES)).toContain('View your Personal Files');
|
||||
});
|
||||
|
||||
// TODO: incomplete test
|
||||
xit('File Libraries tooltip - [C217152]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await page.clickFileLibraries();
|
||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.FILE_LIBRARIES)).toContain('Access File Libraries');
|
||||
});
|
||||
|
||||
// TODO: incomplete test
|
||||
xit('Shared Files tooltip - [C213111]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await page.clickSharedFiles();
|
||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.SHARED_FILES)).toContain('View files that have been shared');
|
||||
});
|
||||
|
||||
// TODO: incomplete test
|
||||
xit('Recent Files tooltip - [C213167]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await page.clickRecentFiles();
|
||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.RECENT_FILES)).toContain('View files you recently edited');
|
||||
});
|
||||
|
||||
// TODO: incomplete test
|
||||
xit('Favorites tooltip - [C217153]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await page.clickFavorites();
|
||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.FAVORITES)).toContain('View your favorite files and folders');
|
||||
});
|
||||
|
||||
// TODO: incomplete test
|
||||
xit('Trash tooltip - [C217154]', async () => {
|
||||
await sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.TRASH)).toContain('View deleted files in the trash');
|
||||
});
|
||||
});
|
||||
|
@ -23,7 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -51,7 +50,7 @@ describe('Pagination on empty page', () => {
|
||||
});
|
||||
|
||||
it('Favorites - pagination controls not displayed - [C280111]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await page.clickFavorites();
|
||||
expect(await pagination.range.isPresent()).toBe(false);
|
||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
||||
@ -61,7 +60,7 @@ describe('Pagination on empty page', () => {
|
||||
});
|
||||
|
||||
it('File Libraries - pagination controls not displayed - [C280084]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await page.clickFileLibraries();
|
||||
expect(await pagination.range.isPresent()).toBe(false);
|
||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
||||
@ -71,7 +70,7 @@ describe('Pagination on empty page', () => {
|
||||
});
|
||||
|
||||
it('Personal Files - pagination controls not displayed - [C280075]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await page.clickPersonalFiles();
|
||||
expect(await pagination.range.isPresent()).toBe(false);
|
||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
||||
@ -81,7 +80,7 @@ describe('Pagination on empty page', () => {
|
||||
});
|
||||
|
||||
it('Recent Files - pagination controls not displayed - [C280102]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await page.clickRecentFiles();
|
||||
expect(await pagination.range.isPresent()).toBe(false);
|
||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
||||
@ -91,7 +90,7 @@ describe('Pagination on empty page', () => {
|
||||
});
|
||||
|
||||
it('Shared Files - pagination controls not displayed - [C280094]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await page.clickSharedFiles();
|
||||
expect(await pagination.range.isPresent()).toBe(false);
|
||||
expect(await pagination.maxItems.isPresent()).toBe(false);
|
||||
expect(await pagination.currentPage.isPresent()).toBe(false);
|
||||
@ -101,7 +100,7 @@ describe('Pagination on empty page', () => {
|
||||
});
|
||||
|
||||
it('Trash - pagination controls not displayed - [C280120]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await page.clickTrash();
|
||||
expect(await pagination.range.isPresent()).toBe(false);
|
||||
expect(pagination.maxItems.isPresent()).toBe(false);
|
||||
expect(pagination.currentPage.isPresent()).toBe(false);
|
||||
|
@ -23,8 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -60,8 +58,7 @@ describe('Pagination on multiple pages on Favorites', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -23,8 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { SIDEBAR_LABELS, SITE_VISIBILITY } from '../../configs';
|
||||
import { SITE_VISIBILITY } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -54,8 +53,7 @@ describe('Pagination on multiple pages on File Libraries', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -23,8 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -56,8 +54,7 @@ describe('Pagination on multiple pages on Personal Files', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(parent);
|
||||
done();
|
||||
});
|
||||
|
@ -23,8 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -57,8 +55,7 @@ describe('Pagination on multiple pages on Recent Files', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -23,8 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -60,8 +58,7 @@ describe('Pagination on multiple pages on Shared Files', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -82,38 +81,32 @@ describe('Pagination on single page', () => {
|
||||
});
|
||||
|
||||
it('page selector not displayed on Favorites - [C280112]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
||||
});
|
||||
|
||||
it('page selector not displayed on File Libraries - [C280085]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
||||
});
|
||||
|
||||
it('page selector not displayed on Personal Files - [C280076]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
||||
});
|
||||
|
||||
it('page selector not displayed on Recent Files - [C280103]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
||||
});
|
||||
|
||||
it('page selector not displayed on Shared Files - [C280094]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
||||
});
|
||||
|
||||
it('page selector not displayed on Trash - [C280121]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
expect(await pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed');
|
||||
});
|
||||
|
||||
|
@ -23,8 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { SIDEBAR_LABELS } from '../../configs';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
@ -56,8 +54,7 @@ describe('Pagination on multiple pages on Trash', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { LoginPage, BrowsingPage, LogoutPage } from '../../pages/pages';
|
||||
import { SIDEBAR_LABELS, FILES } from '../../configs';
|
||||
import { FILES } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { Viewer } from '../../components/viewer/viewer';
|
||||
@ -81,8 +81,7 @@ describe('Viewer actions', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(parent);
|
||||
await dataTable.waitForHeader();
|
||||
done();
|
||||
@ -143,8 +142,7 @@ describe('Viewer actions', () => {
|
||||
expect(await page.getSnackBarMessage()).toContain('Copied 1 item');
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(docxPersonalFiles).isPresent()).toBe(true, 'Item is not in the list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(docxPersonalFiles).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
|
||||
@ -165,8 +163,7 @@ describe('Viewer actions', () => {
|
||||
expect(await page.getSnackBarMessage()).toContain('Moved 1 item');
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(xlsxPersonalFiles).isPresent()).toBe(false, 'Item was not moved');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(xlsxPersonalFiles).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
});
|
||||
@ -178,8 +175,7 @@ describe('Viewer actions', () => {
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Favorite');
|
||||
await viewer.clickClose();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
expect(await apis.user.favorites.isFavorite(docxFileId)).toBe(true, 'Item is not favorite');
|
||||
expect(await dataTable.getRowByName(docxPersonalFiles).isPresent()).toBe(true, 'Item is not present in Favorites list');
|
||||
});
|
||||
@ -194,8 +190,7 @@ describe('Viewer actions', () => {
|
||||
// TODO: enable this when ACA-1806 is fixed
|
||||
// expect(await viewer.isViewerOpened()).toBe(false, 'Viewer is opened');
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
expect(await dataTable.getRowByName(pdfPersonalFiles).isPresent()).toBe(true, 'Item is not present in Trash');
|
||||
});
|
||||
|
||||
@ -266,8 +261,7 @@ describe('Viewer actions', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteName);
|
||||
await dataTable.waitForHeader();
|
||||
done();
|
||||
@ -307,8 +301,7 @@ describe('Viewer actions', () => {
|
||||
expect(await page.getSnackBarMessage()).toContain('Copied 1 item');
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(docxLibraries).isPresent()).toBe(true, 'Item is not in the list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(docxLibraries).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
|
||||
@ -329,8 +322,7 @@ describe('Viewer actions', () => {
|
||||
expect(await page.getSnackBarMessage()).toContain('Moved 1 item');
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(xlsxLibraries).isPresent()).toBe(false, 'Item was not moved');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(xlsxLibraries).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
});
|
||||
@ -342,8 +334,7 @@ describe('Viewer actions', () => {
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Favorite');
|
||||
await viewer.clickClose();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
expect(await apis.user.favorites.isFavorite(docxFileId)).toBe(true, `${docxLibraries} is not favorite`);
|
||||
expect(await dataTable.getRowByName(docxLibraries).isPresent()).toBe(true, `${docxLibraries} is not present in Favorites list`);
|
||||
});
|
||||
@ -358,8 +349,7 @@ describe('Viewer actions', () => {
|
||||
// TODO: enable this when ACA-1806 is fixed
|
||||
// expect(await viewer.isViewerOpened()).toBe(false, 'Viewer is opened');
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
expect(await dataTable.getRowByName(pdfLibraries).isPresent()).toBe(true, 'Item is not present in Trash');
|
||||
});
|
||||
|
||||
@ -407,8 +397,7 @@ describe('Viewer actions', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -446,8 +435,7 @@ describe('Viewer actions', () => {
|
||||
expect(await page.getSnackBarMessage()).toContain('Copied 1 item');
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(docxRecentFiles).isPresent()).toBe(true, 'Item is not in the list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(docxRecentFiles).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
|
||||
@ -469,8 +457,7 @@ describe('Viewer actions', () => {
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(xlsxRecentFiles).isPresent()).toBe(true, 'Item is not in the list');
|
||||
expect(await dataTable.getItemLocationTileAttr(xlsxRecentFiles)).toContain(destination, 'Item was not moved');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(xlsxRecentFiles).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
});
|
||||
@ -482,8 +469,7 @@ describe('Viewer actions', () => {
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Favorite');
|
||||
await viewer.clickClose();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
expect(await apis.user.favorites.isFavorite(docxFileId)).toBe(true, 'Item is not favorite');
|
||||
expect(await dataTable.getRowByName(docxRecentFiles).isPresent()).toBe(true, 'Item is not present in Favorites list');
|
||||
});
|
||||
@ -498,8 +484,7 @@ describe('Viewer actions', () => {
|
||||
// TODO: enable this when ACA-1806 is fixed
|
||||
// expect(await viewer.isViewerOpened()).toBe(false, 'Viewer is opened');
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
expect(await dataTable.getRowByName(pdfRecentFiles).isPresent()).toBe(true, 'Item is not present in Trash');
|
||||
});
|
||||
|
||||
@ -547,8 +532,7 @@ describe('Viewer actions', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -586,8 +570,7 @@ describe('Viewer actions', () => {
|
||||
expect(await page.getSnackBarMessage()).toContain('Copied 1 item');
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(docxSharedFiles).isPresent()).toBe(true, 'Item is not in the list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(docxSharedFiles).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
|
||||
@ -609,8 +592,7 @@ describe('Viewer actions', () => {
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(xlsxSharedFiles).isPresent()).toBe(true, 'Item is not in the list');
|
||||
expect(await dataTable.getItemLocationTileAttr(xlsxSharedFiles)).toContain(destination, 'Item was not moved');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(xlsxSharedFiles).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
});
|
||||
@ -622,8 +604,7 @@ describe('Viewer actions', () => {
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Favorite');
|
||||
await viewer.clickClose();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
expect(await apis.user.favorites.isFavorite(docxFileId)).toBe(true, 'Item is not favorite');
|
||||
expect(await dataTable.getRowByName(docxSharedFiles).isPresent()).toBe(true, 'Item is not present in Favorites list');
|
||||
});
|
||||
@ -638,8 +619,7 @@ describe('Viewer actions', () => {
|
||||
// TODO: enable this when ACA-1806 is fixed
|
||||
// expect(await viewer.isViewerOpened()).toBe(false, 'Viewer is opened');
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
expect(await dataTable.getRowByName(pdfSharedFiles).isPresent()).toBe(true, 'Item is not present in Trash');
|
||||
});
|
||||
|
||||
@ -690,8 +670,7 @@ describe('Viewer actions', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
done();
|
||||
});
|
||||
|
||||
@ -729,8 +708,7 @@ describe('Viewer actions', () => {
|
||||
expect(await page.getSnackBarMessage()).toContain('Copied 1 item');
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(docxFavorites).isPresent()).toBe(true, 'Item is not in the list');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(docxFavorites).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
|
||||
@ -752,8 +730,7 @@ describe('Viewer actions', () => {
|
||||
await viewer.clickClose();
|
||||
expect(await dataTable.getRowByName(xlsxFavorites).isPresent()).toBe(true, 'Item is not in the list');
|
||||
expect(await dataTable.getItemLocationTileAttr(xlsxFavorites)).toContain(destination, 'Item was not moved');
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(destination);
|
||||
expect(await dataTable.getRowByName(xlsxFavorites).isPresent()).toBe(true, 'Item is not present in destination');
|
||||
});
|
||||
@ -765,8 +742,7 @@ describe('Viewer actions', () => {
|
||||
await toolbar.openMoreMenu();
|
||||
await toolbar.menu.clickMenuItem('Favorite');
|
||||
await viewer.clickClose();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
expect(await apis.user.favorites.isFavorite(xlsxFileId)).toBe(false, 'Item is still favorite');
|
||||
expect(await dataTable.getRowByName(xlsxFavorites).isPresent()).toBe(false, 'Item is still present in Favorites list');
|
||||
});
|
||||
@ -781,8 +757,7 @@ describe('Viewer actions', () => {
|
||||
// TODO: enable this when ACA-1806 is fixed
|
||||
// expect(await viewer.isViewerOpened()).toBe(false, 'Viewer is opened');
|
||||
await Utils.pressEscape();
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickTrashAndWait();
|
||||
expect(await dataTable.getRowByName(pdfFavorites).isPresent()).toBe(true, 'Item is not present in Trash');
|
||||
});
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import { protractor, browser } from 'protractor';
|
||||
import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
|
||||
import { SIDEBAR_LABELS, FILES, SITE_VISIBILITY } from '../../configs';
|
||||
import { FILES, SITE_VISIBILITY } from '../../configs';
|
||||
import { RepoClient } from '../../utilities/repo-client/repo-client';
|
||||
import { Utils } from '../../utilities/utils';
|
||||
import { Viewer } from '../../components/viewer/viewer';
|
||||
@ -77,8 +77,7 @@ describe('Viewer general', () => {
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickPersonalFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(parent);
|
||||
await dataTable.waitForHeader();
|
||||
done();
|
||||
@ -142,8 +141,7 @@ describe('Viewer general', () => {
|
||||
});
|
||||
|
||||
it('Viewer opens for a file from File Libraries - [C284633]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFileLibrariesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(siteUser);
|
||||
await dataTable.waitForHeader();
|
||||
await dataTable.doubleClickOnRowByName(fileInSite);
|
||||
@ -154,8 +152,7 @@ describe('Viewer general', () => {
|
||||
});
|
||||
|
||||
it('Viewer opens for a file from Recent Files - [C284636]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickRecentFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(xlsxFile);
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
expect(await viewer.isViewerToolbarDisplayed()).toBe(true, 'Toolbar not displayed');
|
||||
@ -164,8 +161,7 @@ describe('Viewer general', () => {
|
||||
});
|
||||
|
||||
it('Viewer opens for a file from Shared Files - [C284635]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickSharedFilesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(xlsxFile);
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
expect(await viewer.isViewerToolbarDisplayed()).toBe(true, 'Toolbar not displayed');
|
||||
@ -174,8 +170,7 @@ describe('Viewer general', () => {
|
||||
});
|
||||
|
||||
it('Viewer opens for a file from Favorites - [C284634]', async () => {
|
||||
await page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES);
|
||||
await dataTable.waitForHeader();
|
||||
await page.clickFavoritesAndWait();
|
||||
await dataTable.doubleClickOnRowByName(xlsxFile);
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
expect(await viewer.isViewerToolbarDisplayed()).toBe(true, 'Toolbar not displayed');
|
||||
|
Loading…
x
Reference in New Issue
Block a user