mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-01 14:41:14 +00:00
e2e fix
This commit is contained in:
committed by
Sheena Malhotra
parent
5eb81d1189
commit
f60eca1d23
@@ -269,7 +269,7 @@ export function filesLockedByOtherUser(siteName?: string) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('on File Libraries - [C297664]', async () => {
|
it('on File Libraries - [C297664]', async () => {
|
||||||
await page.clickFileLibrariesAndWait();
|
await page.goToMyLibrariesAndWait();
|
||||||
await dataTable.doubleClickOnRowByName(siteName);
|
await dataTable.doubleClickOnRowByName(siteName);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
|
|
||||||
@@ -322,7 +322,7 @@ export function filesLockedByOtherUser(siteName?: string) {
|
|||||||
|
|
||||||
describe('available actions in the viewer : ', () => {
|
describe('available actions in the viewer : ', () => {
|
||||||
it('file opened from File Libraries - [C297671]', async () => {
|
it('file opened from File Libraries - [C297671]', async () => {
|
||||||
await page.clickFileLibrariesAndWait();
|
await page.goToMyLibrariesAndWait();
|
||||||
await dataTable.doubleClickOnRowByName(siteName);
|
await dataTable.doubleClickOnRowByName(siteName);
|
||||||
await dataTable.waitForHeader();
|
await dataTable.waitForHeader();
|
||||||
|
|
||||||
|
@@ -112,7 +112,7 @@ describe('Restore from Trash', () => {
|
|||||||
const action = await page.getSnackBarAction();
|
const action = await page.getSnackBarAction();
|
||||||
expect(action).toContain('View');
|
expect(action).toContain('View');
|
||||||
expect(await dataTable.isItemPresent(site)).toBe(false, `${site} was not removed from list`);
|
expect(await dataTable.isItemPresent(site)).toBe(false, `${site} was not removed from list`);
|
||||||
await page.clickFileLibrariesAndWait();
|
await page.goToMyLibrariesAndWait();
|
||||||
expect(await page.dataTable.isItemPresent(site)).toBe(true, `${site} not displayed in list`);
|
expect(await page.dataTable.isItemPresent(site)).toBe(true, `${site} not displayed in list`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -86,7 +86,7 @@ describe('Library properties', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await page.clickFileLibrariesAndWait();
|
await page.goToMyLibrariesAndWait();
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
|
@@ -137,7 +137,7 @@ describe('Breadcrumb', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C260967] File Libraries breadcrumb for a folder hierarchy', async () => {
|
it('[C260967] File Libraries breadcrumb for a folder hierarchy', async () => {
|
||||||
await page.clickFileLibrariesAndWait();
|
await page.goToMyLibrariesAndWait();
|
||||||
await page.dataTable.doubleClickOnRowByName(siteName);
|
await page.dataTable.doubleClickOnRowByName(siteName);
|
||||||
await page.dataTable.doubleClickOnRowByName(parentFromSite);
|
await page.dataTable.doubleClickOnRowByName(parentFromSite);
|
||||||
await page.dataTable.doubleClickOnRowByName(subFolder1FromSite);
|
await page.dataTable.doubleClickOnRowByName(subFolder1FromSite);
|
||||||
|
@@ -50,14 +50,12 @@ describe('Sidebar', () => {
|
|||||||
it('[C289902] navigate to Favorite Libraries', async () => {
|
it('[C289902] navigate to Favorite Libraries', async () => {
|
||||||
await page.goToFavoriteLibraries();
|
await page.goToFavoriteLibraries();
|
||||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.FAVORITE_LIBRARIES);
|
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.FAVORITE_LIBRARIES);
|
||||||
expect(await sidenav.isActive(SIDEBAR_LABELS.FILE_LIBRARIES)).toBe(true, 'File Libraries link is not active');
|
|
||||||
expect(await sidenav.isActive(SIDEBAR_LABELS.FAVORITE_LIBRARIES)).toBe(true, 'Favorite Libraries link not active');
|
expect(await sidenav.isActive(SIDEBAR_LABELS.FAVORITE_LIBRARIES)).toBe(true, 'Favorite Libraries link not active');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C289901] navigate to My Libraries', async () => {
|
it('[C289901] navigate to My Libraries', async () => {
|
||||||
await page.goToMyLibraries();
|
await page.goToMyLibraries();
|
||||||
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.MY_LIBRARIES);
|
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.MY_LIBRARIES);
|
||||||
expect(await sidenav.isActive(SIDEBAR_LABELS.FILE_LIBRARIES)).toBe(true, 'File Libraries link is not active');
|
|
||||||
expect(await sidenav.isActive(SIDEBAR_LABELS.MY_LIBRARIES)).toBe(true, 'My Libraries link not active');
|
expect(await sidenav.isActive(SIDEBAR_LABELS.MY_LIBRARIES)).toBe(true, 'My Libraries link not active');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -125,18 +123,9 @@ describe('Sidebar', () => {
|
|||||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.TRASH)).toContain('View deleted files in the trash');
|
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.TRASH)).toContain('View deleted files in the trash');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C217152] File Libraries tooltip', async () => {
|
|
||||||
await page.clickFileLibraries();
|
|
||||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.FILE_LIBRARIES)).toContain('File Libraries');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C289916] My Libraries tooltip', async () => {
|
it('[C289916] My Libraries tooltip', async () => {
|
||||||
await page.goToMyLibraries();
|
await page.goToMyLibraries();
|
||||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.MY_LIBRARIES)).toContain('Access my libraries');
|
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.MY_LIBRARIES)).toContain('Access my libraries');
|
||||||
|
|
||||||
await header.collapseSideNav();
|
|
||||||
await sidenav.clickLink(SIDEBAR_LABELS.FILE_LIBRARIES);
|
|
||||||
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.MY_LIBRARIES)).toContain('Access my libraries');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C289917] Favorite Libraries tooltip', async () => {
|
it('[C289917] Favorite Libraries tooltip', async () => {
|
||||||
|
@@ -117,7 +117,7 @@ describe('Single click on item name', () => {
|
|||||||
|
|
||||||
describe('on File Libraries', () => {
|
describe('on File Libraries', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await page.clickFileLibrariesAndWait();
|
await page.goToMyLibrariesAndWait();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C284901] Hyperlink appears when mouse over a library', async () => {
|
it('[C284901] Hyperlink appears when mouse over a library', async () => {
|
||||||
|
@@ -47,7 +47,6 @@ export const APP_ROUTES = {
|
|||||||
// Sidebar labels
|
// Sidebar labels
|
||||||
export const SIDEBAR_LABELS = {
|
export const SIDEBAR_LABELS = {
|
||||||
PERSONAL_FILES: 'Personal Files',
|
PERSONAL_FILES: 'Personal Files',
|
||||||
FILE_LIBRARIES: 'File Libraries',
|
|
||||||
MY_LIBRARIES: 'My Libraries',
|
MY_LIBRARIES: 'My Libraries',
|
||||||
FAVORITE_LIBRARIES: 'Favorite Libraries',
|
FAVORITE_LIBRARIES: 'Favorite Libraries',
|
||||||
SHARED_FILES: 'Shared',
|
SHARED_FILES: 'Shared',
|
||||||
|
@@ -44,15 +44,6 @@ export class BrowsingPage extends Page {
|
|||||||
await this.dataTable.waitForHeader();
|
await this.dataTable.waitForHeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickFileLibraries(): Promise<void> {
|
|
||||||
await this.sidenav.clickLink(SIDEBAR_LABELS.FILE_LIBRARIES);
|
|
||||||
}
|
|
||||||
|
|
||||||
async clickFileLibrariesAndWait(): Promise<void> {
|
|
||||||
await this.clickFileLibraries();
|
|
||||||
await this.dataTable.waitForHeader();
|
|
||||||
}
|
|
||||||
|
|
||||||
async goToFavoriteLibraries(): Promise<void> {
|
async goToFavoriteLibraries(): Promise<void> {
|
||||||
await this.sidenav.clickLink(SIDEBAR_LABELS.FAVORITE_LIBRARIES);
|
await this.sidenav.clickLink(SIDEBAR_LABELS.FAVORITE_LIBRARIES);
|
||||||
}
|
}
|
||||||
@@ -64,6 +55,7 @@ export class BrowsingPage extends Page {
|
|||||||
|
|
||||||
async goToMyLibraries(): Promise<void> {
|
async goToMyLibraries(): Promise<void> {
|
||||||
await this.sidenav.clickLink(SIDEBAR_LABELS.MY_LIBRARIES);
|
await this.sidenav.clickLink(SIDEBAR_LABELS.MY_LIBRARIES);
|
||||||
|
await this.dataTable.waitForHeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
async goToMyLibrariesAndWait(): Promise<void> {
|
async goToMyLibrariesAndWait(): Promise<void> {
|
||||||
|
Reference in New Issue
Block a user