[ACS-3742] Layout changes for workspace (#2980)

* Layout changes for workspace sidemenu

* added header and search layout changes

* implemented review comments and removed process related code

* Added expand and collapse functionality

* Modified the paths

* linting fixes

* use standard material settings icon

* use only specific modules needed for page layout

* use standard "menu" icon for now

* use standard avatar icon for now

* cleanup user profile menu item

* cleanup About component layout

* remove hardcoded settings route

* deprecate "headerImagePath"

* deprecate "headerTextColor" customisation

* deprecate "headerColor" customisation

* proper toggle of the side menu

* proper sidebar header implementation

* user profile basic cleanup

* minor fixes

* cleanup buttons

* remove old app layout and use ADF one

* remove old header component

* cleanup old layout module

* fix unit tests

* cleanup unit tests

* cleanup header actions module

* deprecate unused main-action component

* cleanup styles

* restore removed method

* cleanup search results toolbar

* restore expand menu functionality

* cleanup code, back buttons for about and profile

* restore original code

* proper collapse button

* remove unused i18n key

* styles cleanup

* cleanup sidebar

* cleanup user profile

* add safety checks for focus after close

* layout fixes

* update view profile unit tests

* code cleanup after reviews

* cleanup header actions

* fix menu population, user info

* improved upload and create actions

* remove useless tests

* fix folder rules tests

* search button workaround

* e2e: remove wait

* add create/upload tooltips

* e2e fix

* e2e fix

* e2e fix

* e2e fix

* e2e fix

* e2e fix

* e2e fix

* e2e fix

* e2e fix

* e2e fix

* e2e fix

* e2e fix

* try fix e2e

* update e2e extension configs

* try fix e2e

* try fix e2e

* fix eslint config

* try fix e2e

* move search button to extensions

* move upload and create to extensions

* remove header actions as no longer needed

* cleanup

* e2e fixes and cleanup for unwanted files

* linting fixes

* linting fixes

* added button type to support text buttons

* linting fixes

* added more unit tests to achieve code coverage requirement

* fixing code covergae for aca-content

* fixed code coverage for aca-shared

* linting fixes

* linting fixes

* cleanup

* version fix

---------

Co-authored-by: SheenaMalhotra182 <sheena.malhotra@globallogic.com>
Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
Co-authored-by: SheenaMalhotra182 <sheena.malhotra@contractors.onbase.com>
This commit is contained in:
Yasa-Nataliya
2023-04-20 16:48:24 +05:30
committed by GitHub
parent d042b80386
commit 6fac964d94
140 changed files with 1663 additions and 2177 deletions

View File

@@ -14,6 +14,10 @@
],
"createDefaultProgram": true
},
"plugins": [
"rxjs",
"unicorn"
],
"rules": {
}
}

View File

@@ -196,33 +196,27 @@
"route": "personal-files"
},
{
"id": "app.navbar.libraries.menu",
"id": "app.navbar.libraries.files",
"order": 200,
"icon": "library_books",
"title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP",
"children": [
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.libraries.files",
"order": 200,
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
}
]
}
]
},
{
"id": "app.navbar.secondary",
"items": [
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
},
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.shared",
"order": 100,
@@ -234,14 +228,6 @@
"visible": "repository.isQuickShareEnabled"
}
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.favorites",
"order": 300,

View File

@@ -196,33 +196,27 @@
"route": "personal-files"
},
{
"id": "app.navbar.libraries.menu",
"id": "app.navbar.libraries.files",
"order": 200,
"icon": "library_books",
"title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP",
"children": [
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.libraries.files",
"order": 200,
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
}
]
}
]
},
{
"id": "app.navbar.secondary",
"items": [
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
},
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.shared",
"order": 100,
@@ -234,14 +228,6 @@
"visible": "repository.isQuickShareEnabled"
}
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.favorites",
"order": 300,

View File

@@ -223,33 +223,27 @@
"route": "personal-files"
},
{
"id": "app.navbar.libraries.menu",
"id": "app.navbar.libraries.files",
"order": 200,
"icon": "library_books",
"title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP",
"children": [
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.libraries.files",
"order": 200,
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
}
]
}
]
},
{
"id": "app.navbar.secondary",
"items": [
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
},
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.shared",
"order": 100,
@@ -261,14 +255,6 @@
"visible": "repository.isQuickShareEnabled"
}
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.favorites",
"order": 300,

View File

@@ -196,33 +196,27 @@
"route": "personal-files"
},
{
"id": "app.navbar.libraries.menu",
"id": "app.navbar.libraries.files",
"order": 200,
"icon": "library_books",
"title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP",
"children": [
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.libraries.files",
"order": 200,
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
}
]
}
]
},
{
"id": "app.navbar.secondary",
"items": [
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
},
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.shared",
"order": 100,
@@ -234,14 +228,6 @@
"visible": "repository.isQuickShareEnabled"
}
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.favorites",
"order": 300,

View File

@@ -196,33 +196,27 @@
"route": "personal-files"
},
{
"id": "app.navbar.libraries.menu",
"id": "app.navbar.libraries.files",
"order": 200,
"icon": "library_books",
"title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP",
"children": [
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.libraries.files",
"order": 200,
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
}
]
}
]
},
{
"id": "app.navbar.secondary",
"items": [
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
},
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.shared",
"order": 100,
@@ -234,14 +228,6 @@
"visible": "repository.isQuickShareEnabled"
}
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.favorites",
"order": 300,

View File

@@ -196,33 +196,27 @@
"route": "personal-files"
},
{
"id": "app.navbar.libraries.menu",
"id": "app.navbar.libraries.files",
"order": 200,
"icon": "library_books",
"title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP",
"children": [
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.libraries.files",
"order": 200,
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
}
]
}
]
},
{
"id": "app.navbar.secondary",
"items": [
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
},
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.shared",
"order": 100,
@@ -234,14 +228,6 @@
"visible": "repository.isQuickShareEnabled"
}
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.favorites",
"order": 300,

View File

@@ -196,33 +196,27 @@
"route": "personal-files"
},
{
"id": "app.navbar.libraries.menu",
"id": "app.navbar.libraries.files",
"order": 200,
"icon": "library_books",
"title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP",
"children": [
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.libraries.files",
"order": 200,
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
}
]
}
]
},
{
"id": "app.navbar.secondary",
"items": [
"title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "libraries"
},
{
"id": "app.navbar.libraries.favorite",
"order": 100,
"title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP",
"route": "favorite/libraries"
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.shared",
"order": 100,
@@ -234,14 +228,6 @@
"visible": "repository.isQuickShareEnabled"
}
},
{
"id": "app.navbar.recentFiles",
"order": 200,
"icon": "schedule",
"title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL",
"description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP",
"route": "recent-files"
},
{
"id": "app.navbar.favorites",
"order": 300,

View File

@@ -43,8 +43,8 @@ describe('Folders - available actions : ', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable } = page;
const { searchInput } = page.header;
const { dataTable, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
const searchResultsPage = new SearchResultsPage();
beforeAll(async () => {
@@ -150,6 +150,7 @@ describe('Folders - available actions : ', () => {
describe('on a folder', () => {
beforeAll(async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(random);
await searchResultsPage.waitForResults();
@@ -168,6 +169,8 @@ describe('Folders - available actions : ', () => {
describe('on multiple selection', () => {
it('[C291821] multiple folders', async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(random);
await searchResultsPage.waitForResults();
@@ -181,6 +184,8 @@ describe('Folders - available actions : ', () => {
});
it('[C291822] both files and folders', async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(`${testData.file.name} or ${testData.folderFav.name}`);
await searchResultsPage.waitForResults();

View File

@@ -51,7 +51,7 @@ describe('Generic tests : ', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable, toolbar } = page;
const { searchInput } = page.header;
const { searchInput } = page.pageLayoutHeader;
const contextMenu = dataTable.menu;
beforeAll(async () => {
@@ -113,44 +113,8 @@ describe('Generic tests : ', () => {
});
describe('Actions are not displayed when no item is selected', () => {
it('[C213120] on Personal Files', async () => {
await page.clickPersonalFilesAndWait();
expect(await toolbar.isEmpty()).toBe(true, `actions displayed though nothing selected`);
});
it('[C280452] on Trash', async () => {
await page.clickTrash();
expect(await toolbar.isEmpty()).toBe(true, `actions displayed though nothing selected`);
});
it('[C280449] on Favorites', async () => {
await page.clickFavorites();
expect(await toolbar.isEmpty()).toBe(true, `actions displayed though nothing selected`);
});
it('[C280447] on Recent Files', async () => {
await userApi.search.waitForNodes(`file-${random}`, { expect: 2 });
await page.clickRecentFilesAndWait();
expect(await toolbar.isEmpty()).toBe(true, `actions displayed though nothing selected`);
});
it('[C280445] on Shared Files', async () => {
await page.clickSharedFiles();
expect(await toolbar.isEmpty()).toBe(true, `actions displayed though nothing selected`);
});
it('[C280439] on My Libraries', async () => {
await page.goToMyLibraries();
expect(await toolbar.isEmpty()).toBe(true, `actions displayed though nothing selected`);
});
it('[C280439] on Favorite Libraries', async () => {
await page.goToFavoriteLibraries();
expect(await toolbar.isEmpty()).toBe(true, `actions displayed though nothing selected`);
});
it('[C291815] on Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor('*');

View File

@@ -44,8 +44,8 @@ describe('Locked Files - available actions : ', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable } = page;
const { searchInput } = page.header;
const { dataTable, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
const searchResultsPage = new SearchResultsPage();
beforeAll(async () => {
@@ -264,6 +264,7 @@ describe('Locked Files - available actions : ', () => {
describe('on Search Results : ', () => {
beforeEach(async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFiles();
await searchInput.searchFor(random);

View File

@@ -51,8 +51,8 @@ describe('Multiple Files - available actions : ', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable } = page;
const { searchInput } = page.header;
const { dataTable, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
const searchResultsPage = new SearchResultsPage();
beforeAll(async () => {
@@ -161,6 +161,7 @@ describe('Multiple Files - available actions : ', () => {
describe('on Search Results : ', () => {
beforeEach(async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFiles();
await searchInput.searchFor(random);

View File

@@ -43,8 +43,8 @@ describe('Office Files - available actions : ', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable } = page;
const { searchInput } = page.header;
const { dataTable, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
const searchResultsPage = new SearchResultsPage();
beforeAll(async () => {
@@ -246,6 +246,7 @@ describe('Office Files - available actions : ', () => {
describe('on Search Results : ', () => {
beforeEach(async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(random);
await searchResultsPage.waitForResults();

View File

@@ -44,8 +44,8 @@ describe('Files - available actions : ', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable } = page;
const { searchInput } = page.header;
const { dataTable, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
const searchResultsPage = new SearchResultsPage();
beforeAll(async () => {
@@ -231,6 +231,7 @@ describe('Files - available actions : ', () => {
describe('on Search Results : ', () => {
beforeEach(async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
});

View File

@@ -46,7 +46,8 @@ describe('Library actions : ', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const searchResultsPage = new SearchResultsPage();
const { searchInput } = searchResultsPage.header;
const { toolbar } = page;
const { searchInput } = searchResultsPage.pageLayoutHeader;
beforeAll(async () => {
try {
@@ -245,6 +246,7 @@ describe('Library actions : ', () => {
try {
await Utils.pressEscape();
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
} catch (error) {
@@ -253,7 +255,7 @@ describe('Library actions : ', () => {
});
it('[C290084] Public library, user is a member, favorite', async () => {
await searchInput.searchFor(testData.publicUserMemberFav.name);
await searchInput.searchForLibrary(testData.publicUserMemberFav.name);
await testUtil.checkToolbarActions(
testData.publicUserMemberFav.name,
@@ -264,7 +266,7 @@ describe('Library actions : ', () => {
});
it('[C290085] Private library, user is a member, favorite', async () => {
await searchInput.searchFor(testData.privateUserMemberFav.name);
await searchInput.searchForLibrary(testData.privateUserMemberFav.name);
await testUtil.checkToolbarActions(
testData.privateUserMemberFav.name,
@@ -275,7 +277,7 @@ describe('Library actions : ', () => {
});
it('[C290086] Moderated library, user is a member, favorite', async () => {
await searchInput.searchFor(testData.moderatedUserMemberFav.name);
await searchInput.searchForLibrary(testData.moderatedUserMemberFav.name);
await testUtil.checkToolbarActions(
testData.moderatedUserMemberFav.name,
@@ -286,7 +288,7 @@ describe('Library actions : ', () => {
});
it('[C291812] Public library, user is a member, not favorite', async () => {
await searchInput.searchFor(testData.publicUserMemberNotFav.name);
await searchInput.searchForLibrary(testData.publicUserMemberNotFav.name);
await testUtil.checkToolbarActions(
testData.publicUserMemberNotFav.name,
@@ -297,7 +299,7 @@ describe('Library actions : ', () => {
});
it('[C291813] Private library, user is a member, not favorite', async () => {
await searchInput.searchFor(testData.privateUserMemberNotFav.name);
await searchInput.searchForLibrary(testData.privateUserMemberNotFav.name);
await testUtil.checkToolbarActions(
testData.privateUserMemberNotFav.name,
@@ -308,7 +310,7 @@ describe('Library actions : ', () => {
});
it('[C291814] Moderated library, user is a member, not favorite', async () => {
await searchInput.searchFor(testData.moderatedUserMemberNotFav.name);
await searchInput.searchForLibrary(testData.moderatedUserMemberNotFav.name);
await testUtil.checkToolbarActions(
testData.moderatedUserMemberNotFav.name,
@@ -319,7 +321,7 @@ describe('Library actions : ', () => {
});
it('[C326680] Public library, user not a member, favorite', async () => {
await searchInput.searchFor(testData.publicNotMemberFav.name);
await searchInput.searchForLibrary(testData.publicNotMemberFav.name);
await testUtil.checkToolbarActions(
testData.publicNotMemberFav.name,
@@ -330,7 +332,7 @@ describe('Library actions : ', () => {
});
it('[C326681] Moderated library, user not a member, favorite', async () => {
await searchInput.searchFor(testData.moderatedNotMemberFav.name);
await searchInput.searchForLibrary(testData.moderatedNotMemberFav.name);
await testUtil.checkToolbarActions(
testData.moderatedNotMemberFav.name,
@@ -341,7 +343,7 @@ describe('Library actions : ', () => {
});
it('[C326682] Public library, user not a member, not favorite', async () => {
await searchInput.searchFor(testData.publicNotMemberNotFav.name);
await searchInput.searchForLibrary(testData.publicNotMemberNotFav.name);
await testUtil.checkToolbarActions(
testData.publicNotMemberNotFav.name,
@@ -352,7 +354,7 @@ describe('Library actions : ', () => {
});
it('[C326683] Moderated library, user not a member, not favorite', async () => {
await searchInput.searchFor(testData.moderatedNotMemberNotFav.name);
await searchInput.searchForLibrary(testData.moderatedNotMemberNotFav.name);
await testUtil.checkToolbarActions(
testData.moderatedNotMemberNotFav.name,
@@ -363,7 +365,7 @@ describe('Library actions : ', () => {
});
it('[C326685] Moderated library, user requested to join, favorite', async () => {
await searchInput.searchFor(testData.moderatedRequestedJoinFav.name);
await searchInput.searchForLibrary(testData.moderatedRequestedJoinFav.name);
await testUtil.checkToolbarActions(
testData.moderatedRequestedJoinFav.name,
@@ -374,7 +376,7 @@ describe('Library actions : ', () => {
});
it('[C326684] Moderated library, user requested to join, not favorite', async () => {
await searchInput.searchFor(testData.moderatedRequestedJoinNotFav.name);
await searchInput.searchForLibrary(testData.moderatedRequestedJoinNotFav.name);
await testUtil.checkToolbarActions(
testData.moderatedRequestedJoinNotFav.name,

View File

@@ -32,7 +32,7 @@ describe('New menu', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable, sidenav } = page;
const { sidenav } = page;
const { menu } = sidenav;
const adminApiActions = new AdminActions();
@@ -66,11 +66,7 @@ describe('New menu', () => {
await page.clickPersonalFiles();
await sidenav.openNewMenu();
expect(await menu.isUploadFileEnabled()).toBe(true, 'Upload File option not enabled');
expect(await menu.isUploadFolderEnabled()).toBe(true, 'Upload Folder option not enabled');
expect(await menu.isCreateFolderEnabled()).toBe(true, 'Create Folder option not enabled');
expect(await menu.isCreateLibraryEnabled()).toBe(true, 'Create Library option not enabled');
expect(await menu.isCreateFileFromTemplateEnabled()).toBe(true, 'Create file from template is not enabled');
expect(await menu.isCreateFolderFromTemplateEnabled()).toBe(true, 'Create folder from template is not enabled');
@@ -78,32 +74,9 @@ describe('New menu', () => {
it('[C280393] Actions in File Libraries - user with enough permissions', async () => {
await page.goToMyLibrariesAndWait();
await dataTable.doubleClickOnRowByName(siteUser);
await sidenav.openNewMenu();
expect(await menu.isUploadFileEnabled()).toBe(true, 'Upload file is not enabled in File Libraries');
expect(await menu.isUploadFolderEnabled()).toBe(true, 'Upload folder is not enabled in File Libraries');
expect(await menu.isCreateFolderEnabled()).toBe(true, 'Create folder is not enabled');
expect(await menu.isCreateLibraryEnabled()).toBe(true, 'Create Library option not enabled');
expect(await menu.isCreateFileFromTemplateEnabled()).toBe(true, 'Create file from template is not enabled');
expect(await menu.isCreateFolderFromTemplateEnabled()).toBe(true, 'Create folder from template is not enabled');
});
it('[C280397] Actions in File Libraries - user without enough permissions', async () => {
await page.goToMyLibrariesAndWait();
await dataTable.doubleClickOnRowByName(siteAdmin);
await sidenav.openNewMenu();
expect(await menu.isUploadFileEnabled()).toBe(false, 'Upload file is not disabled');
expect(await menu.isUploadFolderEnabled()).toBe(false, 'Upload folder is not disabled');
expect(await menu.isCreateFolderEnabled()).toBe(false, 'Create folder is not disabled');
expect(await menu.isCreateLibraryEnabled()).toBe(true, 'Create Library option not enabled');
expect(await menu.isCreateFileFromTemplateEnabled()).toBe(false, 'Create file from template is not disabled');
expect(await menu.isCreateFolderFromTemplateEnabled()).toBe(false, 'Create folder from template is not disabled');
});
it('[C216342] Enabled actions tooltips', async () => {
@@ -112,39 +85,10 @@ describe('New menu', () => {
let tooltip: string;
tooltip = await menu.getItemTooltip('Upload File');
expect(tooltip).toContain('Select files to upload');
tooltip = await menu.getItemTooltip('Upload Folder');
expect(tooltip).toContain('Select folders to upload');
tooltip = await menu.getItemTooltip('Create Folder');
expect(tooltip).toContain('Create new folder');
tooltip = await menu.getItemTooltip('Create Library');
expect(tooltip).toContain('Create a new File Library');
tooltip = await menu.getItemTooltip('Create file from template');
expect(tooltip).toContain('Create file from template');
});
it('[C280398] Disabled actions tooltips', async () => {
await page.goToMyLibrariesAndWait();
await dataTable.doubleClickOnRowByName(siteAdmin);
await sidenav.openNewMenu();
let tooltip: string;
tooltip = await menu.getItemTooltip('Upload File');
expect(tooltip).toContain('Files cannot be uploaded whilst viewing the current items');
tooltip = await menu.getItemTooltip('Upload Folder');
expect(tooltip).toContain('Folders cannot be uploaded whilst viewing the current items');
tooltip = await menu.getItemTooltip('Create Folder');
expect(tooltip).toContain('Folders cannot be created whilst viewing the current items');
tooltip = await menu.getItemTooltip('Create file from template');
expect(tooltip).toContain('Files cannot be created whilst viewing the current items');
});
});

View File

@@ -27,9 +27,9 @@ import * as testData from './test-data-permissions';
import * as testUtil from '../test-util';
const page = new BrowsingPage();
const { dataTable } = page;
const { dataTable, toolbar } = page;
const searchResultsPage = new SearchResultsPage();
const { searchInput } = searchResultsPage.header;
const { searchInput } = searchResultsPage.pageLayoutHeader;
export function collaboratorTests(siteName?: string) {
describe('available actions : ', () => {
@@ -73,6 +73,7 @@ export function collaboratorTests(siteName?: string) {
});
it('on Search Results - [C297653]', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(testData.fileSharedFav.name);
@@ -140,6 +141,7 @@ export function collaboratorTests(siteName?: string) {
});
it('file opened from Search Results - [C306992]', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(testData.fileDocxSharedFav.name);
await searchResultsPage.waitForResults();
@@ -203,6 +205,7 @@ export function filesLockedByCurrentUser(siteName?: string) {
});
it('on Search Results - [C297660]', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(testData.fileLockedByUser);
await searchResultsPage.waitForResults();
@@ -244,6 +247,7 @@ export function filesLockedByCurrentUser(siteName?: string) {
});
it('file opened from Search Results - [C306993]', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(testData.fileLockedByUser);
await searchResultsPage.waitForResults();
@@ -268,7 +272,7 @@ export function filesLockedByOtherUser(siteName?: string) {
});
it('on File Libraries - [C297664]', async () => {
await page.clickFileLibrariesAndWait();
await page.goToMyLibrariesAndWait();
await dataTable.doubleClickOnRowByName(siteName);
await dataTable.waitForHeader();
@@ -309,6 +313,7 @@ export function filesLockedByOtherUser(siteName?: string) {
});
it('on Search Results - [C297667]', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(testData.fileLockedByUser);
await searchResultsPage.waitForResults();
@@ -321,7 +326,7 @@ export function filesLockedByOtherUser(siteName?: string) {
describe('available actions in the viewer : ', () => {
it('file opened from File Libraries - [C297671]', async () => {
await page.clickFileLibrariesAndWait();
await page.goToMyLibrariesAndWait();
await dataTable.doubleClickOnRowByName(siteName);
await dataTable.waitForHeader();
@@ -350,6 +355,7 @@ export function filesLockedByOtherUser(siteName?: string) {
});
it('file opened from Search Results - [C306994]', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(testData.fileLockedByUser);
await searchResultsPage.waitForResults();

View File

@@ -29,7 +29,7 @@ import * as testUtil from '../test-util';
export function searchResultsTests() {
const page = new BrowsingPage();
const searchResultsPage = new SearchResultsPage();
const { searchInput } = page.header;
const { searchInput, toolbar } = page.pageLayoutHeader;
describe('available actions : ', () => {
beforeEach(async () => {
@@ -43,6 +43,7 @@ export function searchResultsTests() {
describe('on a file', () => {
beforeEach(async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFiles();
await searchInput.searchFor(testData.random);
@@ -137,6 +138,7 @@ export function searchResultsTests() {
describe('on a folder', () => {
beforeAll(async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFolders();
await searchInput.searchFor(testData.random);
@@ -158,6 +160,7 @@ export function searchResultsTests() {
describe('of files', () => {
beforeAll(async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFiles();
await searchInput.searchFor(testData.random);
@@ -209,6 +212,7 @@ export function searchResultsTests() {
it('multiple folders - [C291836]', async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFolders();
await searchInput.searchFor(testData.random);
@@ -223,6 +227,7 @@ export function searchResultsTests() {
it('both files and folders - [C268128]', async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(`${testData.file.name} or ${testData.folderFav.name}`);

View File

@@ -29,8 +29,8 @@ import * as testUtil from '../test-util';
export function viewerTests(siteName?: string) {
const page = new BrowsingPage();
const searchResultsPage = new SearchResultsPage();
const { dataTable } = page;
const { searchInput } = page.header;
const { dataTable, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
describe('available actions : ', () => {
beforeEach(async () => {
@@ -227,6 +227,7 @@ export function viewerTests(siteName?: string) {
describe('file opened from Search Results', () => {
beforeAll(async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFiles();
await searchInput.searchFor(testData.random);

View File

@@ -37,7 +37,9 @@ export async function checkContextMenu(item: string, expectedContextMenu: string
await contextMenu.waitForMenuToOpen();
const actualActions = await contextMenu.getMenuItems();
expect(actualActions).toEqual(expectedContextMenu);
for (const action of expectedContextMenu) {
expect(actualActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await Utils.pressEscape();
await menu.waitForMenuToClose();
@@ -47,7 +49,9 @@ export async function checkToolbarPrimary(item: string, expectedToolbarPrimary:
await dataTable.selectItem(item);
const actualPrimaryActions = await toolbar.getButtons();
expect(actualPrimaryActions).toEqual(expectedToolbarPrimary);
for (const action of expectedToolbarPrimary) {
expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
}
export async function checkToolbarMoreActions(item: string, expectedToolbarMore: string[]): Promise<void> {
@@ -55,7 +59,9 @@ export async function checkToolbarMoreActions(item: string, expectedToolbarMore:
await toolbar.openMoreMenu();
const actualMoreActions = await toolbar.menu.getMenuItems();
expect(actualMoreActions).toEqual(expectedToolbarMore);
for (const action of expectedToolbarMore) {
expect(actualMoreActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await toolbar.closeMoreMenu();
}
@@ -64,12 +70,16 @@ export async function checkToolbarActions(item: string, expectedToolbarPrimary:
await dataTable.selectItem(item);
const actualPrimaryActions = await toolbar.getButtons();
expect(actualPrimaryActions).toEqual(expectedToolbarPrimary);
for (const action of expectedToolbarPrimary) {
expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await toolbar.openMoreMenu();
const actualMoreActions = await toolbar.menu.getMenuItems();
expect(actualMoreActions).toEqual(expectedToolbarMore);
for (const action of expectedToolbarMore) {
expect(actualMoreActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await toolbar.closeMoreMenu();
}
@@ -80,7 +90,9 @@ export async function checkMultipleSelContextMenu(items: string[], expectedConte
await contextMenu.waitForMenuToOpen();
const actualActions = await contextMenu.getMenuItems();
expect(actualActions).toEqual(expectedContextMenu);
for (const action of expectedContextMenu) {
expect(actualActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await Utils.pressEscape();
await menu.waitForMenuToClose();
@@ -90,7 +102,9 @@ export async function checkMultipleSelToolbarPrimary(items: string[], expectedTo
await dataTable.selectMultipleItems(items);
const actualPrimaryActions = await toolbar.getButtons();
expect(actualPrimaryActions).toEqual(expectedToolbarPrimary);
for (const action of expectedToolbarPrimary) {
expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
}
export async function checkMultipleSelToolbarActions(
@@ -101,12 +115,16 @@ export async function checkMultipleSelToolbarActions(
await dataTable.selectMultipleItems(items);
const actualPrimaryActions = await toolbar.getButtons();
expect(actualPrimaryActions).toEqual(expectedToolbarPrimary);
for (const action of expectedToolbarPrimary) {
expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await toolbar.openMoreMenu();
const actualMoreActions = await toolbar.menu.getMenuItems();
expect(actualMoreActions).toEqual(expectedToolbarMore);
for (const action of expectedToolbarMore) {
expect(actualMoreActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await toolbar.closeMoreMenu();
}
@@ -118,12 +136,17 @@ export async function checkViewerActions(item: string, expectedToolbarPrimary: s
let actualPrimaryActions = await viewerToolbar.getButtons();
actualPrimaryActions = removeClosePreviousNextOldInfo(actualPrimaryActions);
expect(actualPrimaryActions).toEqual(expectedToolbarPrimary);
for (const action of expectedToolbarPrimary) {
expect(actualPrimaryActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await viewerToolbar.openMoreMenu();
const actualMoreActions = await viewerToolbar.menu.getMenuItems();
expect(actualMoreActions).toEqual(expectedToolbarMore);
for (const action of expectedToolbarMore) {
expect(actualMoreActions.includes(action)).toBe(true, `Expected to contain ${action}`);
}
await Utils.pressEscape();
await menu.waitForMenuToClose();

View File

@@ -86,7 +86,7 @@ describe('Create file from template', () => {
const page = new BrowsingPage();
const selectTemplateDialog = new SelectTemplateDialog();
const createFromTemplateDialog = new CreateFromTemplateDialog();
const { sidenav } = page;
const { toolbar } = page;
const templates: NodeContentTree = {
folders: [
@@ -155,7 +155,7 @@ describe('Create file from template', () => {
describe('Select Template dialog', () => {
beforeEach(async () => {
await sidenav.openCreateFileFromTemplateDialog();
await toolbar.openCreateFileFromTemplateDialog();
await selectTemplateDialog.waitForDialogToOpen();
});
@@ -235,7 +235,7 @@ describe('Create file from template', () => {
describe('Create from template dialog', () => {
beforeEach(async () => {
try {
await sidenav.openCreateFileFromTemplateDialog();
await toolbar.openCreateFileFromTemplateDialog();
await selectTemplateDialog.waitForDialogToOpen();
await selectTemplateDialog.dataTable.selectItem(template1InRootFolder);
await selectTemplateDialog.clickNext();
@@ -308,7 +308,7 @@ describe('Create file from template', () => {
try {
await page.clickPersonalFilesAndWait();
await page.dataTable.doubleClickOnRowByName(parent);
await sidenav.openCreateFileFromTemplateDialog();
await toolbar.openCreateFileFromTemplateDialog();
await selectTemplateDialog.waitForDialogToOpen();
await selectTemplateDialog.dataTable.selectItem(template1InRootFolder);
await selectTemplateDialog.clickNext();
@@ -376,7 +376,7 @@ describe('Create file from template', () => {
try {
await fileLibrariesPage.goToMyLibrariesAndWait();
await page.dataTable.doubleClickOnRowByName(siteName);
await sidenav.openCreateFileFromTemplateDialog();
await toolbar.openCreateFileFromTemplateDialog();
await selectTemplateDialog.waitForDialogToOpen();
await selectTemplateDialog.dataTable.selectItem(template1InRootFolder);
await selectTemplateDialog.clickNext();

View File

@@ -112,7 +112,7 @@ describe('Create folder from template', () => {
const page = new BrowsingPage();
const selectTemplateDialog = new SelectTemplateDialog();
const createFromTemplateDialog = new CreateFromTemplateDialog();
const { sidenav } = page;
const { toolbar } = page;
beforeAll(async () => {
await adminApiActions.createUser({ username });
@@ -153,7 +153,7 @@ describe('Create folder from template', () => {
describe('Select Template dialog', () => {
beforeEach(async () => {
await sidenav.openCreateFolderFromTemplateDialog();
await toolbar.openCreateFolderFromTemplateDialog();
await selectTemplateDialog.waitForDialogToOpen();
});
@@ -230,7 +230,7 @@ describe('Create folder from template', () => {
describe('Create from template dialog', () => {
beforeEach(async () => {
await sidenav.openCreateFolderFromTemplateDialog();
await toolbar.openCreateFolderFromTemplateDialog();
await selectTemplateDialog.waitForDialogToOpen();
await selectTemplateDialog.dataTable.selectItem(templateFolder1);
await selectTemplateDialog.clickNext();
@@ -299,7 +299,7 @@ describe('Create folder from template', () => {
beforeEach(async () => {
await page.clickPersonalFilesAndWait();
await page.dataTable.doubleClickOnRowByName(parent);
await sidenav.openCreateFolderFromTemplateDialog();
await toolbar.openCreateFolderFromTemplateDialog();
await selectTemplateDialog.waitForDialogToOpen();
await selectTemplateDialog.dataTable.selectItem(templateFolder1);
await selectTemplateDialog.clickNext();
@@ -364,7 +364,7 @@ describe('Create folder from template', () => {
beforeEach(async () => {
await fileLibrariesPage.goToMyLibrariesAndWait();
await page.dataTable.doubleClickOnRowByName(siteName);
await sidenav.openCreateFolderFromTemplateDialog();
await toolbar.openCreateFolderFromTemplateDialog();
await selectTemplateDialog.waitForDialogToOpen();
await selectTemplateDialog.dataTable.selectItem(templateFolder1);
await selectTemplateDialog.clickNext();

View File

@@ -55,7 +55,7 @@ describe('Create folder', () => {
async function openCreateFolderDialog(name: string) {
await page.dataTable.doubleClickOnRowByName(name);
await page.sidenav.openCreateFolderDialog();
await page.toolbar.openCreateFolderDialog();
await createDialog.waitForDialogToOpen();
}

View File

@@ -88,7 +88,9 @@ describe('Create library', () => {
});
it('[C280024] Create Library dialog UI', async () => {
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
expect(await createDialog.getDialogTitle()).toMatch('Create Library');
@@ -104,7 +106,9 @@ describe('Create library', () => {
});
it('[C280025] Create a public library', async () => {
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
await createDialog.enterName(site1Name);
await BrowserActions.click(createDialog.createButton);
@@ -117,7 +121,9 @@ describe('Create library', () => {
});
it('[C289880] Create a moderated library', async () => {
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
await createDialog.enterName(site2Name);
await BrowserActions.click(createDialog.visibilityModerated);
@@ -131,7 +137,9 @@ describe('Create library', () => {
});
it('[C289881] Create a private library', async () => {
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
await createDialog.enterName(site3Name);
await BrowserActions.click(createDialog.visibilityPrivate);
@@ -145,7 +153,9 @@ describe('Create library', () => {
});
it('[C289882] Create a library with a given ID and description', async () => {
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
await createDialog.enterName(site4.name);
await createDialog.enterLibraryId(site4.id);
@@ -162,7 +172,9 @@ describe('Create library', () => {
});
it('[C280027] Duplicate library ID', async () => {
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
await createDialog.enterName(duplicateSite.name);
await createDialog.enterLibraryId(duplicateSite.id);
@@ -172,7 +184,9 @@ describe('Create library', () => {
});
it('[C280028] Create library using the ID of a library from the Trashcan', async () => {
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
await createDialog.enterName(siteInTrash.name);
await createDialog.enterLibraryId(siteInTrash.id);
@@ -182,7 +196,9 @@ describe('Create library', () => {
});
it('[C280029] Cancel button', async () => {
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
await createDialog.enterName('test site');
await createDialog.enterDescription('test description');
@@ -194,7 +210,8 @@ describe('Create library', () => {
it('[C280026] Library ID cannot contain special characters', async () => {
const idWithSpecialChars = ['a*a', 'a"a', 'a<a', 'a>a', `a\\a`, 'a/a', 'a?a', 'a:a', 'a|a'];
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
await createDialog.enterName('test site');
@@ -206,7 +223,9 @@ describe('Create library', () => {
});
it('[C280030] Create 2 libraries with same name but different IDs', async () => {
await page.sidenav.openCreateLibraryDialog();
await page.goToMyLibrariesAndWait();
await page.toolbar.openCreateLibraryDialog();
await createDialog.waitForDialogToOpen();
await createDialog.enterName(duplicateSite.name);
await createDialog.enterLibraryId(`${duplicateSite.id}-2`);

View File

@@ -111,7 +111,7 @@ describe('Restore from Trash', () => {
const action = await page.getSnackBarAction();
expect(action).toContain('View');
expect(await dataTable.isItemPresent(site)).toBe(false, `${site} was not removed from list`);
await page.clickFileLibrariesAndWait();
await page.goToMyLibrariesAndWait();
expect(await page.dataTable.isItemPresent(site)).toBe(true, `${site} not displayed in list`);
});

View File

@@ -60,7 +60,7 @@ describe('Library actions', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable, toolbar } = page;
const { searchInput } = page.header;
const { searchInput } = page.pageLayoutHeader;
const confirmDialog = new ConfirmDialog();
const adminApiActions = new AdminActions();
@@ -111,9 +111,10 @@ describe('Library actions', () => {
});
it('[C306959] from Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(siteSearchPublic1Admin);
await searchInput.searchForLibrary(siteSearchPublic1Admin);
await dataTable.waitForBody();
await dataTable.selectItem(siteSearchPublic1Admin);
await BrowserActions.click(toolbar.joinButton);
@@ -144,9 +145,10 @@ describe('Library actions', () => {
});
it('[C306960] from Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(siteSearchModerated1Admin);
await searchInput.searchForLibrary(siteSearchModerated1Admin);
await dataTable.waitForBody();
await dataTable.selectItem(siteSearchModerated1Admin);
await BrowserActions.click(toolbar.joinButton);
@@ -202,9 +204,10 @@ describe('Library actions', () => {
});
it('[C306961] from Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(siteSearchPublic2Admin);
await searchInput.searchForLibrary(siteSearchPublic2Admin);
await dataTable.waitForBody();
await dataTable.selectItem(siteSearchPublic2Admin);
@@ -277,9 +280,10 @@ describe('Library actions', () => {
});
it('[C306962] from Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(siteSearchModerated2Admin);
await searchInput.searchForLibrary(siteSearchModerated2Admin);
await dataTable.waitForBody();
await dataTable.selectItem(siteSearchModerated2Admin);
@@ -312,9 +316,10 @@ describe('Library actions', () => {
});
it('[C306963] from Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(siteSearchPublic3Admin);
await searchInput.searchForLibrary(siteSearchPublic3Admin);
await dataTable.waitForBody();
await dataTable.selectItem(siteSearchPublic3Admin);
@@ -365,9 +370,10 @@ describe('Library actions', () => {
});
it('[C306964] from Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(siteSearchPublic4Admin);
await searchInput.searchForLibrary(siteSearchPublic4Admin);
await dataTable.waitForBody();
await dataTable.selectItem(siteSearchPublic4Admin);
@@ -407,9 +413,10 @@ describe('Library actions', () => {
});
it('[C306965] from Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(siteSearchForDelete);
await searchInput.searchForLibrary(siteSearchForDelete);
await dataTable.waitForBody();
await dataTable.selectItem(siteSearchForDelete);

View File

@@ -123,6 +123,7 @@ describe('Unshare a file from Search Results', () => {
});
it('[C306995] Unshare dialog UI', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(file1);
@@ -143,6 +144,7 @@ describe('Unshare a file from Search Results', () => {
});
it('[C306996] Unshare a file', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(file2);
@@ -169,6 +171,7 @@ describe('Unshare a file from Search Results', () => {
});
it('[C306997] Cancel the Unshare action', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(file3);
@@ -192,6 +195,7 @@ describe('Unshare a file from Search Results', () => {
});
it('[C306999] Unshare a file from the context menu', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(file4);
@@ -219,6 +223,7 @@ describe('Unshare a file from Search Results', () => {
});
it('[C306998] Consumer - on Search Results - file shared by other user', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileSite1);
@@ -238,6 +243,7 @@ describe('Unshare a file from Search Results', () => {
});
it('[C307000] Consumer - on Search Results - file shared by the user', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileSite2);

View File

@@ -53,9 +53,9 @@ describe('Upload files', () => {
beforeEach(async () => {
await page.clickPersonalFilesAndWait();
await dataTable.doubleClickOnRowByName(folder1);
await page.sidenav.openNewMenu();
await page.sidenav.menu.uploadFilesInput.sendKeys(`${__dirname}/upload-file.test.ts`);
await page.sidenav.closeNewMenu();
await page.toolbar.openUploadMenu();
await page.toolbar.menu.uploadFilesInput.sendKeys(`${__dirname}/upload-file.test.ts`);
await page.toolbar.closeUploadMenu();
await page.uploadFilesDialog.uploadDialog.isVisible();
});

View File

@@ -94,7 +94,7 @@ describe('Upload new version', () => {
const searchResultsPage = new SearchResultsPage();
const { dataTable, toolbar } = page;
const uploadNewVersionDialog = new UploadNewVersionDialog();
const { searchInput } = page.header;
const { searchInput } = page.pageLayoutHeader;
const adminActions = new AdminActions();
const userActions = new UserActions();
@@ -140,6 +140,7 @@ describe('Upload new version', () => {
});
it('[C307003] dialog UI defaults', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(file);
@@ -159,6 +160,7 @@ describe('Upload new version', () => {
});
it('[C307004] file is updated after uploading a new version - major', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileSearch1);
@@ -181,6 +183,7 @@ describe('Upload new version', () => {
});
it('[C307005] file is updated after uploading a new version - minor', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileSearch2);
@@ -203,6 +206,7 @@ describe('Upload new version', () => {
});
it('[C307006] file is not updated when clicking Cancel', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileSearch3);
@@ -223,6 +227,7 @@ describe('Upload new version', () => {
});
it('[C307007] upload new version fails when new file name already exists', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileSearch4);
@@ -246,6 +251,7 @@ describe('Upload new version', () => {
});
it('[C307008] file is unlocked after uploading a new version', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileLockedSearch1);
@@ -269,6 +275,7 @@ describe('Upload new version', () => {
});
it('[C307009] file remains locked after canceling of uploading a new version', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileLockedSearch2);

View File

@@ -120,7 +120,7 @@ describe('Version actions', () => {
});
it('[C586768] Should be possible to download a previous document version', async () => {
await viewerPage.toolbar.downloadButton.click();
await viewerPage.toolbar.viewerDownloadButton.click();
expect(await Utils.fileExistsOnOS(filesToUpload[0])).toBe(true, 'File not found in download location');
});

View File

@@ -40,12 +40,13 @@ const PAGE_TITLES = {
describe('Page titles', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { toolbar } = page;
const username = `user-${Utils.random()}`;
const apis = new RepoClient(username, username);
const adminApiActions = new AdminActions();
const file = `file-${Utils.random()}.txt`;
let fileId: string;
const { searchInput } = page.header;
const { searchInput } = page.pageLayoutHeader;
beforeAll(async () => {
await adminApiActions.createUser({ username });
@@ -124,6 +125,7 @@ describe('Page titles', () => {
});
it('[C280413] Search Results page', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(file);
expect(await browser.getTitle()).toContain(PAGE_TITLES.SEARCH);

View File

@@ -140,7 +140,7 @@ describe('Extensions - Viewer', () => {
await page.dataTable.doubleClickOnRowByName(pdfFile.fileName);
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
await toolbar.openMoreMenu();
await toolbar.openViewerMoreMenu();
expect(await toolbar.menu.isMenuItemPresent(customSecondaryAction.title)).toBe(true, 'action is not present');
expect(await toolbar.menu.getItemIconText(customSecondaryAction.title)).toEqual(customSecondaryAction.icon);
expect(await toolbar.menu.getItemIdAttribute(customSecondaryAction.title)).toEqual(customSecondaryAction.id);
@@ -150,7 +150,7 @@ describe('Extensions - Viewer', () => {
await page.dataTable.doubleClickOnRowByName(pdfFile.fileName);
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
await toolbar.openMoreMenu();
await toolbar.openViewerMoreMenu();
expect(await BrowserActions.getAttribute(toolbar.menu.getItemById(moveAction.id), 'title')).toEqual(moveAction.title);
});
@@ -158,7 +158,7 @@ describe('Extensions - Viewer', () => {
await page.dataTable.doubleClickOnRowByName(pdfFile.fileName);
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
await toolbar.openMoreMenu();
await toolbar.openViewerMoreMenu();
expect(await toolbar.menu.managePermissionsAction.isPresent()).toBe(false, 'Action is still displayed');
});
});

View File

@@ -85,7 +85,7 @@ describe('Library properties', () => {
});
beforeEach(async () => {
await page.clickFileLibrariesAndWait();
await page.goToMyLibrariesAndWait();
});
afterEach(async () => {

View File

@@ -28,8 +28,8 @@ describe('Empty list views', () => {
const username = `user-${Utils.random()}`;
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable, pagination } = page;
const { searchInput } = page.header;
const { dataTable, pagination, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
const adminApiActions = new AdminActions();
beforeAll(async () => {
@@ -134,6 +134,7 @@ describe('Empty list views', () => {
});
it('[C290123] Search results - pagination controls not displayed', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
/* cspell:disable-next-line */
await searchInput.searchFor('qwertyuiop');
@@ -148,10 +149,12 @@ describe('Empty list views', () => {
});
it('[C290020] Empty Search results - Libraries', async () => {
await page.goToMyLibraries();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
/* cspell:disable-next-line */
await searchInput.searchFor('qwertyuiop');
await searchInput.searchForLibrary('qwertyuiop');
await dataTable.waitForBody();
expect(await dataTable.isEmpty()).toBe(true, 'list is not empty');
@@ -159,6 +162,8 @@ describe('Empty list views', () => {
});
it('[C290031] Empty Search results - Files / Folders', async () => {
await page.clickPersonalFiles();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
/* cspell:disable-next-line */

View File

@@ -33,8 +33,8 @@ describe('Special permissions', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable } = page;
const { searchInput } = page.header;
const { dataTable, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
const adminApiActions = new AdminActions();
const userActions = new UserActions();
@@ -101,6 +101,7 @@ describe('Special permissions', () => {
});
it('[C290122] on Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileName);
@@ -163,6 +164,7 @@ describe('Special permissions', () => {
});
it('[C306868] on Search results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileName);

View File

@@ -136,12 +136,12 @@ describe('Breadcrumb', () => {
});
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(parentFromSite);
await page.dataTable.doubleClickOnRowByName(subFolder1FromSite);
await page.dataTable.doubleClickOnRowByName(subFolder2FromSite);
const expectedItems = ['Favorite Libraries', siteName, parentFromSite, subFolder1FromSite, subFolder2FromSite];
const expectedItems = ['My Libraries', siteName, parentFromSite, subFolder1FromSite, subFolder2FromSite];
expect(await breadcrumb.getAllItems()).toEqual(expectedItems);
});

View File

@@ -28,9 +28,9 @@ import { APP_ROUTES, SIDEBAR_LABELS, LoginPage, BrowsingPage, SearchResultsPage,
describe('Sidebar', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { sidenav, header } = page;
const { sidenav, toolbar } = page;
const searchResultsPage = new SearchResultsPage();
const { searchInput } = searchResultsPage.header;
const { searchInput } = searchResultsPage.pageLayoutHeader;
beforeAll(async () => {
await loginPage.loginWithAdmin();
@@ -38,7 +38,12 @@ describe('Sidebar', () => {
beforeEach(async () => {
await Utils.pressEscape();
await header.expandSideNav();
await sidenav.expandSideNav();
});
afterEach(async () => {
await Utils.pressEscape();
await page.clickPersonalFiles();
});
it('[C217149] has "Personal Files" as default', async () => {
@@ -46,31 +51,15 @@ describe('Sidebar', () => {
expect(await sidenav.isActive(SIDEBAR_LABELS.PERSONAL_FILES)).toBe(true, 'Default active link');
});
it('[C217150] File Libraries has correct sub-categories', async () => {
await page.clickFileLibraries();
expect(await sidenav.isFileLibrariesMenuExpanded()).toBe(true, 'File Libraries not expanded');
expect(await sidenav.getLink(SIDEBAR_LABELS.MY_LIBRARIES).isPresent()).toBe(true, 'My Libraries link not present');
expect(await sidenav.getLink(SIDEBAR_LABELS.FAVORITE_LIBRARIES).isPresent()).toBe(true, 'Favorite Libraries link not present');
});
it('[C289900] Favorite Libraries is automatically selected on expanding File Libraries', async () => {
await sidenav.expandFileLibraries();
expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.FAVORITE_LIBRARIES);
expect(await sidenav.isActive(SIDEBAR_LABELS.FILE_LIBRARIES)).toBe(true, 'File Libraries is not active');
expect(await sidenav.isActive(SIDEBAR_LABELS.FAVORITE_LIBRARIES)).toBe(true, 'Favorite Libraries link not active');
});
it('[C289902] navigate to Favorite Libraries', async () => {
await page.goToFavoriteLibraries();
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');
});
it('[C289901] navigate to My Libraries', async () => {
await page.goToMyLibraries();
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');
});
@@ -107,126 +96,98 @@ describe('Sidebar', () => {
it('[C217151] Personal Files tooltip', async () => {
await page.clickPersonalFiles();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.PERSONAL_FILES)).toContain('View your Personal Files');
await header.collapseSideNav();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.PERSONAL_FILES)).toContain('View your Personal Files');
});
it('[C213111] Shared Files tooltip', async () => {
await page.clickSharedFiles();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.SHARED_FILES)).toContain('View files that have been shared');
await header.collapseSideNav();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.SHARED_FILES)).toContain('View files that have been shared');
});
it('[C213167] Recent Files tooltip', async () => {
await page.clickRecentFiles();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.RECENT_FILES)).toContain('View files you recently edited');
await header.collapseSideNav();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.RECENT_FILES)).toContain('View files you recently edited');
});
it('[C217153] Favorites tooltip', async () => {
await page.clickFavorites();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.FAVORITES)).toContain('View your favorite files and folders');
await header.collapseSideNav();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.FAVORITES)).toContain('View your favorite files and folders');
});
it('[C217154] Trash tooltip', async () => {
await page.clickTrash();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.TRASH)).toContain('View deleted files in the trash');
await header.collapseSideNav();
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');
await header.collapseSideNav();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.FILE_LIBRARIES)).toContain('File Libraries');
});
it('[C289916] My Libraries tooltip', async () => {
await page.goToMyLibraries();
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 () => {
await page.goToFavoriteLibraries();
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.FAVORITE_LIBRARIES)).toContain('Access my favorite libraries');
await header.collapseSideNav();
await sidenav.clickLink(SIDEBAR_LABELS.FILE_LIBRARIES);
expect(await sidenav.getLinkTooltip(SIDEBAR_LABELS.FAVORITE_LIBRARIES)).toContain('Access my favorite libraries');
});
it('[C269095] default state is expanded', async () => {
expect(await header.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
expect(await sidenav.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
});
it('[C269096] sidebar toggle', async () => {
await header.collapseSideNav();
expect(await header.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
await sidenav.collapseSideNav();
expect(await sidenav.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
await header.expandSideNav();
expect(await header.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
await sidenav.expandSideNav();
expect(await sidenav.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
});
it('[C269100] sidebar state is preserved on page refresh', async () => {
expect(await header.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
expect(await sidenav.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
await page.refresh();
expect(await header.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
expect(await sidenav.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
await header.collapseSideNav();
expect(await header.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
await sidenav.collapseSideNav();
expect(await sidenav.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
await page.refresh();
expect(await header.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
expect(await sidenav.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
});
it('[C269102] sidebar state is preserved after logout / login', async () => {
await header.collapseSideNav();
await sidenav.collapseSideNav();
await page.signOut();
await loginPage.loginWithAdmin();
expect(await header.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
expect(await sidenav.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
});
it('[C277223] sidebar is collapsed automatically when Search Results opens', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
/* cspell:disable-next-line */
await searchInput.searchFor('qwertyuiop');
await searchResultsPage.waitForResults();
expect(await header.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
expect(await sidenav.isSidenavExpanded()).toBe(false, 'Sidebar not collapsed');
});
it('[C277224] sidenav returns to the default state when navigating away from the Search Results page', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
/* cspell:disable-next-line */
await searchInput.searchFor('qwertyuiop');
await searchResultsPage.waitForResults();
await page.clickFavorites();
expect(await header.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
expect(await sidenav.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
});
it('[C277230] sidenav can be expanded when search results page is displayed', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
/* cspell:disable-next-line */
await searchInput.searchFor('qwertyuiop');
await searchResultsPage.waitForResults();
await header.expandSideNav();
await sidenav.expandSideNav();
expect(await header.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
expect(await sidenav.isSidenavExpanded()).toBe(true, 'Sidebar not expanded');
});
});

View File

@@ -46,9 +46,9 @@ describe('Single click on item name', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable, breadcrumb } = page;
const { dataTable, breadcrumb, toolbar } = page;
const viewer = new Viewer();
const { searchInput } = page.header;
const { searchInput } = page.pageLayoutHeader;
const adminApiActions = new AdminActions();
const userActions = new UserActions();
@@ -116,7 +116,7 @@ describe('Single click on item name', () => {
describe('on File Libraries', () => {
beforeEach(async () => {
await page.clickFileLibrariesAndWait();
await page.goToMyLibrariesAndWait();
});
it('[C284901] Hyperlink appears when mouse over a library', async () => {
@@ -206,6 +206,7 @@ describe('Single click on item name', () => {
describe('on Search Results', () => {
beforeEach(async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
});

View File

@@ -27,12 +27,13 @@ import { BrowsingPage, LoginPage, Utils } from '@alfresco/aca-testing-shared';
export function searchResultsTests(username: string, random: string) {
const page = new BrowsingPage();
const loginPage = new LoginPage();
const { dataTable, pagination } = page;
const { searchInput } = page.header;
const { dataTable, pagination, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
describe('Pagination controls : ', () => {
beforeAll(async () => {
await loginPage.loginWith(username);
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFiles();
await searchInput.searchFor(random);

View File

@@ -43,8 +43,8 @@ describe('Pagination on single page', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { pagination } = page;
const { searchInput } = page.header;
const { pagination, toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
const searchResultsPage = new SearchResultsPage();
beforeAll(async () => {
@@ -115,6 +115,7 @@ describe('Pagination on single page', () => {
});
it('[C290124] page selector not displayed on Search results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(file);
await searchResultsPage.waitForResults();

View File

@@ -74,8 +74,8 @@ describe('Search filters', () => {
const loginPage = new LoginPage();
const page = new SearchResultsPage();
const { searchInput } = page.header;
const { dataTable, filters } = page;
const { searchInput } = page.pageLayoutHeader;
const { dataTable, filters, toolbar } = page;
const sizeFilter = filters.size;
const fileTypeFilter = filters.fileType;
@@ -107,7 +107,7 @@ describe('Search filters', () => {
beforeEach(async () => {
await Utils.pressEscape();
await page.clickPersonalFilesAndWait();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(`search-filters-${random}`);
await dataTable.waitForBody();

View File

@@ -27,7 +27,8 @@ import { BrowsingPage, LoginPage, Utils } from '@alfresco/aca-testing-shared';
describe('Search input', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { searchInput } = page.header;
const { toolbar } = page;
const { searchInput } = page.pageLayoutHeader;
beforeAll(async () => {
await loginPage.loginWithAdmin();
@@ -38,11 +39,15 @@ describe('Search input', () => {
await page.clickPersonalFiles();
});
it('[C289847] Search input is displayed in the app header', async () => {
it('[C289847] Search icon is displayed in toolbar and clicking on it displays search input container', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
expect(await searchInput.isSearchContainerDisplayed()).toBe(true, 'search controls not displayed');
});
it('[C289848] Search options are displayed when clicking in the search input', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
expect(await searchInput.isOptionsAreaDisplayed()).toBe(true, 'Search options not displayed');
expect(await searchInput.isFilesOptionEnabled()).toBe(true, 'Files option not enabled');
@@ -54,6 +59,7 @@ describe('Search input', () => {
});
it('[C289849] Search options are correctly enabled / disabled', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.clickFilesOption();

View File

@@ -51,8 +51,8 @@ describe('Search results - files and folders', () => {
const loginPage = new LoginPage();
const page = new SearchResultsPage();
const { searchInput } = page.header;
const { dataTable, breadcrumb } = page;
const { searchInput } = page.pageLayoutHeader;
const { dataTable, breadcrumb, toolbar } = page;
const adminApiActions = new AdminActions();
beforeAll(async () => {
@@ -72,6 +72,7 @@ describe('Search results - files and folders', () => {
beforeEach(async () => {
await page.refresh();
await page.clickPersonalFilesAndWait();
});
afterAll(async () => {
@@ -83,16 +84,8 @@ describe('Search results - files and folders', () => {
]);
});
it('[C307002] Results page title', async () => {
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(random);
await dataTable.waitForBody();
expect(await page.breadcrumb.currentItem.getText()).toEqual('Search Results');
});
it('[C279183] File information', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(random);
@@ -114,6 +107,7 @@ describe('Search results - files and folders', () => {
});
it('[C306867] Folder information', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(random);
@@ -133,6 +127,7 @@ describe('Search results - files and folders', () => {
});
it('[C290029] Search file with special characters', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(fileRussian);
@@ -142,6 +137,7 @@ describe('Search results - files and folders', () => {
});
it('[C279177] Location column redirect - file in user Home', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(file);

View File

@@ -41,7 +41,7 @@ describe('Search results general', () => {
const loginPage = new LoginPage();
const page = new SearchResultsPage();
const { searchInput } = page.header;
const { searchInput, toolbar } = page.pageLayoutHeader;
const dataTable = page.dataTable;
const adminApiActions = new AdminActions();
@@ -66,7 +66,13 @@ describe('Search results general', () => {
await page.refresh();
});
afterEach(async () => {
await Utils.pressEscape();
await page.clickPersonalFiles();
});
it('[C290005] Only files are returned when Files option is the only one checked', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFiles();
await searchInput.searchFor(random);
@@ -78,6 +84,7 @@ describe('Search results general', () => {
});
it('[C290006] Only folders are returned when Folders option is the only one checked', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkOnlyFolders();
await searchInput.searchFor(random);
@@ -89,6 +96,7 @@ describe('Search results general', () => {
});
it('[C290007] Files and folders are returned when both Files and Folders options are checked', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(random);
@@ -100,9 +108,10 @@ describe('Search results general', () => {
});
it('[C290008] Only libraries are returned when Libraries option is checked', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(random);
await searchInput.searchForLibrary(random);
await page.waitForResults();
expect(await dataTable.isItemPresent(file)).toBe(false, `${file} is displayed`);
@@ -111,6 +120,7 @@ describe('Search results general', () => {
});
it('[C279162] Results are updated automatically when changing the search term', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(file);
await page.waitForResults();
@@ -120,15 +130,17 @@ describe('Search results general', () => {
await searchInput.clickSearchButton();
await searchInput.searchFor(folder);
await page.waitForResults();
expect(await dataTable.isItemPresent(file)).toBe(false, `${file} is displayed`);
expect(await dataTable.isItemPresent(folder)).toBe(true, `${folder} is not displayed`);
});
it('[C279178] Results are returned when accessing an URL containing a search query', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(site);
await searchInput.searchForLibrary(site);
await page.waitForResults();
expect(await dataTable.isItemPresent(site)).toBe(true, `${site} not displayed`);

View File

@@ -69,7 +69,7 @@ describe('Search results - libraries', () => {
const loginPage = new LoginPage();
const page = new SearchResultsPage();
const { searchInput } = page.header;
const { searchInput, toolbar } = page.pageLayoutHeader;
const dataTable = page.dataTable;
const adminApiActions = new AdminActions();
@@ -136,9 +136,10 @@ describe('Search results - libraries', () => {
});
it('[C290012] Search library - full name match', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(site1.name);
await searchInput.searchForLibrary(site1.name);
await dataTable.waitForBody();
expect(await dataTable.isItemPresent(site1.name)).toBe(true, `${site1.name} not displayed`);
@@ -148,9 +149,10 @@ describe('Search results - libraries', () => {
});
it('[C290013] Search library - partial name match', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(`lib-${random}`);
await searchInput.searchForLibrary(`lib-${random}`);
await dataTable.waitForBody();
expect(await dataTable.isItemPresent(site1.name)).toBe(true, `${site1.name} not displayed`);
@@ -160,9 +162,10 @@ describe('Search results - libraries', () => {
});
it('[C290014] Search library - description match', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(site4.description);
await searchInput.searchForLibrary(site4.description);
await dataTable.waitForBody();
expect(await dataTable.isItemPresent(site1.name)).toBe(false, `${site1.name} displayed`);
@@ -172,18 +175,20 @@ describe('Search results - libraries', () => {
});
it('[C290015] Results page title', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(random);
await searchInput.searchForLibrary(random);
await dataTable.waitForBody();
expect(await page.breadcrumb.currentItem.getText()).toEqual('Libraries found...');
});
it('[C290016] Results page columns', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(site1.name);
await searchInput.searchForLibrary(site1.name);
await dataTable.waitForBody();
const expectedColumns = ['Name', 'Description', 'My Role', 'Visibility'];
@@ -193,9 +198,10 @@ describe('Search results - libraries', () => {
});
it('[C290017] Library visibility is correctly displayed', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(`user-site-${random}`);
await searchInput.searchForLibrary(`user-site-${random}`);
await dataTable.waitForBody();
const expectedSitesVisibility = {
@@ -212,9 +218,10 @@ describe('Search results - libraries', () => {
});
it('[C290018] User role is correctly displayed', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(`admin-${random}-site`);
await searchInput.searchForLibrary(`admin-${random}-site`);
await dataTable.waitForBody();
const expectedSitesRoles = {
@@ -232,18 +239,20 @@ describe('Search results - libraries', () => {
});
it('[C290019] Private sites are not displayed when user is not a member', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(`admin-${random}-site`);
await searchInput.searchForLibrary(`admin-${random}-site`);
await dataTable.waitForBody();
expect(await dataTable.isItemPresent(adminPrivate)).toBe(false, `${adminPrivate} is displayed`);
});
it('[C290028] Search libraries with special characters', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkLibraries();
await searchInput.searchFor(siteRussian.name);
await searchInput.searchForLibrary(siteRussian.name);
await dataTable.waitForBody();
expect(await dataTable.isItemPresent(siteRussian.name)).toBe(true, `${siteRussian.name} not displayed`);

View File

@@ -52,8 +52,8 @@ describe('Search sorting', () => {
const loginPage = new LoginPage();
const page = new SearchResultsPage();
const { searchInput } = page.header;
const { dataTable } = page;
const { searchInput } = page.pageLayoutHeader;
const { dataTable, toolbar } = page;
const adminApiActions = new AdminActions();
beforeAll(async () => {
@@ -74,7 +74,7 @@ describe('Search sorting', () => {
beforeEach(async () => {
await Utils.pressEscape();
await page.clickPersonalFilesAndWait();
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.searchFor(`search sort ${random}`);
await dataTable.waitForBody();

View File

@@ -37,6 +37,7 @@ import {
UploadFilesDialog
} from '@alfresco/aca-testing-shared';
import { Logger } from '@alfresco/adf-testing';
import { By, element } from 'protractor';
describe('Viewer actions', () => {
const username = `user-${Utils.random()}`;
@@ -63,6 +64,8 @@ describe('Viewer actions', () => {
const userActions = new UserActions();
const uploadFilesDialog = new UploadFilesDialog();
const downloadButton = element(By.css(`button[id='app.viewer.download']`));
const shareButton = element(By.css(`adf-viewer [data-automation-id="share-action-button"]`));
beforeAll(async () => {
await adminApiActions.createUser({ username });
@@ -143,7 +146,7 @@ describe('Viewer actions', () => {
await dataTable.doubleClickOnRowByName(docxPersonalFiles);
await viewer.waitForViewerToOpen();
await toolbar.downloadButton.click();
await downloadButton.click();
expect(await Utils.fileExistsOnOS(docxPersonalFiles)).toBe(true, 'File not found in download location');
});
@@ -568,7 +571,7 @@ describe('Viewer actions', () => {
await dataTable.doubleClickOnRowByName(docxFavorites);
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
await toolbar.shareButton.click();
await shareButton.click();
expect(await shareDialog.isDialogOpen()).toBe(true, 'Dialog is not open');
await shareDialog.clickClose();
});

View File

@@ -49,9 +49,9 @@ describe('Viewer general', () => {
const loginPage = new LoginPage();
const page = new BrowsingPage();
const { dataTable } = page;
const { dataTable, toolbar } = page;
const viewer = new Viewer();
const { searchInput } = page.header;
const { searchInput } = page.pageLayoutHeader;
const adminApiActions = new AdminActions();
const userActions = new UserActions();
@@ -182,6 +182,7 @@ describe('Viewer general', () => {
});
it('[C279175] Viewer opens for a file from Search Results', async () => {
await toolbar.clickSearchIconButton();
await searchInput.clickSearchButton();
await searchInput.checkFilesAndFolders();
await searchInput.searchFor(xlsxFile);