mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-10 14:11:42 +00:00
[ADF-5235] Facet fix and improve search test (#6122)
* improve search test * fix * fix * fix * changes * modify * logout public URL * improve stability some e2e * fx lint * fix * fix * improve * fix * improve * fix * fix * fix * fix [skip ci] * fix * some fix [skip ci] * fix * fix lint * fix * fix * fix * fix * fix * fix * fix * fix * fix * convert C291893 in manual test case in testrail * fix * fix
This commit is contained in:
@@ -13,7 +13,12 @@ install:
|
||||
|
||||
env:
|
||||
global:
|
||||
#E2E VARIABLES
|
||||
- SAVE_SCREENSHOT=true
|
||||
- REDIRECT_URI=/
|
||||
- REDIRECT_URI_LOGOUT=/logout/
|
||||
- BROWSER_RUN=true
|
||||
- MAXINSTANCES=2
|
||||
|
||||
branches:
|
||||
only:
|
||||
@@ -57,7 +62,7 @@ jobs:
|
||||
- ./scripts/lint.sh
|
||||
- ./scripts/travis/release/release-npm.sh
|
||||
- ./scripts/travis/release/release-docker.sh
|
||||
|
||||
|
||||
after_success:
|
||||
- ./scripts/travis/release/release-docker.sh
|
||||
- ./scripts/ci/utils/artifact-to-s3.sh -a ./dist/demo-shell -o "$S3_DBP_FOLDER/alfresco-demoshell.tar.bz2"
|
||||
|
@@ -24,7 +24,8 @@
|
||||
"redirectUriLogout": "/logout",
|
||||
"publicUrls": [
|
||||
"**/preview/s/*",
|
||||
"**/settings"
|
||||
"**/settings",
|
||||
"**/logout"
|
||||
]
|
||||
},
|
||||
"application": {
|
||||
|
@@ -51,12 +51,12 @@ export class DemoPermissionComponent implements OnInit {
|
||||
this.nodeService
|
||||
.getNode(this.nodeId, {include: ['permissions'] })
|
||||
.subscribe( (currentNode: MinimalNodeEntryEntity) => {
|
||||
this.toggleStatus = currentNode.permissions.isInheritanceEnabled;
|
||||
this.toggleStatus = currentNode.permissions?.isInheritanceEnabled ?? false;
|
||||
});
|
||||
}
|
||||
|
||||
onUpdatedPermissions(node: MinimalNodeEntryEntity) {
|
||||
this.toggleStatus = node.permissions.isInheritanceEnabled;
|
||||
this.toggleStatus = node.permissions?.isInheritanceEnabled ?? false;
|
||||
this.displayPermissionComponent.reload();
|
||||
}
|
||||
|
||||
|
@@ -96,7 +96,7 @@ describe('Comment Component', () => {
|
||||
await apiService.getInstance().core.commentsApi.addComment(nodeId, { content: comments.test });
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
|
||||
@@ -111,7 +111,7 @@ describe('Comment Component', () => {
|
||||
|
||||
it('[C276948] Should be able to add a comment on a file', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
@@ -127,7 +127,7 @@ describe('Comment Component', () => {
|
||||
|
||||
it('[C280021] Should be able to add a multiline comment on a file', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
@@ -151,7 +151,6 @@ describe('Comment Component', () => {
|
||||
|
||||
it('[C280022] Should not be able to add an HTML or other code input into the comment input filed', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
@@ -198,7 +197,6 @@ describe('Comment Component', () => {
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
await viewerPage.viewFile(pngUploadedFile.entry.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
await viewerPage.checkInfoButtonIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
|
@@ -101,7 +101,7 @@ describe('Create folder directive', () => {
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
|
||||
await contentServicesPage.doubleClickRow(folderName);
|
||||
await contentServicesPage.openFolder(folderName);
|
||||
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
|
@@ -46,13 +46,12 @@ describe('Create library directive', () => {
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
createSite = await apiService.getInstance().core.sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(20).toLowerCase(),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -86,15 +85,14 @@ describe('Create library directive', () => {
|
||||
const libraryName = 'cancelLibrary';
|
||||
|
||||
await createLibraryDialog.typeLibraryName(libraryName);
|
||||
|
||||
await createLibraryDialog.clickCancel();
|
||||
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
});
|
||||
|
||||
it('[C290160] Should create a public library', async () => {
|
||||
const libraryName = StringUtil.generateRandomString();
|
||||
const libraryDescription = StringUtil.generateRandomString();
|
||||
|
||||
await createLibraryDialog.typeLibraryName(libraryName);
|
||||
await createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
await createLibraryDialog.selectPublic();
|
||||
@@ -104,8 +102,6 @@ describe('Create library directive', () => {
|
||||
await createLibraryDialog.clickCreate();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
|
||||
await expect(await createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
|
||||
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectMySitesSourceType();
|
||||
await customSourcesPage.checkRowIsDisplayed(libraryName);
|
||||
@@ -116,6 +112,7 @@ describe('Create library directive', () => {
|
||||
it('[C290173] Should create a private library', async () => {
|
||||
const libraryName = StringUtil.generateRandomString();
|
||||
const libraryDescription = StringUtil.generateRandomString();
|
||||
|
||||
await createLibraryDialog.typeLibraryName(libraryName);
|
||||
await createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
await createLibraryDialog.selectPrivate();
|
||||
@@ -125,8 +122,6 @@ describe('Create library directive', () => {
|
||||
await createLibraryDialog.clickCreate();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
|
||||
await expect(await createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
|
||||
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectMySitesSourceType();
|
||||
await customSourcesPage.checkRowIsDisplayed(libraryName);
|
||||
@@ -148,8 +143,6 @@ describe('Create library directive', () => {
|
||||
await createLibraryDialog.clickCreate();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
|
||||
await expect(await createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
|
||||
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectMySitesSourceType();
|
||||
await customSourcesPage.checkRowIsDisplayed(libraryName);
|
||||
@@ -247,8 +240,6 @@ describe('Create library directive', () => {
|
||||
|
||||
await createLibraryDialog.clickCreate();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
|
||||
await expect(await createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create library dialog remained open');
|
||||
});
|
||||
|
||||
it('[C290179] Should not accept more than the expected characters for input fields', async () => {
|
||||
|
@@ -109,6 +109,7 @@ describe('Delete Directive', () => {
|
||||
});
|
||||
|
||||
describe('Handling multiselection', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await uploadActions.uploadFile(txtFileModel.location, txtFileModel.name, baseFolderUploaded.entry.id);
|
||||
await uploadActions.uploadFile(file0BytesModel.location, file0BytesModel.name, baseFolderUploaded.entry.id);
|
||||
|
@@ -173,7 +173,7 @@ describe('Favorite directive', () => {
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(testFolder1.entry.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
await contentServicesPage.doubleClickRow(testFolder1.entry.name);
|
||||
await contentServicesPage.openFolder(testFolder1.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
|
@@ -175,7 +175,7 @@ describe('Restore content directive', () => {
|
||||
|
||||
it('[C260240] Should validate restore when the original location no longer exists', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(folderWithFolder.entry.name);
|
||||
await contentServicesPage.openFolder(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(subFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(subFolder.entry.name);
|
||||
@@ -204,7 +204,7 @@ describe('Restore content directive', () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(folderWithFolder.entry.name);
|
||||
await contentServicesPage.openFolder(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
});
|
||||
|
||||
@@ -266,7 +266,7 @@ describe('Restore content directive', () => {
|
||||
await contentServicesPage.selectSite(publicSite.entry.title);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(siteFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(siteFolder.entry.name);
|
||||
await contentServicesPage.openFolder(siteFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(siteFile.entry.name);
|
||||
await notificationHistoryPage.checkNotifyContains(publicSite.entry.id + ' item restored');
|
||||
});
|
||||
@@ -287,7 +287,6 @@ describe('Restore content directive', () => {
|
||||
|
||||
await loginPage.login(anotherAcsUser.email, anotherAcsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -318,9 +317,9 @@ describe('Restore content directive', () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(parentFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(mainFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(mainFile.entry.name);
|
||||
await contentServicesPage.doubleClickRow(parentFolder.entry.name);
|
||||
await contentServicesPage.openFolder(parentFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithin.entry.name);
|
||||
await contentServicesPage.doubleClickRow(folderWithin.entry.name);
|
||||
await contentServicesPage.openFolder(folderWithin.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFile.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFile.entry.name);
|
||||
});
|
||||
|
@@ -15,24 +15,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { browser } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
BreadcrumbPage,
|
||||
BreadcrumbDropdownPage,
|
||||
ContentNodeSelectorDialogPage,
|
||||
LoginPage,
|
||||
PaginationPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { InfinitePaginationPage } from '../../core/pages/infinite-pagination.page';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
|
||||
describe('Document List Component - Actions', () => {
|
||||
@@ -40,17 +35,12 @@ describe('Document List Component - Actions', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const contentListPage = contentServicesPage.getDocumentList();
|
||||
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
||||
const paginationPage = new PaginationPage();
|
||||
const breadCrumbDropdownPage = new BreadcrumbDropdownPage();
|
||||
const breadCrumbPage = new BreadcrumbPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const infinitePaginationPage = new InfinitePaginationPage(element(by.css('adf-content-node-selector')));
|
||||
|
||||
describe('Document List Component - Check Actions', () => {
|
||||
let uploadedFolder, secondUploadedFolder;
|
||||
@@ -89,7 +79,7 @@ describe('Document List Component - Actions', () => {
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await browser.sleep(10000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -98,6 +88,7 @@ describe('Document List Component - Actions', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
describe('File Actions', () => {
|
||||
@@ -110,7 +101,7 @@ describe('Document List Component - Actions', () => {
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(uploadedFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
});
|
||||
|
||||
@@ -135,7 +126,7 @@ describe('Document List Component - Actions', () => {
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFileModel.name);
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(uploadedFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
});
|
||||
|
||||
@@ -151,7 +142,7 @@ describe('Document List Component - Actions', () => {
|
||||
});
|
||||
|
||||
it('[C280561] Should be able to delete a file via dropdown menu', async () => {
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(uploadedFolder.entry.name);
|
||||
|
||||
await contentServicesPage.checkContentIsDisplayed(fileNames[0]);
|
||||
await contentServicesPage.deleteContent(fileNames[0]);
|
||||
@@ -159,7 +150,7 @@ describe('Document List Component - Actions', () => {
|
||||
});
|
||||
|
||||
it('[C280562] Only one file is deleted when multiple files are selected using dropdown menu', async () => {
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(uploadedFolder.entry.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().selectRow(fileNames[1]);
|
||||
await contentServicesPage.getDocumentList().selectRow(fileNames[2]);
|
||||
@@ -169,7 +160,7 @@ describe('Document List Component - Actions', () => {
|
||||
});
|
||||
|
||||
it('[C280565] Should be able to delete a file using context menu', async () => {
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(uploadedFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(fileNames[2]);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(fileNames[2]);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Delete');
|
||||
@@ -177,7 +168,7 @@ describe('Document List Component - Actions', () => {
|
||||
});
|
||||
|
||||
it('[C280567] Only one file is deleted when multiple files are selected using context menu', async () => {
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(uploadedFolder.entry.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().selectRow(fileNames[3]);
|
||||
await contentServicesPage.getDocumentList().selectRow(fileNames[4]);
|
||||
@@ -216,7 +207,7 @@ describe('Document List Component - Actions', () => {
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(secondUploadedFolder.entry.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.doubleClickRow(secondUploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(secondUploadedFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
});
|
||||
|
||||
@@ -256,140 +247,4 @@ describe('Document List Component - Actions', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Folder Actions - Copy and Move', () => {
|
||||
const folderModel1 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel2 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel3 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel4 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel5 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel6 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
|
||||
let folder1, folder2, folder3, folder4, folder5, folder6;
|
||||
|
||||
let folders;
|
||||
const contentServicesUser = new UserModel();
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
await usersActions.createUser(contentServicesUser);
|
||||
await apiService.getInstance().login(contentServicesUser.email, contentServicesUser.password);
|
||||
folder1 = await uploadActions.createFolder('A' + folderModel1.name, '-my-');
|
||||
folder2 = await uploadActions.createFolder('B' + folderModel2.name, '-my-');
|
||||
folder3 = await uploadActions.createFolder('C' + folderModel3.name, '-my-');
|
||||
folder4 = await uploadActions.createFolder('D' + folderModel4.name, '-my-');
|
||||
folder5 = await uploadActions.createFolder('E' + folderModel5.name, '-my-');
|
||||
folder6 = await uploadActions.createFolder('F' + folderModel6.name, '-my-');
|
||||
folders = [folder1, folder2, folder3, folder4, folder5, folder6];
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(contentServicesUser.email, contentServicesUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await paginationPage.selectItemsPerPage('5');
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentListPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
for (const folder of folders) {
|
||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C260132] Move action on folder with - Load more', async () => {
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
|
||||
await expect(await contentNodeSelector.getDialogHeaderText()).toBe('Move \'' + 'A' + folderModel1.name + '\' to...');
|
||||
await contentNodeSelector.checkSearchInputIsDisplayed();
|
||||
await expect(await contentNodeSelector.getSearchLabel()).toBe('Search');
|
||||
await contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentNodeSelector.checkCancelButtonIsDisplayed();
|
||||
await contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
||||
|
||||
await expect(await contentNodeSelector.getMoveCopyButtonText()).toBe('MOVE');
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickCancelButton();
|
||||
await contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
||||
await contentServicesPage.doubleClickRow('F' + folderModel6.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await breadCrumbDropdownPage.clickParentFolder();
|
||||
await breadCrumbDropdownPage.checkBreadCrumbDropdownIsDisplayed();
|
||||
await breadCrumbDropdownPage.choosePath(contentServicesUser.email);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
||||
|
||||
await breadCrumbPage.chooseBreadCrumb(contentServicesUser.email);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
});
|
||||
|
||||
it('[C305051] Copy action on folder with - Load more', async () => {
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await expect(await contentNodeSelector.getDialogHeaderText()).toBe('Copy \'' + 'A' + folderModel1.name + '\' to...');
|
||||
await contentNodeSelector.checkSearchInputIsDisplayed();
|
||||
await expect(await contentNodeSelector.getSearchLabel()).toBe('Search');
|
||||
await contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentNodeSelector.checkCancelButtonIsDisplayed();
|
||||
await contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
||||
await expect(await contentNodeSelector.getMoveCopyButtonText()).toBe('COPY');
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickCancelButton();
|
||||
await contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.getDocumentList().waitForTableBody();
|
||||
await contentServicesPage.doubleClickRow('F' + folderModel6.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -222,7 +222,7 @@ describe('Document List Component', () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.doubleClickRow(folderName);
|
||||
await contentServicesPage.openFolder(folderName);
|
||||
await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
||||
await contentServicesPage.checkEmptyFolderImageUrlToContain('/assets/images/empty_doc_lib.svg');
|
||||
});
|
||||
@@ -241,7 +241,7 @@ describe('Document List Component', () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(uploadedFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(uploadedFolder.entry.name);
|
||||
await contentServicesPage.uploadFile(testFile.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.name);
|
||||
});
|
||||
@@ -345,7 +345,6 @@ describe('Document List Component', () => {
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C291843] Should be able to navigate using nodes hyperlink when activated', async () => {
|
||||
|
@@ -97,7 +97,7 @@ describe('Document List Component', () => {
|
||||
}
|
||||
});
|
||||
|
||||
await browser.driver.sleep(12000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -119,6 +119,7 @@ describe('Document List Component', () => {
|
||||
beforeEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
it('[C260128] Move - Same name file', async () => {
|
||||
@@ -142,11 +143,11 @@ describe('Document List Component', () => {
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(destinationFolder.entry.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(sourceFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(destinationFolder.entry.name);
|
||||
await contentServicesPage.openFolder(destinationFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(sourceFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(sourceFolder.entry.name);
|
||||
await contentServicesPage.openFolder(sourceFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||
await contentServicesPage.openFolder(subFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFile.entry.name);
|
||||
});
|
||||
|
||||
|
@@ -0,0 +1,185 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
BreadcrumbPage,
|
||||
BreadcrumbDropdownPage,
|
||||
ContentNodeSelectorDialogPage,
|
||||
LoginPage,
|
||||
PaginationPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { InfinitePaginationPage } from '../../core/pages/infinite-pagination.page';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
|
||||
describe('Document List Component - Actions', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const contentListPage = contentServicesPage.getDocumentList();
|
||||
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
||||
const paginationPage = new PaginationPage();
|
||||
const breadCrumbDropdownPage = new BreadcrumbDropdownPage();
|
||||
const breadCrumbPage = new BreadcrumbPage();
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const infinitePaginationPage = new InfinitePaginationPage(element(by.css('adf-content-node-selector')));
|
||||
|
||||
describe('Folder Actions - Copy and Move', () => {
|
||||
const folderModel1 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel2 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel3 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel4 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel5 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel6 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
|
||||
let folder1, folder2, folder3, folder4, folder5, folder6;
|
||||
|
||||
let folders;
|
||||
const contentServicesUser = new UserModel();
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
await usersActions.createUser(contentServicesUser);
|
||||
await apiService.getInstance().login(contentServicesUser.email, contentServicesUser.password);
|
||||
folder1 = await uploadActions.createFolder('A' + folderModel1.name, '-my-');
|
||||
folder2 = await uploadActions.createFolder('B' + folderModel2.name, '-my-');
|
||||
folder3 = await uploadActions.createFolder('C' + folderModel3.name, '-my-');
|
||||
folder4 = await uploadActions.createFolder('D' + folderModel4.name, '-my-');
|
||||
folder5 = await uploadActions.createFolder('E' + folderModel5.name, '-my-');
|
||||
folder6 = await uploadActions.createFolder('F' + folderModel6.name, '-my-');
|
||||
folders = [folder1, folder2, folder3, folder4, folder5, folder6];
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(contentServicesUser.email, contentServicesUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await paginationPage.selectItemsPerPage('5');
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentListPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
for (const folder of folders) {
|
||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C260132] Move action on folder with - Load more', async () => {
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
|
||||
await expect(await contentNodeSelector.getDialogHeaderText()).toBe('Move \'' + 'A' + folderModel1.name + '\' to...');
|
||||
await contentNodeSelector.checkSearchInputIsDisplayed();
|
||||
await expect(await contentNodeSelector.getSearchLabel()).toBe('Search');
|
||||
await contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentNodeSelector.checkCancelButtonIsDisplayed();
|
||||
await contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
||||
|
||||
await expect(await contentNodeSelector.getMoveCopyButtonText()).toBe('MOVE');
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickCancelButton();
|
||||
await contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
||||
await contentServicesPage.openFolder('F' + folderModel6.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await breadCrumbDropdownPage.clickParentFolder();
|
||||
await breadCrumbDropdownPage.checkBreadCrumbDropdownIsDisplayed();
|
||||
await breadCrumbDropdownPage.choosePath(contentServicesUser.email);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
||||
|
||||
await breadCrumbPage.chooseBreadCrumb(contentServicesUser.email);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
});
|
||||
|
||||
it('[C305051] Copy action on folder with - Load more', async () => {
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await expect(await contentNodeSelector.getDialogHeaderText()).toBe('Copy \'' + 'A' + folderModel1.name + '\' to...');
|
||||
await contentNodeSelector.checkSearchInputIsDisplayed();
|
||||
await expect(await contentNodeSelector.getSearchLabel()).toBe('Search');
|
||||
await contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentNodeSelector.checkCancelButtonIsDisplayed();
|
||||
await contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
||||
await expect(await contentNodeSelector.getMoveCopyButtonText()).toBe('COPY');
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickCancelButton();
|
||||
await contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.getDocumentList().waitForTableBody();
|
||||
await contentServicesPage.openFolder('F' + folderModel6.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
});
|
||||
});
|
||||
});
|
@@ -157,7 +157,7 @@ describe('Document List Component', () => {
|
||||
it('[C280130] Should be able to go back to List View', async () => {
|
||||
await contentServicesPage.clickGridViewButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.doubleClickRow(folderName);
|
||||
await contentServicesPage.openFolder(folderName);
|
||||
await contentServicesPage.checkRowIsDisplayed(pdfFile.name);
|
||||
});
|
||||
|
||||
|
@@ -105,7 +105,6 @@ describe('Document List - Pagination', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
it('[C260062] Should use default pagination settings', async () => {
|
||||
@@ -136,7 +135,6 @@ describe('Document List - Pagination', () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
@@ -153,25 +151,31 @@ describe('Document List - Pagination', () => {
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
let list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
|
||||
await paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 6-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(5, 10))).toEqual(true);
|
||||
|
||||
await paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 11-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(10, 15))).toEqual(true);
|
||||
|
||||
await paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
@@ -336,7 +340,7 @@ describe('Document List - Pagination', () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await browser.refresh();
|
||||
|
||||
await contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
await contentServicesPage.openFolder(newFolderModel.name);
|
||||
await contentServicesPage.uploadFile(docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
|
@@ -61,7 +61,7 @@ describe('Document List Component - Properties', () => {
|
||||
|
||||
it('[C299154] Should disallow upload content on a folder row if allowDropFiles is false', async () => {
|
||||
await navigationBar.clickContentServicesButton();
|
||||
await contentServicesPage.doubleClickRow(parentFolder.entry.name);
|
||||
await contentServicesPage.openFolder(parentFolder.entry.name);
|
||||
|
||||
await contentServicesPage.disableDropFilesInAFolder();
|
||||
|
||||
@@ -69,13 +69,13 @@ describe('Document List Component - Properties', () => {
|
||||
|
||||
await DropActions.dropFile(dragAndDropArea, pngFile.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||
await contentServicesPage.openFolder(subFolder.entry.name);
|
||||
await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
||||
});
|
||||
|
||||
it('[C91319] Should allow upload content on a folder row if allowDropFiles is true', async () => {
|
||||
await navigationBar.clickContentServicesButton();
|
||||
await contentServicesPage.doubleClickRow(parentFolder.entry.name);
|
||||
await contentServicesPage.openFolder(parentFolder.entry.name);
|
||||
|
||||
await contentServicesPage.enableDropFilesInAFolder();
|
||||
|
||||
@@ -84,7 +84,7 @@ describe('Document List Component - Properties', () => {
|
||||
await DropActions.dropFile(dragAndDropArea, pngFile.location);
|
||||
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||
await contentServicesPage.openFolder(subFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
});
|
||||
});
|
||||
|
@@ -48,7 +48,6 @@ describe('Document List - Selection', () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkDocumentListElementsAreDisplayed();
|
||||
await contentServicesPage.createNewFolder(folderModel.name);
|
||||
await contentServicesPage.uploadFile(docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
@@ -163,11 +163,11 @@ describe('Permissions Component', () => {
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleCoordinator' + fileModel.name, roleCoordinatorFolder.entry.id);
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleCollaborator' + fileModel.name, roleCollaboratorFolder.entry.id);
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleEditor' + fileModel.name, roleEditorFolder.entry.id);
|
||||
});
|
||||
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
for (const folder of folders) {
|
||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
@@ -175,13 +175,17 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
describe('Inherit and assigning permissions', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.getInstance().login(fileOwnerUser.email, fileOwnerUser.password);
|
||||
file = await uploadActions.uploadFile(fileModel.location, fileModel.name, '-my-');
|
||||
|
||||
await loginPage.login(fileOwnerUser.email, fileOwnerUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.checkContentIsDisplayed(fileModel.name);
|
||||
await contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
|
||||
await contentList.rightClickOnRow(fileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
await permissionsPage.addPermissionsDialog.checkPermissionContainerIsDisplayed();
|
||||
@@ -193,17 +197,19 @@ describe('Permissions Component', () => {
|
||||
await uploadActions.deleteFileOrFolder(file.entry.id);
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C268974] Inherit Permission', async () => {
|
||||
await permissionsPage.addPermissionsDialog.checkPermissionInheritedButtonIsDisplayed();
|
||||
await expect(await permissionsPage.addPermissionsDialog.getPermissionInheritedButtonText()).toBe('Permission Inherited');
|
||||
await permissionsPage.addPermissionsDialog.getPermissionInheritedButtonText('Permission Inherited');
|
||||
await permissionsPage.addPermissionsDialog.checkPermissionsDatatableIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.clickPermissionInheritedButton();
|
||||
await expect(await permissionsPage.addPermissionsDialog.getPermissionInheritedButtonText()).toBe('Inherit Permission');
|
||||
|
||||
await permissionsPage.addPermissionsDialog.getPermissionInheritedButtonText('Inherit Permission');
|
||||
await permissionsPage.addPermissionsDialog.checkNoPermissionsIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.clickPermissionInheritedButton();
|
||||
await expect(await permissionsPage.addPermissionsDialog.getPermissionInheritedButtonText()).toBe('Permission Inherited');
|
||||
await permissionsPage.addPermissionsDialog.getPermissionInheritedButtonText('Permission Inherited');
|
||||
await permissionsPage.addPermissionsDialog.checkPermissionsDatatableIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -238,9 +244,10 @@ describe('Permissions Component', () => {
|
||||
await permissionsPage.addPermissionsDialog.checkResultListIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkUserOrGroupIsDisplayed('EVERYONE');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Changing and duplicate Permissions', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.getInstance().login(fileOwnerUser.email, fileOwnerUser.password);
|
||||
file = await uploadActions.uploadFile(fileModel.location, fileModel.name, '-my-');
|
||||
@@ -261,6 +268,7 @@ describe('Permissions Component', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await uploadActions.deleteFileOrFolder(file.entry.id);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C274691] Should be able to add a new User with permission to the file and also change locally set permissions', async () => {
|
||||
@@ -268,19 +276,24 @@ describe('Permissions Component', () => {
|
||||
await permissionsPage.addPermissionsDialog.clickRoleDropdownByUserOrGroupName(filePermissionUser.email);
|
||||
const roleDropdownOptions = permissionsPage.addPermissionsDialog.getRoleDropdownOptions();
|
||||
await expect(await roleDropdownOptions.count()).toBe(5);
|
||||
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(0))).toBe('Contributor');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(1))).toBe('Collaborator');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(2))).toBe('Coordinator');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(3))).toBe('Editor');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(4))).toBe('Consumer');
|
||||
|
||||
await permissionsPage.addPermissionsDialog.selectOption('Collaborator');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Collaborator');
|
||||
|
||||
await permissionsPage.addPermissionsDialog.clickRoleDropdownByUserOrGroupName(filePermissionUser.email);
|
||||
await permissionsPage.addPermissionsDialog.selectOption('Coordinator');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Coordinator');
|
||||
|
||||
await permissionsPage.addPermissionsDialog.clickRoleDropdownByUserOrGroupName(filePermissionUser.email);
|
||||
await permissionsPage.addPermissionsDialog.selectOption('Editor');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Editor');
|
||||
|
||||
await permissionsPage.addPermissionsDialog.clickRoleDropdownByUserOrGroupName(filePermissionUser.email);
|
||||
await permissionsPage.addPermissionsDialog.selectOption('Consumer');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Consumer');
|
||||
@@ -302,9 +315,14 @@ describe('Permissions Component', () => {
|
||||
await permissionsPage.addPermissionsDialog.clickDeletePermissionButton();
|
||||
await permissionsPage.addPermissionsDialog.checkUserOrGroupIsDeleted(filePermissionUser.email);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Role: Consumer, Contributor, Coordinator, Collaborator, Editor, No Permissions', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C276993] Role Consumer', async () => {
|
||||
await loginPage.login(filePermissionUser.email, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleConsumerFolder.entry.id);
|
||||
@@ -428,5 +446,5 @@ describe('Permissions Component', () => {
|
||||
await permissionsPage.addPermissionsDialog.clickAddPermissionButton();
|
||||
await notificationHistoryPage.checkNotifyContains('You are not allowed to change permissions');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -165,6 +165,8 @@ describe('Permissions Component', () => {
|
||||
await loginPage.login(folderOwnerUser.email, folderOwnerUser.password);
|
||||
|
||||
await BrowserActions.getUrl(browser.baseUrl + '/files/' + publicSite.entry.guid);
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
});
|
||||
|
||||
it('[C277002] Should display the Role Site dropdown', async () => {
|
||||
|
@@ -62,7 +62,7 @@ describe('Share file', () => {
|
||||
return sharedLinkEntry.entry.nodeId === nodeIdSharedFile;
|
||||
});
|
||||
|
||||
return sharedLink !== null;
|
||||
return !!sharedLink;
|
||||
};
|
||||
|
||||
const apiCall = async () => {
|
||||
@@ -162,6 +162,7 @@ describe('Share file', () => {
|
||||
});
|
||||
|
||||
describe('Shared link preview', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
@@ -204,6 +205,7 @@ describe('Share file', () => {
|
||||
const sharedLink = await shareDialog.getShareLink();
|
||||
await shareDialog.clickCloseButton();
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await BrowserActions.getUrl(sharedLink);
|
||||
await viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
});
|
||||
|
@@ -120,6 +120,7 @@ describe('Unshare file', () => {
|
||||
|
||||
describe('with permission', () => {
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
});
|
||||
|
||||
@@ -160,7 +161,7 @@ describe('Unshare file', () => {
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
await shareDialog.clickConfirmationDialogRemoveButton();
|
||||
await shareDialog.dialogIsClosed();
|
||||
await BrowserActions.getUrl(sharedLink.replace(browser.params.testConfig.appConfig.ecmHost, browser.baseUrl ));
|
||||
await BrowserActions.getUrl(sharedLink.replace(browser.params.testConfig.appConfig.ecmHost, browser.baseUrl));
|
||||
await errorPage.checkErrorCode();
|
||||
});
|
||||
});
|
||||
@@ -173,7 +174,7 @@ describe('Unshare file', () => {
|
||||
|
||||
it('[C286555] Should NOT be able to unshare file without permission', async () => {
|
||||
await navBar.goToSite(testSite);
|
||||
await contentListPage.doubleClickRow('documentLibrary');
|
||||
await contentServicesPage.openFolder('documentLibrary');
|
||||
await contentListPage.selectRow(nodeBody.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
|
@@ -60,9 +60,7 @@ describe('Social component', () => {
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
|
||||
await usersActions.createUser(componentOwner);
|
||||
|
||||
await usersActions.createUser(componentVisitor);
|
||||
|
||||
await usersActions.createUser(secondComponentVisitor);
|
||||
|
||||
await apiService.getInstance().login(componentOwner.email, componentOwner.password);
|
||||
@@ -88,6 +86,7 @@ describe('Social component', () => {
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
await uploadActions.deleteFileOrFolder(emptyFile.entry.email);
|
||||
});
|
||||
|
||||
|
@@ -79,7 +79,7 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentListPage.doubleClickRow(folderName);
|
||||
await contentServicesPage.openFolder(folderName);
|
||||
await contentListPage.waitForTableBody();
|
||||
});
|
||||
|
||||
|
@@ -69,19 +69,16 @@ describe('Tag component', () => {
|
||||
await apiService.getInstance().core.tagsApi.addTag(nodeId, tags);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await navigationBarPage.clickTagButton();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
await uploadActions.deleteFileOrFolder(pdfUploadedFile.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
|
||||
it('[C260374] Should NOT be possible to add a new tag without Node ID', async () => {
|
||||
await navigationBarPage.clickTagButton();
|
||||
|
||||
await expect(await tagPage.getNodeId()).toEqual('');
|
||||
await expect(await tagPage.getNewTagPlaceholder()).toEqual('New Tag');
|
||||
await expect(await tagPage.addTagButtonIsEnabled()).toEqual(false);
|
||||
@@ -164,14 +161,4 @@ describe('Tag component', () => {
|
||||
await tagPage.checkShowLessButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260378] Should be possible to add multiple tags', async () => {
|
||||
await tagPage.insertNodeId(pdfFileModel.id);
|
||||
await tagPage.addTag(tagList[2]);
|
||||
|
||||
await browser.sleep(5000); // wait CS return tags
|
||||
|
||||
await tagPage.checkTagListIsOrderedAscending();
|
||||
await tagPage.checkTagListByNodeIdIsOrderedAscending();
|
||||
await tagPage.checkTagListContentServicesIsOrderedAscending();
|
||||
});
|
||||
});
|
||||
|
@@ -63,17 +63,20 @@ describe('Trashcan - Pagination', () => {
|
||||
const fileNames = StringUtil.generateFilesNames(10, noOfFiles + 9, pagination.base, pagination.extension);
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.getInstance().login(acsUser.email, acsUser.password);
|
||||
const folderUploadedModel = await uploadActions.createFolder(newFolderModel.name, '-my-');
|
||||
const emptyFiles: any = await uploadActions.createEmptyFiles(fileNames, folderUploadedModel.entry.id);
|
||||
|
||||
for (const entry of emptyFiles.list.entries) {
|
||||
await apiService.getInstance().node.deleteNode(entry.entry.id).then(() => {}, async () => {
|
||||
await apiService.getInstance().node.deleteNode(entry.entry.id);
|
||||
});
|
||||
}
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -82,7 +85,7 @@ describe('Trashcan - Pagination', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await browser.refresh();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
it('[C272811] Should be able to set Items per page to 20', async () => {
|
||||
|
@@ -134,6 +134,9 @@ describe('Upload component - Excluded Files', () => {
|
||||
|
||||
await uploadToggles.enableFolderUpload();
|
||||
await contentServicesPage.uploadFolder(folderUpload.location);
|
||||
|
||||
await contentServicesPage.checkContentIsDisplayed(folderUpload.name);
|
||||
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
BrowserActions, BrowserVisibility,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
@@ -29,7 +29,6 @@ import { UploadTogglesPage } from '../../core/pages/dialog/upload-toggles.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
import { VersionManagePage } from '../../core/pages/version-manager.page';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
|
||||
describe('Upload component', () => {
|
||||
|
||||
@@ -68,30 +67,6 @@ describe('Upload component', () => {
|
||||
const filesLocation = [pdfFileModel.location, docxFileModel.location, pngFileModel.location, firstPdfFileModel.location];
|
||||
const filesName = [pdfFileModel.name, docxFileModel.name, pngFileModel.name, firstPdfFileModel.name];
|
||||
|
||||
const parentFolder = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.FOLDER_ONE.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.FOLDER_ONE.folder_location
|
||||
});
|
||||
|
||||
const fileInsideParentFolder = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.FILE_INSIDE_FOLDER_ONE.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.FILE_INSIDE_FOLDER_ONE.file_location
|
||||
});
|
||||
const subFolder = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.FOLDER_TWO.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.FOLDER_TWO.folder_location
|
||||
});
|
||||
|
||||
const fileInsideSubFolder = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.FILE_INSIDE_FOLDER_TWO.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.FILE_INSIDE_FOLDER_TWO.file_location
|
||||
});
|
||||
|
||||
const adfBigFolder = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.ADF_FOLDER.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.ADF_FOLDER.folder_location
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
acsUser = await usersActions.createUser();
|
||||
@@ -209,46 +184,4 @@ describe('Upload component', () => {
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C291893] Should enable folder upload in selected node', async () => {
|
||||
await contentServicesPage.checkUploadButton();
|
||||
await expect(await uploadToggles.checkFolderUploadToggleIsNotEnabled()).toBe(true);
|
||||
|
||||
await uploadToggles.enableFolderUpload();
|
||||
await expect(await uploadToggles.checkFolderUploadToggleIsEnabled()).toBe(true);
|
||||
await contentServicesPage.uploadFolder(parentFolder.location);
|
||||
await uploadDialog.fileIsUploaded(fileInsideParentFolder.name);
|
||||
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
await contentServicesPage.openFolder(parentFolder.name);
|
||||
await expect(await uploadToggles.checkFolderUploadToggleIsNotEnabled()).toBe(true);
|
||||
await uploadToggles.enableFolderUpload();
|
||||
await expect(await uploadToggles.checkFolderUploadToggleIsEnabled()).toBe(true);
|
||||
await contentServicesPage.uploadFolder(subFolder.location);
|
||||
await uploadDialog.fileIsUploaded(fileInsideSubFolder.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
await uploadToggles.enableFolderUpload();
|
||||
|
||||
await browser.executeScript(` setInterval(() => {
|
||||
if(document.querySelector('[data-automation-id="adf"]')){
|
||||
document.querySelector("#adf-upload-dialog-cancel-all").click();
|
||||
document.querySelector("#adf-upload-dialog-cancel").click();
|
||||
}
|
||||
}, 2000)`);
|
||||
await contentServicesPage.uploadFolder(adfBigFolder.location);
|
||||
|
||||
await uploadDialog.fileIsUploaded('a_png_noBackground_file.PNG');
|
||||
await uploadDialog.fileIsCancelled('a_png_noBackground_file.PNG');
|
||||
|
||||
await BrowserVisibility.waitUntilElementHasText(uploadDialog.title, 'Upload canceled');
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.openFolder(adfBigFolder.name);
|
||||
await browser.sleep(2000); // We need to wai when we upload too many files we have to wait the revert
|
||||
await expect(contentServicesPage.numberOfResultsDisplayed()).toBe(0);
|
||||
});
|
||||
});
|
||||
|
@@ -181,10 +181,11 @@ describe('Upload component', () => {
|
||||
|
||||
it('[C260174] Should be possible to set a max size', async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
await uploadToggles.enableMaxSize();
|
||||
await uploadToggles.checkMaxSizeToggleIsEnabled();
|
||||
await uploadToggles.addMaxSize('400');
|
||||
|
||||
await contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
await uploadDialog.fileIsUploaded(fileWithSpecificSize.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
@@ -194,8 +195,6 @@ describe('Upload component', () => {
|
||||
await uploadToggles.addMaxSize('399');
|
||||
await contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
|
||||
// await expect(await contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size');
|
||||
|
||||
await contentServicesPage.checkContentIsNotDisplayed(fileWithSpecificSize.name);
|
||||
await uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
|
||||
await contentServicesPage.uploadFile(emptyFile.location);
|
||||
|
@@ -18,6 +18,7 @@
|
||||
import { ApiService, BrowserActions, ErrorPage, LoginPage, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
import { ContentServicesPage } from './pages/content-services.page';
|
||||
|
||||
describe('Error Component', () => {
|
||||
|
||||
@@ -28,12 +29,14 @@ describe('Error Component', () => {
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
await usersActions.createUser(acsUser);
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
@@ -74,7 +74,6 @@ describe('Enable infinite scrolling', () => {
|
||||
emptyFolderModel = await uploadActions.createFolder('emptyFolder', '-my-');
|
||||
|
||||
await uploadActions.createEmptyFiles(fileNames, folderUploadedModel.entry.id);
|
||||
|
||||
deleteUploaded = await uploadActions.createFolder('deleteFolder', '-my-');
|
||||
|
||||
await uploadActions.createEmptyFiles(deleteFileNames, deleteUploaded.entry.id);
|
||||
@@ -86,11 +85,11 @@ describe('Enable infinite scrolling', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
it('[C260484] Should be possible to enable infinite scrolling', async () => {
|
||||
await contentServicesPage.doubleClickRow(folderModel.name);
|
||||
await contentServicesPage.openFolder(folderModel.name);
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoadedInfinitePagination();
|
||||
@@ -120,9 +119,7 @@ describe('Enable infinite scrolling', () => {
|
||||
});
|
||||
|
||||
it('[C299201] Should use default pagination settings for infinite pagination', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.doubleClickRow(folderModel.name);
|
||||
await contentServicesPage.openFolder(folderModel.name);
|
||||
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoadedInfinitePagination();
|
||||
@@ -138,10 +135,7 @@ describe('Enable infinite scrolling', () => {
|
||||
it('[C299202] Should not display load more button when all the files are already displayed', async () => {
|
||||
await LocalStorageUtil.setUserPreference('paginationSize', '30');
|
||||
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
await contentServicesPage.doubleClickRow(folderModel.name);
|
||||
await contentServicesPage.openFolder(folderModel.name);
|
||||
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
@@ -150,10 +144,7 @@ describe('Enable infinite scrolling', () => {
|
||||
});
|
||||
|
||||
it('[C299203] Should not display load more button when a folder is empty', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
await contentServicesPage.doubleClickRow(emptyFolderModel.entry.name);
|
||||
await contentServicesPage.openFolder(emptyFolderModel.entry.name);
|
||||
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
});
|
||||
|
@@ -38,7 +38,12 @@ describe('Login component - SSO', () => {
|
||||
it('[C261050] Should be possible login with SSO', async () => {
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.appConfig.ecmHost,
|
||||
browser.params.testConfig.appConfig.oauth2.host,
|
||||
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId);
|
||||
browser.params.testConfig.appConfig.identityHost,
|
||||
false,
|
||||
true,
|
||||
browser.params.testConfig.appConfig.oauth2.clientId,
|
||||
browser.params.testConfig.appConfig.oauth2.redirectUriLogout);
|
||||
|
||||
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
});
|
||||
|
||||
@@ -49,18 +54,22 @@ describe('Login component - SSO', () => {
|
||||
browser.params.testConfig.appConfig.identityHost,
|
||||
true,
|
||||
true,
|
||||
browser.params.testConfig.appConfig.oauth2.clientId
|
||||
);
|
||||
browser.params.testConfig.appConfig.oauth2.clientId,
|
||||
browser.params.testConfig.appConfig.oauth2.redirectUriLogout);
|
||||
|
||||
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Login component - SSO Grant type password (implicit flow false)', () => {
|
||||
it('[C299158] Should be possible to login with SSO, with grant type password (Implicit Flow false)', async () => {
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.appConfig.ecmHost,
|
||||
browser.params.testConfig.appConfig.oauth2.host,
|
||||
browser.params.testConfig.appConfig.identityHost, false, false, browser.params.testConfig.appConfig.oauth2.clientId);
|
||||
browser.params.testConfig.appConfig.identityHost,
|
||||
false,
|
||||
false,
|
||||
browser.params.testConfig.appConfig.oauth2.clientId,
|
||||
browser.params.testConfig.appConfig.oauth2.redirectUriLogout);
|
||||
|
||||
await loginPage.waitForElements();
|
||||
|
||||
|
@@ -15,22 +15,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, SettingsPage } from '@alfresco/adf-testing';
|
||||
import { BrowserActions, LoginPage, SettingsPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Logout component - SSO', () => {
|
||||
|
||||
const settingsPage = new SettingsPage();
|
||||
const loginSSOPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
it('[C280665] Should be possible change the logout redirect URL', async () => {
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.appConfig.ecmHost,
|
||||
browser.params.testConfig.appConfig.oauth2.host,
|
||||
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId, '/login');
|
||||
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await BrowserActions.clickExecuteScript('.app-sidenav-link[adf-logout]');
|
||||
|
||||
await browser.sleep(2000);
|
||||
|
||||
|
@@ -275,22 +275,26 @@ export class ContentServicesPage {
|
||||
return BrowserActions.getText(this.recentFileIcon);
|
||||
}
|
||||
|
||||
// @deprecated prefer waitTillContentLoaded
|
||||
async checkDocumentListElementsAreDisplayed(): Promise<void> {
|
||||
await this.checkAcsContainer();
|
||||
await this.waitForTableBody();
|
||||
}
|
||||
|
||||
// @deprecated prefer waitTillContentLoaded
|
||||
async checkAcsContainer(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.uploadBorder);
|
||||
}
|
||||
|
||||
// @deprecated prefer waitTillContentLoaded
|
||||
async waitForTableBody(): Promise<void> {
|
||||
await this.contentList.waitForTableBody();
|
||||
await this.contentList.dataTablePage().waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async goToDocumentList(): Promise<void> {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await this.contentList.dataTablePage().waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async clickOnContentServices(): Promise<void> {
|
||||
@@ -352,10 +356,9 @@ export class ContentServicesPage {
|
||||
return this.checkListIsSortedByCreatedColumn(sortOrder);
|
||||
}
|
||||
|
||||
async doubleClickRow(nodeName): Promise<void> {
|
||||
Logger.log(`Open Folder ${nodeName}`);
|
||||
async doubleClickRow(nodeName: string): Promise<void> {
|
||||
Logger.log(`Open Folder/File ${nodeName}`);
|
||||
await this.contentList.doubleClickRow(nodeName);
|
||||
await this.contentList.dataTablePage().waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async selectRow(nodeName): Promise<void> {
|
||||
@@ -405,6 +408,7 @@ export class ContentServicesPage {
|
||||
|
||||
async openFolder(folderName: string): Promise<void> {
|
||||
await this.doubleClickRow(folderName);
|
||||
await this.contentList.dataTablePage().waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async checkContentIsDisplayed(content): Promise<void> {
|
||||
@@ -695,7 +699,7 @@ export class ContentServicesPage {
|
||||
async selectItemWithCheckbox(itemName: string): Promise<void> {
|
||||
const item = element(by.css(`adf-datatable-row[aria-label="${itemName}"] mat-checkbox .mat-checkbox-input`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(item);
|
||||
await BrowserActions.clickScript(item);
|
||||
await BrowserActions.click(item);
|
||||
}
|
||||
|
||||
async unSelectItemWithCheckbox(itemName: string): Promise<void> {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, browser, protractor } from 'protractor';
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class CreateLibraryDialogPage {
|
||||
@@ -47,7 +47,7 @@ export class CreateLibraryDialogPage {
|
||||
}
|
||||
|
||||
async isDialogOpen(): Promise<any> {
|
||||
return browser.isElementPresent(this.libraryDialog);
|
||||
return BrowserVisibility.waitUntilElementIsVisible(this.libraryDialog);
|
||||
}
|
||||
|
||||
async getTitle(): Promise<string> {
|
||||
|
@@ -15,7 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, ElementFinder } from 'protractor';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class IconsPage {
|
||||
|
||||
@@ -28,7 +29,7 @@ export class IconsPage {
|
||||
}
|
||||
|
||||
async isCustomIconDisplayed(name: string) {
|
||||
const present = await browser.isElementPresent(this.locateCustomIcon(name));
|
||||
const present = await BrowserVisibility.waitUntilElementIsVisible(this.locateCustomIcon(name));
|
||||
if (present) {
|
||||
return this.locateCustomIcon(name).isDisplayed();
|
||||
} else {
|
||||
@@ -37,7 +38,7 @@ export class IconsPage {
|
||||
}
|
||||
|
||||
async isLigatureIconDisplayed(name: string) {
|
||||
const present = await browser.isElementPresent(this.locateLigatureIcon(name));
|
||||
const present = await BrowserVisibility.waitUntilElementIsVisible(this.locateLigatureIcon(name));
|
||||
if (present) {
|
||||
return this.locateLigatureIcon(name).isDisplayed();
|
||||
} else {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AppListCloudPage, BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { AppListCloudPage, BrowserActions, BrowserVisibility, Logger } from '@alfresco/adf-testing';
|
||||
import { browser, by, element, ElementFinder } from 'protractor';
|
||||
import { ProcessServicesPage } from '../../process-services/pages/process-services.page';
|
||||
|
||||
@@ -35,8 +35,11 @@ export class NavigationBarPage {
|
||||
menuButton = element(by.css('button[data-automation-id="adf-menu-icon"]'));
|
||||
formButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Form"]'));
|
||||
peopleGroupCloudButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="People/Group Cloud"]'));
|
||||
logoutSection: ElementFinder = element(by.css('div[data-automation-id="adf-logout-section"]'));
|
||||
|
||||
async clickNavigationBarItem(title: string): Promise<void> {
|
||||
Logger.log(`clickNavigationBarItem ${title}`);
|
||||
|
||||
const menu = element(by.css(`.app-sidenav-link[data-automation-id="${title}"]`));
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(menu);
|
||||
@@ -63,8 +66,8 @@ export class NavigationBarPage {
|
||||
}
|
||||
|
||||
async clickProcessCloudButton() {
|
||||
await this.clickNavigationBarItem('Process Cloud');
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.linkMenuChildrenContainer);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.clickUntilIsNotVisible(this.getMenuItem('Process Cloud'), this.linkMenuChildrenContainer);
|
||||
}
|
||||
|
||||
async navigateToProcessServicesCloudPage(): Promise<AppListCloudPage> {
|
||||
@@ -87,8 +90,12 @@ export class NavigationBarPage {
|
||||
}
|
||||
|
||||
async clickProcessServicesButton() {
|
||||
await this.clickNavigationBarItem('Process Services');
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.linkMenuChildrenContainer);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.clickUntilIsNotVisible(this.getMenuItem('Process Services'), this.linkMenuChildrenContainer);
|
||||
}
|
||||
|
||||
private getMenuItem(title: string) {
|
||||
return element(by.css(`.app-sidenav-link[data-automation-id="${title}"]`));
|
||||
}
|
||||
|
||||
async navigateToProcessServicesPage(): Promise<ProcessServicesPage> {
|
||||
@@ -172,8 +179,14 @@ export class NavigationBarPage {
|
||||
}
|
||||
|
||||
async clickLogoutButton(): Promise<void> {
|
||||
Logger.log('Logout');
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.clickExecuteScript('.app-sidenav-link[adf-logout]');
|
||||
|
||||
try {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.logoutSection);
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
|
||||
async clickThemeButton(): Promise<void> {
|
||||
|
@@ -143,7 +143,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.checkDocumentListElementsAreDisplayed();
|
||||
|
||||
await contentServicesPage.doubleClickRow(lastFolderResponse.entry.name);
|
||||
await contentServicesPage.openFolder(lastFolderResponse.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileInfo.name);
|
||||
|
||||
await viewerPage.viewFile(pngFileUploaded.entry.name);
|
||||
|
@@ -88,7 +88,7 @@ describe('Viewer', () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await navigationBarPage.goToSite(site);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await viewerPage.viewFile(pngFileUploaded.entry.name);
|
||||
|
||||
|
@@ -15,8 +15,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { ApiService, LoginPage, UploadActions, UserModel, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
import {
|
||||
ApiService,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
@@ -102,7 +110,7 @@ describe('Content Services Viewer', () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await uploadActions.deleteFileOrFolder(pdfFile.getId());
|
||||
@@ -113,11 +121,9 @@ describe('Content Services Viewer', () => {
|
||||
await uploadActions.deleteFileOrFolder(pptFile.getId());
|
||||
await uploadActions.deleteFileOrFolder(unsupportedFile.getId());
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260038] Should display first page, toolbar and pagination when opening a .pdf file', async () => {
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
await viewerPage.viewFile(pdfFile.name);
|
||||
await viewerPage.checkZoomInButtonIsDisplayed();
|
||||
|
||||
@@ -369,7 +375,9 @@ describe('Content Services Viewer', () => {
|
||||
});
|
||||
|
||||
it('[C269109] Should not be able to open thumbnail panel before the pdf is loaded', async () => {
|
||||
await viewerPage.viewFile(pdfFile.name);
|
||||
const fileView = element.all(by.css(`#document-list-container div[data-automation-id="${pdfFile.name}"]`)).first();
|
||||
await BrowserActions.click(fileView);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
|
||||
await viewerPage.checkThumbnailsBtnIsDisabled();
|
||||
|
||||
|
@@ -68,8 +68,6 @@ describe('Viewer - properties', () => {
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
await viewerPage.viewFile(pngFile.name);
|
||||
|
||||
await viewerPage.clickLeftSidebarButton();
|
||||
|
@@ -75,23 +75,30 @@ describe('Edit task filters cloud', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
it('[C291785] All the filters property should be set up accordingly with the Query Param', async () => {
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getStatusFilterDropDownValue()).toEqual('ASSIGNED');
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('CreatedDate');
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getOrderFilterDropDownValue()).toEqual('DESC');
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(assignedTaskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(completedTaskName);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('Completed Tasks');
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getStatusFilterDropDownValue()).toEqual('COMPLETED');
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('CreatedDate');
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getOrderFilterDropDownValue()).toEqual('DESC');
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(assignedTaskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTaskName);
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||
@@ -99,8 +106,12 @@ describe('Edit task filters cloud', () => {
|
||||
|
||||
it('[C306896] Delete Save and Save as actions should be displayed and disabled when clicking on default filter header', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
const editTaskFilterCloudComponent = tasksCloudDemoPage.editTaskFilterCloudComponent();
|
||||
|
||||
@@ -118,8 +129,12 @@ describe('Edit task filters cloud', () => {
|
||||
await createNewCustomFilter('New');
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('custom-new');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('custom-new');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('New');
|
||||
const editTaskFilterCloudComponent = tasksCloudDemoPage.editTaskFilterCloudComponent();
|
||||
await editTaskFilterCloudComponent.setSortFilterDropDown('Priority');
|
||||
@@ -142,20 +157,26 @@ describe('Edit task filters cloud', () => {
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().checkSaveAsButtonIsEnabled()).toEqual(false);
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().checkDeleteButtonIsEnabled()).toEqual(true);
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('CreatedDate');
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('custom-new');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Id');
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickDeleteButton();
|
||||
});
|
||||
|
||||
it('[C291796] Two filters with same name can be created when clicking the Save As button', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
const editTaskFilterCloudComponent = tasksCloudDemoPage.editTaskFilterCloudComponent();
|
||||
await editTaskFilterCloudComponent.openFilter();
|
||||
await editTaskFilterCloudComponent.setSortFilterDropDown('Id');
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickSaveAsButton();
|
||||
|
||||
@@ -177,6 +198,7 @@ describe('Edit task filters cloud', () => {
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Priority');
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickDeleteButton();
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('custom-new');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Id');
|
||||
@@ -185,12 +207,15 @@ describe('Edit task filters cloud', () => {
|
||||
|
||||
it('[C291797] A filter is overrided when clicking on save button', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
const editTaskFilterCloudComponent = tasksCloudDemoPage.editTaskFilterCloudComponent();
|
||||
await editTaskFilterCloudComponent.openFilter();
|
||||
await editTaskFilterCloudComponent.setSortFilterDropDown('Id');
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickSaveAsButton();
|
||||
|
||||
const editTaskFilterDialog = await tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog();
|
||||
@@ -211,12 +236,15 @@ describe('Edit task filters cloud', () => {
|
||||
|
||||
it('[C291798] A filter is deleted when clicking on delete button', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
const editTaskFilterCloudComponent = tasksCloudDemoPage.editTaskFilterCloudComponent();
|
||||
await editTaskFilterCloudComponent.openFilter();
|
||||
await editTaskFilterCloudComponent.setSortFilterDropDown('Id');
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickSaveAsButton();
|
||||
|
||||
const editTaskFilterDialog = await tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog();
|
||||
@@ -234,29 +262,42 @@ describe('Edit task filters cloud', () => {
|
||||
|
||||
it('[C291800] Task filter should not be created when task filter dialog is closed', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
const editTaskFilterCloudComponent = tasksCloudDemoPage.editTaskFilterCloudComponent();
|
||||
await editTaskFilterCloudComponent.openFilter();
|
||||
await editTaskFilterCloudComponent.setSortFilterDropDown('Priority');
|
||||
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Priority');
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickSaveAsButton();
|
||||
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog().getFilterName()).toEqual('My Tasks');
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog().setFilterName('Cancel');
|
||||
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog().getFilterName()).toEqual('Cancel');
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog().clickOnCancelButton();
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.checkTaskFilterNotDisplayed('Cancel');
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toEqual('My Tasks');
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('CreatedDate');
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||
});
|
||||
|
||||
it('[C291801] Save button of task filter dialog should be disabled when task name is empty', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
const editTaskFilterCloudComponent = tasksCloudDemoPage.editTaskFilterCloudComponent();
|
||||
await editTaskFilterCloudComponent.openFilter();
|
||||
@@ -279,6 +320,8 @@ describe('Edit task filters cloud', () => {
|
||||
|
||||
it('[C291799] Task filter dialog is displayed when clicking on Save As button', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
const tasksCloud = tasksCloudDemoPage.editTaskFilterCloudComponent();
|
||||
await tasksCloud.openFilter();
|
||||
await tasksCloud.setSortFilterDropDown('Id');
|
||||
@@ -293,12 +336,14 @@ describe('Edit task filters cloud', () => {
|
||||
|
||||
async function createNewCustomFilter(name: string): Promise<void> {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
const editTaskFilterCloudComponent = tasksCloudDemoPage.editTaskFilterCloudComponent();
|
||||
await editTaskFilterCloudComponent.openFilter();
|
||||
await editTaskFilterCloudComponent.setSortFilterDropDown('Id');
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickSaveAsButton();
|
||||
|
||||
|
@@ -85,28 +85,43 @@ describe('Form Field Component - Dropdown Widget', () => {
|
||||
|
||||
it('[C290069] Should be able to read rest service dropdown options, save and complete the task form', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(task.entry.name);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(task.entry.name);
|
||||
|
||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||
|
||||
await taskFormCloudComponent.formFields().checkFormIsDisplayed();
|
||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Dropdown097maj');
|
||||
await dropdown.selectOption('Clementine Bauch', 'dropdown-cloud-widget mat-select');
|
||||
|
||||
await expect(await dropdown.getSelectedOptionText('Dropdown097maj')).toBe('Clementine Bauch');
|
||||
|
||||
await taskFormCloudComponent.checkSaveButtonIsDisplayed();
|
||||
await taskFormCloudComponent.clickSaveButton();
|
||||
|
||||
await expect(await dropdown.getSelectedOptionText('Dropdown097maj')).toBe('Clementine Bauch');
|
||||
|
||||
await taskFormCloudComponent.checkCompleteButtonIsDisplayed();
|
||||
await taskFormCloudComponent.clickCompleteButton();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(task.entry.name);
|
||||
await notificationHistoryPage.checkNotifyContains('Task has been saved successfully');
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(task.entry.name);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(task.entry.name);
|
||||
|
||||
await taskFormCloudComponent.formFields().checkFormIsDisplayed();
|
||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Dropdown097maj');
|
||||
|
||||
await expect(await dropdown.getSelectedOptionText('Dropdown097maj')).toBe('Clementine Bauch');
|
||||
|
||||
await taskFormCloudComponent.checkCompleteButtonIsNotDisplayed();
|
||||
});
|
||||
});
|
||||
|
@@ -22,7 +22,7 @@ import {
|
||||
EditTaskFilterCloudComponentPage,
|
||||
BrowserVisibility,
|
||||
TaskListCloudComponentPage,
|
||||
BrowserActions, DropdownPage
|
||||
BrowserActions, DropdownPage, Logger
|
||||
} from '@alfresco/adf-testing';
|
||||
|
||||
export class TasksCloudDemoPage {
|
||||
@@ -166,4 +166,29 @@ export class TasksCloudDemoPage {
|
||||
await BrowserActions.click(this.newTaskButton);
|
||||
}
|
||||
|
||||
async waitTillContentLoaded(): Promise<void> {
|
||||
if (this.isSpinnerPresent()) {
|
||||
Logger.log('wait loading spinner disappear');
|
||||
await BrowserVisibility.waitUntilElementIsNotPresent(element(by.tagName('mat-spinner')));
|
||||
} else {
|
||||
try {
|
||||
Logger.log('wait loading spinner is present');
|
||||
await BrowserVisibility.waitUntilElementIsPresent(element(by.tagName('mat-spinner')));
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async isSpinnerPresent(): Promise<boolean> {
|
||||
let isSpinnerPresent;
|
||||
|
||||
try {
|
||||
isSpinnerPresent = await element(by.tagName('mat-spinner')).isDisplayed();
|
||||
} catch (error) {
|
||||
isSpinnerPresent = false;
|
||||
}
|
||||
|
||||
return isSpinnerPresent;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -83,9 +83,11 @@ describe('People Groups Cloud Component', () => {
|
||||
await peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
|
||||
await peopleGroupCloudComponentPage.clickPeopleFilerByApp();
|
||||
await peopleGroupCloudComponentPage.enterPeopleAppName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name);
|
||||
|
||||
await peopleCloudComponent.searchAssignee(testUser.firstName);
|
||||
await peopleCloudComponent.checkUserIsDisplayed(`${testUser.firstName} ${testUser.lastName}`);
|
||||
await peopleCloudComponent.selectAssigneeFromList(`${testUser.firstName} ${testUser.lastName}`);
|
||||
|
||||
await browser.sleep(100);
|
||||
await expect(await peopleCloudComponent.checkSelectedPeople(`${testUser.firstName} ${testUser.lastName}`));
|
||||
});
|
||||
|
@@ -145,6 +145,7 @@ describe('Process Task - Attach content file', () => {
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(taskName);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(taskName);
|
||||
|
||||
await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters();
|
||||
|
@@ -274,6 +274,8 @@ describe('Start Task Form', () => {
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedById(taskId);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedById(taskId);
|
||||
|
||||
await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters();
|
||||
@@ -454,6 +456,8 @@ describe('Start Task Form', () => {
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedById(taskId);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedById(taskId);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRowByTaskId(taskId);
|
||||
await contentFileWidget.checkFileIsAttached(testFileModel.name);
|
||||
@@ -489,6 +493,8 @@ describe('Start Task Form', () => {
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedById(taskId);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedById(taskId);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRowByTaskId(taskId);
|
||||
await contentFileWidget.checkFileIsAttached(testFileModel.name);
|
||||
|
@@ -191,6 +191,7 @@ describe('Start Task', () => {
|
||||
await browser.driver.sleep(1000);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
});
|
||||
|
@@ -46,6 +46,7 @@ describe('Start Task - Group Cloud Component', () => {
|
||||
const apiService = new ApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const rolesService = new RolesService(apiService);
|
||||
|
||||
const bothGroupsTaskName = StringUtil.generateRandomString(5);
|
||||
const oneGroupTaskName = StringUtil.generateRandomString(5);
|
||||
@@ -58,9 +59,8 @@ describe('Start Task - Group Cloud Component', () => {
|
||||
apsUser = await identityService.createIdentityUser();
|
||||
|
||||
hrGroup = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
testGroup = await groupIdentityService.getGroupInfoByGroupName('testgroup');
|
||||
testGroup = await groupIdentityService.createIdentityGroup();
|
||||
|
||||
const rolesService = new RolesService(apiService);
|
||||
const apsAdminRoleId = await rolesService.getRoleIdByRoleName(identityService.ROLES.ACTIVITI_USER);
|
||||
await groupIdentityService.assignRole(testGroup.id, apsAdminRoleId, identityService.ROLES.ACTIVITI_USER);
|
||||
|
||||
|
@@ -53,19 +53,19 @@ describe('Task filters cloud', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
|
||||
testUser = await identityService.createIdentityUserWithRole( [identityService.ROLES.ACTIVITI_USER]);
|
||||
testUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]);
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
@@ -78,10 +78,14 @@ describe('Task filters cloud', () => {
|
||||
await tasksService.claimTask(task.entry.id, simpleApp);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('Completed Tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(newTask);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(newTask);
|
||||
@@ -94,10 +98,14 @@ describe('Task filters cloud', () => {
|
||||
|
||||
await queryService.getTaskByStatus(toBeCompletedTask.entry.name, simpleApp, 'COMPLETED');
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(completedTask);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('Completed Tasks');
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTask);
|
||||
|
@@ -327,6 +327,7 @@ describe('Task form cloud component', () => {
|
||||
|
||||
async function chooseFilterAndSelectTaskByName(filterName: string, taskName: string): Promise<void> {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(filterName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(taskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(taskName);
|
||||
}
|
||||
@@ -339,6 +340,7 @@ describe('Task form cloud component', () => {
|
||||
|
||||
async function chooseFilter(filterName: string, filterTitle: string): Promise<void> {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(filterName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe(filterTitle);
|
||||
}
|
||||
});
|
||||
|
@@ -143,6 +143,8 @@ describe('Task form cloud component', () => {
|
||||
it('[C310366] Should refresh buttons and form after an action is complete', async () => {
|
||||
await appListCloudComponent.goToApp(simpleApp);
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(myTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
||||
@@ -229,6 +231,8 @@ describe('Task form cloud component', () => {
|
||||
|
||||
it('[C310142] Empty content is displayed when having a task without form', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(myTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(assigneeTask.entry.name);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(assigneeTask.entry.name);
|
||||
await taskFormCloudComponent.checkFormIsNotDisplayed();
|
||||
@@ -240,6 +244,8 @@ describe('Task form cloud component', () => {
|
||||
|
||||
it('[C310199] Should not be able to complete a task when required field is empty or invalid data is added to a field', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(myTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await selectTaskByName(formValidationsTask.entry.name);
|
||||
await taskFormCloudComponent.formFields().checkFormIsDisplayed();
|
||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Text0tma8h');
|
||||
@@ -274,6 +280,8 @@ describe('Task form cloud component', () => {
|
||||
|
||||
it('[C307093] Complete button is not displayed when the task is already completed', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(completedTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('Completed Tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTaskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(completedTaskName);
|
||||
@@ -283,6 +291,8 @@ describe('Task form cloud component', () => {
|
||||
|
||||
it('[C307095] Task can not be completed by owner user', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(myTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||
|
||||
@@ -297,6 +307,8 @@ describe('Task form cloud component', () => {
|
||||
|
||||
it('[C307110] Task list is displayed after clicking on Cancel button', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(myTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
|
||||
await selectTaskByName(assigneeTask.entry.name);
|
||||
@@ -308,6 +320,8 @@ describe('Task form cloud component', () => {
|
||||
|
||||
it('[C307094] Standalone Task can be completed by a user that is owner and assignee', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(myTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
|
||||
await selectTaskByName(toBeCompletedTask.entry.name);
|
||||
@@ -315,12 +329,16 @@ describe('Task form cloud component', () => {
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(toBeCompletedTask.entry.name);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(completedTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(toBeCompletedTask.entry.name);
|
||||
await taskFormCloudComponent.checkCompleteButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C307111] Task of a process can be completed by a user that is owner and assignee', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(myTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await tasksCloudDemoPage.taskFilterCloudComponent.getActiveFilterName()).toBe('My Tasks');
|
||||
|
||||
await selectTaskByName(completedTask.entry.name);
|
||||
@@ -328,6 +346,8 @@ describe('Task form cloud component', () => {
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(completedTask.entry.name);
|
||||
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(completedTasksFilter);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTask.entry.name);
|
||||
await taskFormCloudComponent.checkCompleteButtonIsNotDisplayed();
|
||||
});
|
||||
@@ -335,6 +355,8 @@ describe('Task form cloud component', () => {
|
||||
|
||||
async function openTaskByIdFromFilters(filterName: string, taskId: string): Promise<void> {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(filterName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedById(taskId);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRowByTaskId(taskId);
|
||||
}
|
||||
@@ -360,6 +382,8 @@ describe('Task form cloud component', () => {
|
||||
async function goToAppOpenDropdownTaskByNameFromFilters(filterName: string, taskName: string): Promise<void> {
|
||||
await appListCloudComponent.goToApp(simpleApp);
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter(filterName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(taskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(taskName);
|
||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||
|
@@ -137,8 +137,12 @@ describe('Task Header cloud component', () => {
|
||||
|
||||
it('[C291943] Should display task details for assigned task', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(basicCreatedTaskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(basicCreatedTaskName);
|
||||
await tasksCloudDemoPage.waitTillContentLoaded();
|
||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||
|
||||
await expect(await taskHeaderCloudPage.getId()).toEqual(basicCreatedTask.entry.id);
|
||||
await expect(await taskHeaderCloudPage.getDescription())
|
||||
@@ -157,8 +161,12 @@ describe('Task Header cloud component', () => {
|
||||
|
||||
it('[C291944] Should display task details for completed task', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTaskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(completedTaskName);
|
||||
await tasksCloudDemoPage.waitTillContentLoaded();
|
||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||
|
||||
await expect(await taskHeaderCloudPage.getId()).toEqual(completedTask.entry.id);
|
||||
await expect(await taskHeaderCloudPage.getDescription())
|
||||
@@ -177,8 +185,12 @@ describe('Task Header cloud component', () => {
|
||||
|
||||
it('[C291945] Should Parent Name and Parent Id not be empty in task details for sub task', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(subTask.entry.name);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(subTask.entry.name);
|
||||
await tasksCloudDemoPage.waitTillContentLoaded();
|
||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||
|
||||
await expect(await taskHeaderCloudPage.getId()).toEqual(subTask.entry.id);
|
||||
await expect(await taskHeaderCloudPage.getDescription())
|
||||
@@ -203,8 +215,12 @@ describe('Task Header cloud component', () => {
|
||||
await startTaskCloudPage.typePriorityOf('50');
|
||||
await startTaskCloudPage.clickStartButton();
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('my-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(myTaskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(myTaskName);
|
||||
await tasksCloudDemoPage.waitTillContentLoaded();
|
||||
|
||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||
|
||||
await taskHeaderCloudPage.priorityCardTextItem.enterTextField('$$%£W21');
|
||||
@@ -223,6 +239,8 @@ describe('Task Header cloud component', () => {
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unclaimedTask.entry.name);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(unclaimedTask.entry.name);
|
||||
await tasksCloudDemoPage.waitTillContentLoaded();
|
||||
|
||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||
|
||||
const currentAssignee = await taskHeaderCloudPage.assigneeCardTextItem.getFieldValue();
|
||||
@@ -242,10 +260,6 @@ describe('Task Header cloud component', () => {
|
||||
await peopleCloudComponentPage.selectAssigneeFromList('HR User');
|
||||
await peopleCloudComponentPage.checkSelectedPeople('HR User');
|
||||
|
||||
await peopleCloudComponentPage.searchAssignee('processAdmin');
|
||||
await peopleCloudComponentPage.selectAssigneeFromList('Process Admin User');
|
||||
await peopleCloudComponentPage.checkSelectedPeople('Process Admin User');
|
||||
|
||||
await peopleCloudComponentPage.searchAssignee('modeler');
|
||||
await peopleCloudComponentPage.checkNoResultsFoundError();
|
||||
});
|
||||
@@ -264,8 +278,12 @@ describe('Task Header cloud component', () => {
|
||||
|
||||
it('[C311280] Should pick up the default date format from the app configuration', async () => {
|
||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickTaskFilter('completed-tasks');
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTaskName);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(completedTaskName);
|
||||
await tasksCloudDemoPage.waitTillContentLoaded();
|
||||
|
||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||
await expect(await taskHeaderCloudPage.getCreated()).toEqual(defaultDate);
|
||||
});
|
||||
|
@@ -86,7 +86,7 @@ describe('Task list cloud - selection', () => {
|
||||
await tasksCloudDemoPage.selectSelectionMode('None');
|
||||
await tasksCloudDemoPage.disableDisplayTaskDetails();
|
||||
await tasksCloudDemoPage.clickAppButton();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(tasks[0]);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(tasks[0]);
|
||||
@@ -98,7 +98,7 @@ describe('Task list cloud - selection', () => {
|
||||
await tasksCloudDemoPage.selectSelectionMode('Single');
|
||||
await tasksCloudDemoPage.disableDisplayTaskDetails();
|
||||
await tasksCloudDemoPage.clickAppButton();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(tasks[0]);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(tasks[0]);
|
||||
@@ -116,7 +116,7 @@ describe('Task list cloud - selection', () => {
|
||||
await tasksCloudDemoPage.enableMultiSelection();
|
||||
await tasksCloudDemoPage.disableDisplayTaskDetails();
|
||||
await tasksCloudDemoPage.clickAppButton();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(tasks[0]);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(tasks[0]);
|
||||
@@ -133,7 +133,7 @@ describe('Task list cloud - selection', () => {
|
||||
await tasksCloudDemoPage.clickSettingsButton();
|
||||
await tasksCloudDemoPage.disableDisplayTaskDetails();
|
||||
await tasksCloudDemoPage.clickAppButton();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(tasks[0]);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().clickCheckbox(tasks[0]);
|
||||
@@ -154,7 +154,7 @@ describe('Task list cloud - selection', () => {
|
||||
await tasksCloudDemoPage.clickSettingsButton();
|
||||
await tasksCloudDemoPage.disableDisplayTaskDetails();
|
||||
await tasksCloudDemoPage.clickAppButton();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkAllRowsButtonIsDisplayed();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkAllRows();
|
||||
@@ -167,7 +167,7 @@ describe('Task list cloud - selection', () => {
|
||||
await tasksCloudDemoPage.clickSettingsButton();
|
||||
await tasksCloudDemoPage.enableTestingMode();
|
||||
await tasksCloudDemoPage.clickAppButton();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
|
||||
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(tasks[0]);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().clickCheckbox(tasks[0]);
|
||||
|
@@ -51,23 +51,20 @@ describe('Modify applications', () => {
|
||||
appVersionToBeDeleted = await applicationService.importPublishDeployApp(appToBeDeleted.file_path);
|
||||
|
||||
await loginPage.login(user.email, user.password);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
});
|
||||
|
||||
it('[C260198] Should the app be displayed on dashboard when is deployed on APS', async () => {
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
await processServicesPage.checkApsContainer();
|
||||
|
||||
await expect(await processServicesPage.getAppIconType(app.title)).toEqual(CONSTANTS.APP_ICON.UNIT);
|
||||
await expect(await processServicesPage.getBackgroundColor(app.title)).toEqual(CONSTANTS.APP_COLOR.BLUE);
|
||||
await expect(await processServicesPage.getDescription(app.title)).toEqual(app.description);
|
||||
});
|
||||
|
||||
it('[C260213] Should a new version of the app be displayed on dashboard when is replaced by importing another app in APS', async () => {
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
await processServicesPage.checkApsContainer();
|
||||
|
||||
await expect(await processServicesPage.getAppIconType(app.title)).toEqual(CONSTANTS.APP_ICON.UNIT);
|
||||
await expect(await processServicesPage.getBackgroundColor(app.title)).toEqual(CONSTANTS.APP_COLOR.BLUE);
|
||||
await expect(await processServicesPage.getDescription(app.title)).toEqual(app.description);
|
||||
@@ -85,10 +82,6 @@ describe('Modify applications', () => {
|
||||
});
|
||||
|
||||
it('[C260220] Should the app not be displayed on dashboard after it was deleted in APS', async () => {
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
await processServicesPage.checkApsContainer();
|
||||
|
||||
await processServicesPage.checkAppIsDisplayed(app.title);
|
||||
|
||||
await modelActions.deleteEntireModel(firstApp.id);
|
||||
@@ -100,10 +93,6 @@ describe('Modify applications', () => {
|
||||
});
|
||||
|
||||
it('[C260215] Should the penultimate version of an app be displayed on dashboard when the last version is deleted in APS', async () => {
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
await processServicesPage.checkApsContainer();
|
||||
|
||||
await processServicesPage.checkAppIsDisplayed(appToBeDeleted.title);
|
||||
await expect(await processServicesPage.getBackgroundColor(appToBeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.ORANGE);
|
||||
|
||||
@@ -131,9 +120,6 @@ describe('Modify applications', () => {
|
||||
it('[C260207] Should the app be updated when is edited in APS', async () => {
|
||||
const newDescription = 'new description';
|
||||
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
|
||||
await expect(await processServicesPage.getAppIconType(appToBeDeleted.title)).toEqual(CONSTANTS.APP_ICON.USER);
|
||||
await expect(await processServicesPage.getBackgroundColor(appToBeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.ORANGE);
|
||||
await expect(await processServicesPage.getDescription(appToBeDeleted.title)).toEqual(appToBeDeleted.description);
|
||||
|
@@ -96,6 +96,8 @@ describe('Attach File - Content service', () => {
|
||||
await apiService.getInstance().login(user.email, user.password);
|
||||
await uploadActions.uploadFile(pdfFileTwo.location, pdfFileTwo.name, '-my-');
|
||||
await applicationService.importPublishDeployApp(app.file_path);
|
||||
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -124,14 +126,14 @@ describe('Attach File - Content service', () => {
|
||||
await widget.attachFileWidget().clickUploadButton(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id);
|
||||
await widget.attachFileWidget().selectUploadSource(csIntegrations[0]);
|
||||
|
||||
await contentNodeSelector.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.searchAndSelectResult(pdfFileTwo.name, pdfFileTwo.name);
|
||||
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await widget.attachFileWidget().checkFileIsAttached(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id, pdfFileTwo.name);
|
||||
});
|
||||
|
||||
it('[C246522] Attach file - Local file', async () => {
|
||||
it('[C246522] Attach file - Local file', async () => {
|
||||
const name = 'Attach local file';
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
@@ -154,9 +156,11 @@ describe('Attach File - Content service', () => {
|
||||
await widget.attachFileWidget().clickUploadButton(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id);
|
||||
await widget.attachFileWidget().selectUploadSource(csIntegrations[1]);
|
||||
|
||||
await externalNodeSelector.waitForLogInDialog();
|
||||
await expect(await externalNodeSelector.getTitle()).toEqual(`Sign into '${browser.params.testConfig.adf_external_acs.host}'`);
|
||||
await externalNodeSelector.login(user.email, user.password);
|
||||
|
||||
await externalNodeSelector.checkDialogIsDisplayed();
|
||||
await externalNodeSelector.searchAndSelectResult(externalFile, externalFile);
|
||||
await externalNodeSelector.clickMoveCopyButton();
|
||||
await widget.attachFileWidget().checkFileIsAttached(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id, externalFile);
|
||||
@@ -171,6 +175,7 @@ describe('Attach File - Content service', () => {
|
||||
await widget.attachFileWidget().clickUploadButton(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id);
|
||||
await widget.attachFileWidget().selectUploadSource(csIntegrations[0]);
|
||||
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.searchAndSelectResult(pdfFileTwo.name, pdfFileTwo.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
|
||||
@@ -184,6 +189,9 @@ describe('Attach File - Content service', () => {
|
||||
await widget.attachFileWidget().clickUploadButton(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id);
|
||||
await widget.attachFileWidget().selectUploadSource(csIntegrations[1]);
|
||||
|
||||
await externalNodeSelector.waitForLogInDialog();
|
||||
await externalNodeSelector.login(user.email, user.password);
|
||||
|
||||
await externalNodeSelector.searchAndSelectResult(externalFile, externalFile);
|
||||
await externalNodeSelector.clickMoveCopyButton();
|
||||
await widget.attachFileWidget().checkFileIsAttached(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id, externalFile);
|
||||
|
@@ -359,6 +359,6 @@ describe('Info Drawer', () => {
|
||||
await expect(await taskPage.taskDetails().getCategory()).toEqual(category);
|
||||
await expect(await taskPage.taskDetails().getParentName()).toEqual(parentName);
|
||||
await expect(await taskPage.taskDetails().getCreated()).toEqual(moment(Date.now()).format(dateFormat));
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(formName);
|
||||
await taskPage.taskDetails().waitFormNameEqual(formName);
|
||||
}
|
||||
});
|
||||
|
@@ -33,6 +33,7 @@ export class AttachmentListPage {
|
||||
}
|
||||
|
||||
async clickAttachFileButton(fileLocation: string): Promise<void> {
|
||||
await browser.sleep(500);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(this.attachFileButton);
|
||||
await this.attachFileButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@ export class FiltersPage {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
const filter = element(by.css(`button[data-automation-id="${filterName}_filter"]`));
|
||||
await BrowserActions.click(filter);
|
||||
await this.dataTable.waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async sortByName(sortOrder: string): Promise<void> {
|
||||
|
@@ -93,7 +93,7 @@ export class ProcessFiltersPage {
|
||||
}
|
||||
|
||||
async waitForTableBody(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.tableBody);
|
||||
await this.dataTable.waitForTableBody();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -143,6 +143,10 @@ export class TaskDetailsPage {
|
||||
return BrowserActions.getInputValue(this.formNameField);
|
||||
}
|
||||
|
||||
async waitFormNameEqual(formName: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementHasValue(this.formNameField, formName);
|
||||
}
|
||||
|
||||
async clickForm(): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(this.formNameButton);
|
||||
|
@@ -75,8 +75,8 @@ describe('Process List - Pagination when adding processes', () => {
|
||||
let page = 1;
|
||||
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
await processFiltersPage.dataTable.waitTillContentLoaded();
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
await processFiltersPage.waitForTableBody();
|
||||
|
||||
await expect(await paginationPage.getCurrentPage()).toEqual('Page ' + page);
|
||||
await expect(await paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
|
@@ -74,6 +74,8 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await expect(await paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
await expect(await paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
@@ -87,6 +89,8 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
|
||||
currentPage++;
|
||||
await paginationPage.clickOnNextPage();
|
||||
await taskPage.tasksListPage().getDataTable().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await expect(await paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
await expect(await paginationPage.getTotalPages()).toEqual('of ' + totalPages);
|
||||
|
@@ -94,10 +94,11 @@ describe('Attachment list action menu for processes', () => {
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToApp(app.title)).clickProcessButton();
|
||||
|
||||
await processFiltersPage.selectFromProcessList(processName.active);
|
||||
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
||||
await attachmentListPage.clickAttachFileButton(pngFile.location);
|
||||
await attachmentListPage.checkFileIsAttached(pngFile.name);
|
||||
|
||||
await attachmentListPage.viewFile(pngFile.name);
|
||||
|
||||
await viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
||||
@@ -105,6 +106,7 @@ describe('Attachment list action menu for processes', () => {
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList(processName.active);
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
||||
await attachmentListPage.doubleClickFile(pngFile.name);
|
||||
|
||||
@@ -113,6 +115,7 @@ describe('Attachment list action menu for processes', () => {
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList(processName.active);
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
||||
await attachmentListPage.downloadFile(pngFile.name);
|
||||
|
||||
@@ -127,12 +130,11 @@ describe('Attachment list action menu for processes', () => {
|
||||
it('[C279886] Should be able to access options of a file attached to a completed process', async () => {
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToApp(app.title)).clickProcessButton();
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList(processName.completed);
|
||||
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
||||
await attachmentListPage.clickAttachFileButton(pngFile.location);
|
||||
await attachmentListPage.checkFileIsAttached(pngFile.name);
|
||||
|
||||
await processDetailsPage.clickCancelProcessButton();
|
||||
await processFiltersPage.clickCompletedFilterButton();
|
||||
@@ -140,6 +142,7 @@ describe('Attachment list action menu for processes', () => {
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
||||
await attachmentListPage.checkAttachFileButtonIsNotDisplayed();
|
||||
await attachmentListPage.checkFileIsAttached(pngFile.name);
|
||||
await attachmentListPage.viewFile(pngFile.name);
|
||||
|
||||
await viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
||||
@@ -162,7 +165,6 @@ describe('Attachment list action menu for processes', () => {
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList(processName.taskApp);
|
||||
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
||||
await attachmentListPage.clickAttachFileButton(pngFile.location);
|
||||
@@ -174,6 +176,7 @@ describe('Attachment list action menu for processes', () => {
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList(processName.emptyList);
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
||||
await attachmentListPage.checkEmptyAttachmentList();
|
||||
await attachmentListPage.clickAttachFileButton(pngFile.location);
|
||||
|
@@ -73,7 +73,7 @@ describe('Start Task - Task App', () => {
|
||||
await taskDetails.checkCompleteTaskButtonIsEnabled();
|
||||
await taskPage.taskDetails().checkAttachFormButtonIsDisplayed();
|
||||
await taskPage.taskDetails().checkAttachFormButtonIsEnabled();
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await taskPage.taskDetails().waitFormNameEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await expect(await taskDetails.getNoFormMessage()).toEqual(noFormMessage);
|
||||
});
|
||||
|
||||
@@ -90,7 +90,7 @@ describe('Start Task - Task App', () => {
|
||||
await expect(await taskPage.formFields().getCompletedTaskNoFormMessage()).toEqual('Task ' + tasks[1] + ' completed');
|
||||
|
||||
await taskPage.formFields().noFormIsDisplayed();
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await taskPage.taskDetails().waitFormNameEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
});
|
||||
|
||||
it('[C268911] Should allow adding a form to a standalone task when clicking on Add form button', async () => {
|
||||
@@ -108,7 +108,7 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.taskDetails().checkCompleteFormButtonIsDisplayed();
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(app.formName);
|
||||
await taskPage.taskDetails().waitFormNameEqual(app.formName);
|
||||
});
|
||||
|
||||
it('[C268912] Should a standalone task be displayed when removing the form from APS', async () => {
|
||||
@@ -119,7 +119,7 @@ describe('Start Task - Task App', () => {
|
||||
await task.clickStartButton();
|
||||
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[3]);
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(app.formName);
|
||||
await taskPage.taskDetails().waitFormNameEqual(app.formName);
|
||||
|
||||
const listOfTasks = await apiService.getInstance().activiti.taskApi.listTasks(new Task({ sort: 'created-desc' }));
|
||||
await apiService.getInstance().activiti.taskApi.removeForm(listOfTasks.data[0].id);
|
||||
@@ -129,7 +129,7 @@ describe('Start Task - Task App', () => {
|
||||
await taskPage.checkTaskTitle(tasks[3]);
|
||||
|
||||
await taskPage.formFields().noFormIsDisplayed();
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await taskPage.taskDetails().waitFormNameEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await expect(await taskDetails.getNoFormMessage()).toEqual(noFormMessage);
|
||||
});
|
||||
});
|
||||
|
@@ -508,7 +508,6 @@ describe('Start Process Component', () => {
|
||||
await loginPage.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkDocumentListElementsAreDisplayed();
|
||||
await contentServicesPage.uploadFile(imageUploaded.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(imageUploaded.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
|
@@ -118,7 +118,7 @@ describe('Start Task - Custom App', () => {
|
||||
|
||||
await taskPage.formFields().noFormIsDisplayed();
|
||||
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await taskPage.taskDetails().waitFormNameEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
});
|
||||
|
||||
it('[C263948] Should be possible to cancel a task', async () => {
|
||||
|
@@ -140,7 +140,7 @@ describe('Task Details - Form', () => {
|
||||
|
||||
await taskDetailsPage.checkFormIsAttached('No form');
|
||||
|
||||
await expect(await taskDetailsPage.getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await taskDetailsPage.waitFormNameEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
});
|
||||
|
||||
it('[C280557] Should display task details when selecting another task while the Attach Form dialog is displayed', async () => {
|
||||
|
@@ -62,7 +62,7 @@ describe('Task Details - No form', () => {
|
||||
await taskPage.taskDetails().checkCompleteTaskButtonIsDisplayed();
|
||||
await taskPage.taskDetails().checkCompleteTaskButtonIsEnabled();
|
||||
await taskPage.taskDetails().checkAttachFormButtonIsNotDisplayed();
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await taskPage.taskDetails().waitFormNameEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await expect(await taskPage.formFields().getNoFormMessage()).toEqual(noFormMessage);
|
||||
});
|
||||
});
|
||||
|
@@ -104,7 +104,7 @@ describe('Task Details component', () => {
|
||||
const taskForm = await apiService.getInstance().activiti.taskFormsApi.getTaskForm(allTasks.data[0].id);
|
||||
formModel = new FormModel(taskForm);
|
||||
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(formModel.getName());
|
||||
await taskPage.taskDetails().waitFormNameEqual(formModel.getName());
|
||||
});
|
||||
|
||||
it('[C263946] Should display task details for standalone task - Custom App', async () => {
|
||||
@@ -136,7 +136,7 @@ describe('Task Details component', () => {
|
||||
|
||||
formModel = new FormModel(taskForm);
|
||||
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(formModel.getName());
|
||||
await taskPage.taskDetails().waitFormNameEqual(formModel.getName());
|
||||
});
|
||||
|
||||
it('[C286706] Should display task details for task - Task App', async () => {
|
||||
@@ -169,8 +169,7 @@ describe('Task Details component', () => {
|
||||
|
||||
formModel = new FormModel(taskForm);
|
||||
|
||||
await expect(await taskPage.taskDetails().getFormName())
|
||||
.toEqual(formModel.getName() === null ? CONSTANTS.TASK_DETAILS.NO_FORM : formModel.getName());
|
||||
await taskPage.taskDetails().waitFormNameEqual(formModel.getName());
|
||||
});
|
||||
|
||||
it('[C286705] Should display task details for task - Custom App', async () => {
|
||||
@@ -201,8 +200,7 @@ describe('Task Details component', () => {
|
||||
|
||||
formModel = new FormModel(taskForm);
|
||||
|
||||
await expect(await taskPage.taskDetails().getFormName())
|
||||
.toEqual(formModel.getName() === null ? CONSTANTS.TASK_DETAILS.NO_FORM : formModel.getName());
|
||||
await taskPage.taskDetails().waitFormNameEqual(formModel.getName());
|
||||
});
|
||||
|
||||
it('[C286708] Should display task details for subtask - Task App', async () => {
|
||||
|
@@ -97,7 +97,8 @@ let specExists = function (listSpecs) {
|
||||
specs();
|
||||
|
||||
exports.config = {
|
||||
allScriptsTimeout: TIMEOUT,
|
||||
|
||||
allScriptsTimeout: 30000,
|
||||
|
||||
specs: arraySpecs,
|
||||
|
||||
@@ -136,7 +137,7 @@ exports.config = {
|
||||
'--no-sandbox',
|
||||
'--disable-web-security',
|
||||
'--disable-browser-side-navigation',
|
||||
'-allow-running-insecure-content',
|
||||
'--allow-running-insecure-content',
|
||||
...(BROWSER_RUN === true ? [] : ['--headless'])]
|
||||
}
|
||||
},
|
||||
@@ -154,13 +155,14 @@ exports.config = {
|
||||
resources: RESOURCES
|
||||
},
|
||||
|
||||
framework: 'jasmine2',
|
||||
framework: 'jasmine',
|
||||
|
||||
getPageTimeout: 90000,
|
||||
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 120000,
|
||||
defaultTimeoutInterval: 180000,
|
||||
includeStackTrace: true,
|
||||
print: () => {
|
||||
},
|
||||
...smartRunner.withOptionalExclusions(
|
||||
@@ -184,7 +186,8 @@ exports.config = {
|
||||
writeReportFreq: 'end',
|
||||
imageToAscii: 'none',
|
||||
htmlOnExpect: 'none',
|
||||
htmlOnSpec: 'none'
|
||||
htmlOnSpec: 'none',
|
||||
clearFoldersBeforeTest: false
|
||||
}],
|
||||
|
||||
onCleanUp(results) {
|
||||
|
@@ -1,10 +1,6 @@
|
||||
{
|
||||
"C362240": "Include once ADF starts using ACS 7 , https://issues.alfresco.com/jira/browse/ADF-5182",
|
||||
"C362241": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182",
|
||||
"C291980": "https://issues.alfresco.com/jira/browse/ADF-5235",
|
||||
"C291981": "https://issues.alfresco.com/jira/browse/ADF-5235",
|
||||
"C299200": "https://issues.alfresco.com/jira/browse/ADF-5235",
|
||||
"C297509": "https://issues.alfresco.com/jira/browse/ADF-5235",
|
||||
"C277751": "setting problem APS not basic",
|
||||
"C277752": "setting problem APS not basic",
|
||||
"C277753": "setting problem APS not basic",
|
||||
@@ -14,6 +10,12 @@
|
||||
"C279931": "login problem APS not basic",
|
||||
"C279930": "login problem APS not basic",
|
||||
"C246534": "https://issues.alfresco.com/jira/browse/ADF-5236",
|
||||
"C291893": "flaky test"
|
||||
"C305041": "Open ticket",
|
||||
"C291954": "Open ticket",
|
||||
"C291955": "Open ticket",
|
||||
"C291993": "Open ticket",
|
||||
"C291995": "Open ticket",
|
||||
"C297478": "Open ticket",
|
||||
"C297485": "Open ticket"
|
||||
}
|
||||
|
||||
|
@@ -76,7 +76,7 @@ describe('Search Checklist Component', () => {
|
||||
nodeType: 'cm:content'
|
||||
});
|
||||
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
@@ -107,12 +107,14 @@ describe('Search Checklist Component', () => {
|
||||
await searchFiltersPage.checkListFiltersPage().checkCheckListOptionIsNotSelected(filterType.document);
|
||||
await searchFiltersPage.checkListFiltersPage().clickCheckListOption(filterType.folder);
|
||||
await searchFiltersPage.checkListFiltersPage().checkCheckListOptionIsSelected(filterType.folder);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(nodeNames.folder);
|
||||
await searchResults.checkContentIsNotDisplayed(nodeNames.document);
|
||||
|
||||
await searchFiltersPage.checkListFiltersPage().clickClearAllButton();
|
||||
await searchFiltersPage.checkListFiltersPage().checkCheckListOptionIsNotSelected(filterType.folder);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(nodeNames.folder);
|
||||
await searchResults.checkContentIsDisplayed(nodeNames.document);
|
||||
@@ -121,6 +123,7 @@ describe('Search Checklist Component', () => {
|
||||
await searchFiltersPage.checkListFiltersPage().clickCheckListOption(filterType.document);
|
||||
await searchFiltersPage.checkListFiltersPage().checkCheckListOptionIsSelected(filterType.folder);
|
||||
await searchFiltersPage.checkListFiltersPage().checkCheckListOptionIsSelected(filterType.document);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(nodeNames.folder);
|
||||
await searchResults.checkContentIsDisplayed(nodeNames.document);
|
||||
@@ -128,6 +131,7 @@ describe('Search Checklist Component', () => {
|
||||
await searchFiltersPage.checkListFiltersPage().clickCheckListOption(filterType.folder);
|
||||
await searchFiltersPage.checkListFiltersPage().checkCheckListOptionIsSelected(filterType.document);
|
||||
await searchFiltersPage.checkListFiltersPage().checkCheckListOptionIsNotSelected(filterType.folder);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(nodeNames.document);
|
||||
await searchResults.checkContentIsNotDisplayed(nodeNames.folder);
|
||||
@@ -154,6 +158,8 @@ describe('Search Checklist Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickCheckListFilter();
|
||||
|
||||
await expect(await searchFiltersPage.checkListFiltersPage().getCheckListOptionsNumberOnPage()).toBe(5);
|
||||
@@ -193,6 +199,8 @@ describe('Search Checklist Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickCheckListFilter();
|
||||
|
||||
await expect(await searchFiltersPage.checkListFiltersPage().getCheckListOptionsNumberOnPage()).toBe(10);
|
||||
@@ -207,6 +215,8 @@ describe('Search Checklist Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickCheckListFilter();
|
||||
|
||||
await expect(await searchFiltersPage.checkListFiltersPage().getCheckListOptionsNumberOnPage()).toBe(10);
|
||||
@@ -246,6 +256,10 @@ describe('Search Checklist Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickCheckListFilter();
|
||||
|
||||
await expect(await searchFiltersPage.checkListFiltersPage().getCheckListOptionsNumberOnPage()).toBe(5);
|
||||
@@ -269,6 +283,8 @@ describe('Search Checklist Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickCheckListFilter();
|
||||
|
||||
await expect(await searchFiltersPage.checkListFiltersPage().getCheckListOptionsNumberOnPage()).toBe(5);
|
||||
@@ -288,17 +304,12 @@ describe('Search Checklist Component', () => {
|
||||
describe('Properties', () => {
|
||||
let jsonFile;
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach(async () => {
|
||||
jsonFile = SearchConfiguration.getConfiguration();
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
});
|
||||
|
||||
it('[C277018] Should be able to change the operator', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[1].component.settings.operator = 'AND';
|
||||
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
@@ -306,10 +317,13 @@ describe('Search Checklist Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickCheckListFilter();
|
||||
|
||||
await searchFiltersPage.checkListFiltersPage().clickCheckListOption(filterType.folder);
|
||||
await searchFiltersPage.checkListFiltersPage().checkCheckListOptionIsSelected(filterType.folder);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(nodeNames.folder);
|
||||
await searchResults.checkContentIsNotDisplayed(nodeNames.document);
|
||||
@@ -321,8 +335,6 @@ describe('Search Checklist Component', () => {
|
||||
});
|
||||
|
||||
it('[C277019] Should be able to add new properties with different types', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[1].component.settings.options.push({
|
||||
'name': filterType.custom,
|
||||
'value': "TYPE:'cm:auditable'"
|
||||
@@ -333,6 +345,8 @@ describe('Search Checklist Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickCheckListFilter();
|
||||
|
||||
await searchFiltersPage.checkListFiltersPage().checkCheckListOptionIsDisplayed(filterType.folder);
|
||||
@@ -346,6 +360,7 @@ describe('Search Checklist Component', () => {
|
||||
|
||||
await searchFiltersPage.checkListFiltersPage().clickCheckListOption(filterType.document);
|
||||
await searchFiltersPage.checkListFiltersPage().clickCheckListOption(filterType.folder);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(nodeNames.folder);
|
||||
await searchResults.checkContentIsDisplayed(nodeNames.document);
|
||||
|
@@ -40,7 +40,8 @@ describe('Search Date Range Filter', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
});
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await searchFilters.checkCreatedRangeFilterIsDisplayed();
|
||||
@@ -183,6 +184,8 @@ describe('Search Date Range Filter', () => {
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFilters.checkCreatedRangeFilterIsDisplayed();
|
||||
await searchFilters.clickCreatedRangeFilterHeader();
|
||||
await searchFilters.checkCreatedRangeFilterIsExpanded();
|
||||
|
@@ -70,14 +70,15 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
file2Bytes = await uploadActions.uploadFile(file2BytesModel.location, file2BytesModel.name, '-my-');
|
||||
file0Bytes = await uploadActions.uploadFile(file0BytesModel.location, file0BytesModel.name, '-my-');
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
});
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().login(acsUser.email, acsUser.password);
|
||||
@@ -170,7 +171,7 @@ describe('Search Number Range Filter', () => {
|
||||
await expect(await sizeRangeFilter.checkApplyButtonIsEnabled()).toBe(true);
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
await searchResults.sortBySize('DESC');
|
||||
|
||||
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
@@ -190,6 +191,7 @@ describe('Search Number Range Filter', () => {
|
||||
await searchFilters.checkNameFilterIsDisplayed();
|
||||
await searchFilters.checkNameFilterIsExpanded();
|
||||
await nameFilter.searchByName('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await sizeRangeFilter.checkFromFieldIsDisplayed();
|
||||
await sizeRangeFilter.putFromNumber(fromSize);
|
||||
@@ -198,6 +200,8 @@ describe('Search Number Range Filter', () => {
|
||||
await expect(await sizeRangeFilter.checkApplyButtonIsEnabled()).toBe(true);
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.sortBySize('DESC');
|
||||
|
||||
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
@@ -211,6 +215,7 @@ describe('Search Number Range Filter', () => {
|
||||
await searchFilters.checkNameFilterIsDisplayed();
|
||||
await searchFilters.checkNameFilterIsExpanded();
|
||||
await nameFilter.searchByName('z*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
await searchResults.sortBySize('DESC');
|
||||
|
||||
const resultsSize = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
@@ -237,14 +242,14 @@ describe('Search Number Range Filter', () => {
|
||||
await expect(await sizeRangeFilter.checkApplyButtonIsEnabled()).toBe(true);
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
await searchFilters.checkCheckListFilterIsDisplayed();
|
||||
await searchFilters.clickCheckListFilter();
|
||||
await searchFilters.checkCheckListFilterIsExpanded();
|
||||
|
||||
await searchFilters.checkListFiltersPage().clickCheckListOption('Folder');
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
await searchResults.checkNoResultMessageIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -255,7 +260,8 @@ describe('Search Number Range Filter', () => {
|
||||
await expect(await sizeRangeFilter.checkApplyButtonIsEnabled()).toBe(true);
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.sortBySize('DESC');
|
||||
|
||||
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
@@ -327,7 +333,8 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(file2BytesModel.name);
|
||||
|
||||
await sizeRangeFilter.checkToFieldIsDisplayed();
|
||||
@@ -337,7 +344,8 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsNotDisplayed(file2BytesModel.name);
|
||||
|
||||
await sizeRangeFilter.checkToFieldIsDisplayed();
|
||||
@@ -347,7 +355,8 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(file2BytesModel.name);
|
||||
|
||||
await sizeRangeFilter.checkToFieldIsDisplayed();
|
||||
@@ -357,7 +366,8 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsNotDisplayed(file2BytesModel.name);
|
||||
});
|
||||
|
||||
@@ -378,6 +388,7 @@ describe('Search Number Range Filter', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFilters.checkSizeRangeFilterIsDisplayed();
|
||||
await searchFilters.clickSizeRangeFilterHeader();
|
||||
@@ -392,7 +403,8 @@ describe('Search Number Range Filter', () => {
|
||||
await expect(await sizeRangeFilter.checkApplyButtonIsEnabled()).toBe(true);
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.sortByCreated('DESC');
|
||||
|
||||
const results = await dataTable.geCellElementDetail('Created') as ElementFinder[];
|
||||
@@ -415,6 +427,7 @@ describe('Search Number Range Filter', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFilters.checkSizeRangeFilterIsDisplayed();
|
||||
await searchFilters.clickSizeRangeFilterHeader();
|
||||
@@ -427,7 +440,8 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsNotDisplayed(file2BytesModel.name);
|
||||
|
||||
await sizeRangeFilter.checkToFieldIsDisplayed();
|
||||
@@ -437,7 +451,8 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(file2BytesModel.name);
|
||||
});
|
||||
|
||||
@@ -451,6 +466,7 @@ describe('Search Number Range Filter', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFilters.checkSizeRangeFilterIsDisplayed();
|
||||
await searchFilters.clickSizeRangeFilterHeader();
|
||||
@@ -463,7 +479,8 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsDisplayed(file2BytesModel.name);
|
||||
|
||||
await sizeRangeFilter.checkToFieldIsDisplayed();
|
||||
@@ -473,7 +490,8 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResults.checkContentIsNotDisplayed(file2BytesModel.name);
|
||||
});
|
||||
});
|
||||
|
@@ -77,7 +77,7 @@ describe('Search Radio Component', () => {
|
||||
nodeType: 'cm:content'
|
||||
});
|
||||
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
@@ -151,6 +151,8 @@ describe('Search Radio Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickTypeFilterHeader();
|
||||
|
||||
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(10);
|
||||
@@ -164,6 +166,8 @@ describe('Search Radio Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickTypeFilterHeader();
|
||||
|
||||
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(10);
|
||||
@@ -176,6 +180,8 @@ describe('Search Radio Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickTypeFilterHeader();
|
||||
|
||||
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(9);
|
||||
@@ -203,6 +209,8 @@ describe('Search Radio Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickTypeFilterHeader();
|
||||
|
||||
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(5);
|
||||
@@ -232,6 +240,8 @@ describe('Search Radio Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickTypeFilterHeader();
|
||||
|
||||
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(5);
|
||||
@@ -263,6 +273,7 @@ describe('Search Radio Component', () => {
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
|
||||
@@ -279,6 +290,8 @@ describe('Search Radio Component', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(randomName);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.clickTypeFilterHeader();
|
||||
|
||||
await searchFiltersPage.typeFiltersPage().checkFilterRadioButtonIsDisplayed(filterType.none);
|
||||
|
@@ -63,14 +63,16 @@ describe('Search Slider Filter', () => {
|
||||
await apiService.getInstance().login(acsUser.email, acsUser.password);
|
||||
|
||||
file2Bytes = await uploadActions.uploadFile(file2BytesModel.location, file2BytesModel.name, '-my-');
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
});
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
try {
|
||||
@@ -122,7 +124,6 @@ describe('Search Slider Filter', () => {
|
||||
await sizeSliderFilter.checkSliderIsDisplayed();
|
||||
await sizeSliderFilter.setValue(size);
|
||||
await searchResults.sortBySize('DESC');
|
||||
await searchResults.tableIsLoaded();
|
||||
|
||||
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of results) {
|
||||
@@ -137,7 +138,6 @@ describe('Search Slider Filter', () => {
|
||||
await sizeSliderFilter.clickClearButton();
|
||||
|
||||
await searchResults.sortBySize('DESC');
|
||||
await searchResults.tableIsLoaded();
|
||||
|
||||
const resultsSize = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of resultsSize) {
|
||||
@@ -165,6 +165,7 @@ describe('Search Slider Filter', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFilters.checkSizeSliderFilterIsDisplayed();
|
||||
await searchFilters.clickSizeSliderFilterHeader();
|
||||
@@ -182,6 +183,7 @@ describe('Search Slider Filter', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFilters.checkSizeSliderFilterIsDisplayed();
|
||||
await searchFilters.clickSizeSliderFilterHeader();
|
||||
@@ -201,6 +203,7 @@ describe('Search Slider Filter', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFilters.checkSizeSliderFilterIsDisplayed();
|
||||
await searchFilters.clickSizeSliderFilterHeader();
|
||||
@@ -220,6 +223,7 @@ describe('Search Slider Filter', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFilters.checkSizeSliderFilterIsDisplayed();
|
||||
await searchFilters.clickSizeSliderFilterHeader();
|
||||
|
@@ -85,6 +85,7 @@ describe('Search Sorting Picker', () => {
|
||||
beforeEach(async () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
@@ -114,6 +115,7 @@ describe('Search Sorting Picker', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchSortingPicker.checkSortingDropdownIsDisplayed();
|
||||
await searchSortingPicker.clickSortingDropdown();
|
||||
@@ -130,6 +132,7 @@ describe('Search Sorting Picker', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchSortingPicker.checkSortingDropdownIsDisplayed();
|
||||
await searchSortingPicker.clickSortingDropdown();
|
||||
@@ -155,6 +158,7 @@ describe('Search Sorting Picker', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchSortingPicker.checkSortingDropdownIsDisplayed();
|
||||
await searchSortingPicker.clickSortingDropdown();
|
||||
@@ -206,6 +210,7 @@ describe('Search Sorting Picker', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchSortingPicker.checkSortingDropdownIsDisplayed();
|
||||
await searchSortingPicker.sortBy('ASC', 'Modified Date');
|
||||
|
@@ -65,7 +65,7 @@ describe('Search component - Text widget', () => {
|
||||
}
|
||||
}, {});
|
||||
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
@@ -91,6 +91,8 @@ describe('Search component - Text widget', () => {
|
||||
|
||||
await searchFiltersPage.checkNameFilterIsDisplayed();
|
||||
await searchFiltersPage.textFiltersPage().searchByName(newFolderModel.name);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkContentIsDisplayed(newFolderModel.name);
|
||||
|
||||
await searchFiltersPage.textFiltersPage().searchByName(newFolderModel.description);
|
||||
@@ -103,7 +105,7 @@ describe('Search component - Text widget', () => {
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResultPage.tableIsLoaded();
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkCheckListFilterIsDisplayed();
|
||||
await searchFiltersPage.clickCheckListFilter();
|
||||
@@ -114,6 +116,8 @@ describe('Search component - Text widget', () => {
|
||||
await searchResultPage.checkContentIsNotDisplayed(newFolderModel.name);
|
||||
|
||||
await searchFiltersPage.textFiltersPage().searchByName(newFolderModel.description);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkContentIsDisplayed(newFolderModel.name);
|
||||
});
|
||||
});
|
||||
|
@@ -30,7 +30,8 @@ export class SearchBarPage {
|
||||
searchBarPage = element(by.css(`mat-list[id='autocomplete-search-result-list']`));
|
||||
|
||||
async pressDownArrowAndEnter(): Promise<void> {
|
||||
await element(by.css(`adf-search-control div input`)).sendKeys(protractor.Key.ARROW_DOWN);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
||||
await this.searchBar.sendKeys(protractor.Key.ARROW_DOWN);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
}
|
||||
|
||||
@@ -74,25 +75,25 @@ export class SearchBarPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.getRowByRowName(name));
|
||||
}
|
||||
|
||||
async clickOnSpecificRow(name: string): Promise<void> {
|
||||
await this.resultTableContainsRow(name);
|
||||
await BrowserActions.click(this.getRowByRowName(name));
|
||||
async clickOnSpecificRow(fileName: string): Promise<void> {
|
||||
await this.resultTableContainsRow(fileName);
|
||||
await BrowserActions.click(this.getRowByRowName(fileName));
|
||||
}
|
||||
|
||||
getRowByRowName(name: string): ElementFinder {
|
||||
return element(by.css(`mat-list-item[data-automation-id='autocomplete_for_${name}']`));
|
||||
}
|
||||
|
||||
async getSpecificRowsHighlightName(name: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(name).element(this.highlightName));
|
||||
async getSpecificRowsHighlightName(fileName: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(fileName).element(this.highlightName));
|
||||
}
|
||||
|
||||
async getSpecificRowsCompleteName(name: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(name).element(this.completeName));
|
||||
async getSpecificRowsCompleteName(fileName: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(fileName).element(this.completeName));
|
||||
}
|
||||
|
||||
async getSpecificRowsAuthor(name: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(name).element(this.rowsAuthor));
|
||||
async getSpecificRowsAuthor(fileName: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(fileName).element(this.rowsAuthor));
|
||||
}
|
||||
|
||||
async clearText(): Promise<void> {
|
||||
|
@@ -55,7 +55,7 @@ export class SearchResultsPage {
|
||||
}
|
||||
|
||||
async navigateToFolder(content: string): Promise<void> {
|
||||
await this.dataTable.doubleClickRow('Display name', content);
|
||||
await this.contentServices.openFolder(content);
|
||||
}
|
||||
|
||||
async deleteContent(content: string): Promise<void> {
|
||||
@@ -64,18 +64,22 @@ export class SearchResultsPage {
|
||||
|
||||
async sortByName(sortOrder: string): Promise<void> {
|
||||
await this.searchSortingPicker.sortBy(sortOrder, 'Name');
|
||||
await this.dataTable.waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async sortByAuthor(sortOrder: string): Promise<void> {
|
||||
await this.searchSortingPicker.sortBy(sortOrder, 'Author');
|
||||
await this.dataTable.waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async sortByCreated(sortOrder: string): Promise<void> {
|
||||
await this.searchSortingPicker.sortBy(sortOrder, 'Created');
|
||||
await this.dataTable.waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async sortBySize(sortOrder: string): Promise<void> {
|
||||
await this.searchSortingPicker.sortBy(sortOrder, 'Size');
|
||||
await this.dataTable.waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async checkListIsOrderedByNameAsc(): Promise<any> {
|
||||
|
@@ -108,10 +108,10 @@ describe('Search component - Search Bar', () => {
|
||||
filesToDelete.push(await uploadActions.createFolder(secondFolder.name, '-my-'));
|
||||
filesToDelete.push(await uploadActions.createFolder(thirdFolder.name, '-my-'));
|
||||
|
||||
await browser.sleep(15000); // wait search index previous file/folder uploaded
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
for (const currentNode of filesToDelete) {
|
||||
@@ -123,7 +123,7 @@ describe('Search component - Search Bar', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await BrowserActions.getUrl(browser.baseUrl);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C272798] Search bar should be visible', async () => {
|
||||
await searchBarPage.checkSearchBarIsNotVisible();
|
||||
@@ -150,6 +150,8 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkNoResultMessageIsNotDisplayed();
|
||||
await searchBarPage.enterText(search.inactive.name);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchBarPage.checkNoResultMessageIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -161,18 +163,18 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.resultTableContainsRow(firstFolderModel.name);
|
||||
|
||||
await expect(await searchBarPage.getSpecificRowsHighlightName(firstFolderModel.name)).toEqual(firstFolderModel.shortName);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFolderModel.name)).toEqual(acsUser.firstName + ' ' + acsUser.lastName);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFolderModel.name)).toContain(acsUser.firstName);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFolderModel.name)).toContain(acsUser.lastName);
|
||||
await expect(await searchBarPage.getSpecificRowsCompleteName(firstFolderModel.name)).toEqual(firstFolderModel.name);
|
||||
|
||||
await searchBarPage.clearText();
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterText(firstFileModel.shortName);
|
||||
await searchBarPage.resultTableContainsRow(firstFileModel.name);
|
||||
|
||||
await expect(await searchBarPage.getSpecificRowsHighlightName(firstFileModel.name)).toEqual(firstFileModel.shortName);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFileModel.name)).toEqual(acsUser.firstName + ' ' + acsUser.lastName);
|
||||
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFileModel.name)).toContain(acsUser.firstName);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFileModel.name)).toContain(acsUser.lastName);
|
||||
await expect(await searchBarPage.getSpecificRowsCompleteName(firstFileModel.name)).toEqual(firstFileModel.name);
|
||||
});
|
||||
|
||||
@@ -184,7 +186,8 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.resultTableContainsRow(firstFolderModel.name);
|
||||
|
||||
await expect(await searchBarPage.getSpecificRowsHighlightName(firstFolderModel.name)).toEqual(firstFolderModel.name);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFolderModel.name)).toEqual(acsUser.firstName + ' ' + acsUser.lastName);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFolderModel.name)).toContain(acsUser.firstName);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFolderModel.name)).toContain(acsUser.lastName);
|
||||
await expect(await searchBarPage.getSpecificRowsCompleteName(firstFolderModel.name)).toEqual(firstFolderModel.name);
|
||||
|
||||
await searchBarPage.clearText();
|
||||
@@ -194,7 +197,8 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.resultTableContainsRow(firstFileModel.name);
|
||||
|
||||
await expect(await searchBarPage.getSpecificRowsHighlightName(firstFileModel.name)).toEqual(firstFileModel.name);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFileModel.name)).toEqual(acsUser.firstName + ' ' + acsUser.lastName);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFileModel.name)).toContain(acsUser.firstName);
|
||||
await expect(await searchBarPage.getSpecificRowsAuthor(firstFileModel.name)).toContain(acsUser.lastName);
|
||||
await expect(await searchBarPage.getSpecificRowsCompleteName(firstFileModel.name)).toEqual(firstFileModel.name);
|
||||
});
|
||||
|
||||
@@ -205,6 +209,7 @@ describe('Search component - Search Bar', () => {
|
||||
|
||||
await searchBarPage.resultTableContainsRow(firstFolderModel.name);
|
||||
await searchBarPage.clickOnSpecificRow(firstFolderModel.name);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await expect(await contentServicesPage.currentFolderName()).toEqual(firstFolderModel.name);
|
||||
|
||||
@@ -215,6 +220,7 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.resultTableContainsRow(firstFileModel.name);
|
||||
|
||||
await searchBarPage.clickOnSpecificRow(firstFileModel.name);
|
||||
|
||||
await expect(await viewerPage.getDisplayedFileName()).toEqual(firstFileModel.name);
|
||||
|
||||
await viewerPage.clickCloseButton();
|
||||
@@ -225,6 +231,7 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(search.inactive.name);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkNoResultMessageIsDisplayed();
|
||||
});
|
||||
@@ -234,6 +241,7 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(firstFolderModel.name);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkContentIsDisplayed(firstFolderModel.name);
|
||||
});
|
||||
@@ -243,6 +251,7 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(firstFileModel.name);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkContentIsDisplayed(firstFileModel.name);
|
||||
});
|
||||
@@ -253,6 +262,7 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterText(secondFolder.shortName);
|
||||
await searchBarPage.pressDownArrowAndEnter();
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await expect(await contentServicesPage.currentFolderName()).toEqual(secondFolder.name);
|
||||
});
|
||||
@@ -260,7 +270,7 @@ describe('Search component - Search Bar', () => {
|
||||
it('[C290137] Should be able to search by \'%\'', async () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('%');
|
||||
await searchResultPage.tableIsLoaded();
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
});
|
||||
|
||||
describe('Highlight', () => {
|
||||
@@ -275,6 +285,8 @@ describe('Search component - Search Bar', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.checkSearchBarIsVisible();
|
||||
await searchBarPage.enterTextAndPressEnter(term);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
});
|
||||
|
||||
it('[C299212] Should be able to configure the highlight option for search results', async () => {
|
||||
|
@@ -102,7 +102,7 @@ describe('Search Filters', () => {
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await browser.sleep(15000); // wait search index previous file/folder uploaded
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
|
||||
jsonFile = SearchConfiguration.getConfiguration();
|
||||
});
|
||||
@@ -123,6 +123,7 @@ describe('Search Filters', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
|
||||
await searchBarPage.enterTextAndPressEnter(fileUploaded.entry.name);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkSearchFiltersIsDisplayed();
|
||||
|
||||
@@ -175,51 +176,21 @@ describe('Search Filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C291802] Should be able to filter facet fields with "Contains"', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
jsonFile['filterWithContains'] = true;
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
|
||||
await searchFiltersPage.creatorCheckListFiltersPage().searchInFilter('dminis');
|
||||
await searchFiltersPage.creatorCheckListFiltersPage().checkCheckListOptionIsDisplayed('Administrator');
|
||||
});
|
||||
|
||||
it('[C291980] Should group search facets under specified labels', async () => {
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkDefaultFacetQueryGroupIsDisplayed();
|
||||
await searchFiltersPage.checkTypeFacetQueryGroupIsDisplayed();
|
||||
|
||||
await searchFiltersPage.checkSizeFacetQueryGroupIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C291981] Should group search facets under the default label, by default', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
|
||||
await searchFiltersPage.checkDefaultFacetQueryGroupIsDisplayed();
|
||||
await expect(await searchFiltersPage.isTypeFacetQueryGroupPresent()).toBe(false);
|
||||
await expect(await searchFiltersPage.isSizeFacetQueryGroupPresent()).toBe(false);
|
||||
});
|
||||
|
||||
it('[C297509] Should display search intervals under specified labels from config', async () => {
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkFacetIntervalsByCreatedIsDisplayed();
|
||||
await searchFiltersPage.checkFacetIntervalsByCreatedIsExpanded();
|
||||
@@ -240,9 +211,9 @@ describe('Search Filters', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(fileTypeTxt1.entry.name);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkSearchFiltersIsDisplayed();
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.checkContentIsDisplayed(fileTypeTxt1.entry.name);
|
||||
await searchFiltersPage.checkFileTypeFacetLabelIsDisplayed('Plain Text (1)');
|
||||
await searchFiltersPage.checkFileTypeFacetLabelIsNotDisplayed('JPEG Image');
|
||||
@@ -251,27 +222,59 @@ describe('Search Filters', () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
|
||||
await searchBarPage.enterTextAndPressEnter(fileNamePrefix);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkSearchFiltersIsDisplayed();
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.checkContentIsDisplayed(fileTypeTxt1.entry.name);
|
||||
await searchResults.checkContentIsDisplayed(fileTypeTxt2.entry.name);
|
||||
await searchResults.checkContentIsDisplayed(fileTypeJpg.entry.name);
|
||||
await searchFiltersPage.checkFileTypeFacetLabelIsDisplayed('Plain Text (2)');
|
||||
await searchFiltersPage.checkFileTypeFacetLabelIsDisplayed('JPEG Image (1)');
|
||||
});
|
||||
});
|
||||
|
||||
it('[C299124] Should be able to parse escaped empty spaced labels inside facetFields', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
describe('Change config', () => {
|
||||
|
||||
jsonFile.facetFields.fields[0].label = 'My File Types';
|
||||
jsonFile.facetFields.fields[1].label = 'My File Sizes';
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
it('[C291802] Should be able to filter facet fields with "Contains"', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
jsonFile['filterWithContains'] = true;
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchFiltersPage.checkCustomFacetFieldLabelIsDisplayed('My File Types');
|
||||
await searchFiltersPage.checkCustomFacetFieldLabelIsDisplayed('My File Sizes');
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.creatorCheckListFiltersPage().searchInFilter('dminis');
|
||||
await searchFiltersPage.creatorCheckListFiltersPage().checkCheckListOptionIsDisplayed('Administrator');
|
||||
});
|
||||
|
||||
it('[C291981] Should group search facets under the default label, by default', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkDefaultFacetQueryGroupIsDisplayed();
|
||||
await expect(await searchFiltersPage.isTypeFacetQueryGroupPresent()).toBe(false);
|
||||
await expect(await searchFiltersPage.isSizeFacetQueryGroupPresent()).toBe(false);
|
||||
});
|
||||
|
||||
it('[C299124] Should be able to parse escaped empty spaced labels inside facetFields', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
jsonFile.facetFields.fields[0].label = 'My File Types';
|
||||
jsonFile.facetFields.fields[1].label = 'My File Sizes';
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkCustomFacetFieldLabelIsDisplayed('My File Types');
|
||||
await searchFiltersPage.checkCustomFacetFieldLabelIsDisplayed('My File Sizes');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -71,13 +71,14 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
|
||||
txtFileSite = await uploadActions.uploadFile(txtFileInfo.location, txtFileInfo.name, site.entry.guid);
|
||||
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(`${randomName}`);
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
userOption = `${acsUser.firstName} ${acsUser.lastName}`;
|
||||
|
||||
@@ -103,18 +104,21 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(`${randomName}`);
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
userOption = `${acsUser.firstName} ${acsUser.lastName}`;
|
||||
|
||||
await searchFiltersPage.checkSearchFiltersIsDisplayed();
|
||||
await searchFiltersPage.creatorCheckListFiltersPage().filterBy(userOption);
|
||||
await searchFiltersPage.fileTypeCheckListFiltersPage().filterBy('Plain Text');
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await expect(searchResultsPage.numberOfResultsDisplayed()).toBe(2);
|
||||
await searchResultsPage.checkContentIsDisplayed(txtFile.entry.name);
|
||||
await searchResultsPage.checkContentIsDisplayed(txtFileSite.entry.name);
|
||||
|
||||
await searchFiltersPage.fileTypeCheckListFiltersPage().filterBy('JPEG Image');
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await expect(await searchResultsPage.numberOfResultsDisplayed()).toBe(4);
|
||||
await searchResultsPage.checkContentIsDisplayed(txtFile.entry.name);
|
||||
@@ -163,23 +167,26 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
|
||||
jpgFile = await uploadActions.uploadFile(jpgFileInfo.location, jpgFileInfo.name, site.entry.guid);
|
||||
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(userUploadingImg.email, userUploadingImg.password);
|
||||
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(`*${randomName}*`);
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkSearchFiltersIsDisplayed();
|
||||
await searchFiltersPage.creatorCheckListFiltersPage().filterBy(`${userUploadingTxt.firstName} ${userUploadingTxt.lastName}`);
|
||||
await searchFiltersPage.creatorCheckListFiltersPage().filterBy(`${userUploadingImg.firstName} ${userUploadingImg.lastName}`);
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultsPage.checkContentIsDisplayed(txtFile.entry.name);
|
||||
await searchResultsPage.checkContentIsDisplayed(jpgFile.entry.name);
|
||||
|
||||
await searchFiltersPage.fileTypeCheckListFiltersPage().filterBy('Plain Text');
|
||||
await searchFiltersPage.fileTypeCheckListFiltersPage().filterBy('JPEG Image');
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await expect(await searchResultsPage.numberOfResultsDisplayed()).toBe(2);
|
||||
await searchResultsPage.checkContentIsDisplayed(txtFile.entry.name);
|
||||
@@ -210,13 +217,14 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
});
|
||||
|
||||
txtFile = await uploadActions.uploadFile(txtFileInfo.location, txtFileInfo.name, '-my-');
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(`*${randomName}*`);
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkSearchFiltersIsDisplayed();
|
||||
});
|
||||
@@ -232,10 +240,12 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(`*${randomName}*`);
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkSearchFiltersIsDisplayed();
|
||||
await searchFiltersPage.fileTypeCheckListFiltersPage().filterBy('Plain Text');
|
||||
await searchFiltersPage.creatorCheckListFiltersPage().filterBy(`${acsUser.firstName} ${acsUser.lastName}`);
|
||||
await searchResultsPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await expect(await searchResultsPage.numberOfResultsDisplayed()).toBe(1);
|
||||
await searchResultsPage.checkContentIsDisplayed(txtFile.entry.name);
|
||||
|
@@ -86,7 +86,7 @@ describe('Search component - Search Page', () => {
|
||||
|
||||
await uploadActions.createEmptyFiles(adminFileNames, newFolderModelUploaded.entry.id);
|
||||
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
@@ -101,12 +101,15 @@ describe('Search component - Search Page', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(notExistentFileName);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkNoResultMessageIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C272810] Should display only files corresponding to search', async () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search.active.firstFile);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkContentIsDisplayed(search.active.firstFile);
|
||||
await expect(await searchResultPage.numberOfResultsDisplayed()).toBe(1);
|
||||
@@ -115,8 +118,11 @@ describe('Search component - Search Page', () => {
|
||||
it('[C260267] Should display content when opening a folder from search results', async () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(emptyFolderModel.name);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkNoResultMessageIsNotDisplayed();
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkContentIsDisplayed(emptyFolderModel.name);
|
||||
await searchResultPage.navigateToFolder(emptyFolderModel.name);
|
||||
const result = await contentServicesPage.currentFolderName();
|
||||
@@ -126,6 +132,7 @@ describe('Search component - Search Page', () => {
|
||||
it('[C260261] Should be able to delete a file from search results', async () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search.active.firstFile);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkContentIsDisplayed(search.active.firstFile);
|
||||
|
||||
@@ -138,15 +145,20 @@ describe('Search component - Search Page', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search.active.firstFile);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkNoResultMessageIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C272809] Should be able to delete a folder from search results', async () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(emptyFolderModel.name);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkContentIsDisplayed(emptyFolderModel.name);
|
||||
await searchResultPage.checkNoResultMessageIsNotDisplayed();
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkContentIsDisplayed(emptyFolderModel.name);
|
||||
await searchResultPage.deleteContent(emptyFolderModel.name);
|
||||
await searchResultPage.checkNoResultMessageIsDisplayed();
|
||||
@@ -155,12 +167,15 @@ describe('Search component - Search Page', () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(emptyFolderModel.name);
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkNoResultMessageIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C286675] Should display results when searching for all elements', async () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResultPage.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchResultPage.checkNoResultMessageIsNotDisplayed();
|
||||
});
|
||||
|
@@ -51,6 +51,7 @@ const appConfig = {
|
||||
"redirectUriLogout": REDIRECT_URI_LOGOUT,
|
||||
"redirectSilentIframeUri": `${HOST}/assets/silent-refresh.html`,
|
||||
"publicUrls": [
|
||||
"**/logout",
|
||||
"**/preview/s/*",
|
||||
"**/settings"
|
||||
]
|
||||
@@ -108,7 +109,8 @@ module.exports = {
|
||||
|
||||
timeouts: {
|
||||
visible_timeout: 20000,
|
||||
no_visible_timeout: 20000
|
||||
no_visible_timeout: 20000,
|
||||
index_search: 25000
|
||||
}
|
||||
|
||||
};
|
||||
|
@@ -35,7 +35,6 @@ export class SimpleInheritedPermissionTestComponent {
|
||||
}
|
||||
|
||||
onUpdate(node: any) {
|
||||
this.updatedNode = node.permissions.isInheritanceEnabled;
|
||||
this.updatedNode = node.permissions?.isInheritanceEnabled ?? false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@ describe('InheritPermissionDirective', () => {
|
||||
it('should be able to add inherited permission', async(() => {
|
||||
spyOn(nodeService, 'getNode').and.returnValue(of(fakeNodeNoInherit));
|
||||
spyOn(nodeService, 'updateNode').and.callFake((_, nodeBody) => {
|
||||
if (nodeBody.permissions.isInheritanceEnabled) {
|
||||
if (nodeBody.permissions?.isInheritanceEnabled) {
|
||||
return of(fakeNodeWithInherit);
|
||||
} else {
|
||||
return of(fakeNodeNoInherit);
|
||||
@@ -79,7 +79,7 @@ describe('InheritPermissionDirective', () => {
|
||||
it('should be able to remove inherited permission', async(() => {
|
||||
spyOn(nodeService, 'getNode').and.returnValue(of(fakeNodeWithInherit));
|
||||
spyOn(nodeService, 'updateNode').and.callFake((_, nodeBody) => {
|
||||
if (nodeBody.permissions.isInheritanceEnabled) {
|
||||
if (nodeBody.permissions?.isInheritanceEnabled) {
|
||||
return of(fakeNodeWithInherit);
|
||||
} else {
|
||||
return of(fakeNodeNoInherit);
|
||||
|
@@ -48,7 +48,7 @@ export class InheritPermissionDirective {
|
||||
onInheritPermissionClicked() {
|
||||
this.nodeService.getNode(this.nodeId).subscribe((node: Node) => {
|
||||
if (this.contentService.hasAllowableOperations(node, AllowableOperationsEnum.UPDATEPERMISSIONS)) {
|
||||
const nodeBody = { permissions: { isInheritanceEnabled: !node.permissions.isInheritanceEnabled } };
|
||||
const nodeBody = { permissions: { isInheritanceEnabled: !node?.permissions?.isInheritanceEnabled ?? false} };
|
||||
this.nodeService.updateNode(this.nodeId, nodeBody, { include: ['permissions'] }).subscribe((nodeUpdated: Node) => {
|
||||
this.updated.emit(nodeUpdated);
|
||||
}, (error) => this.error.emit(error));
|
||||
|
@@ -71,13 +71,13 @@ export class PermissionListComponent implements OnInit {
|
||||
|
||||
private getPermissionList(node: Node): PermissionDisplayModel[] {
|
||||
const allPermissions: PermissionDisplayModel[] = [];
|
||||
if (node.permissions.locallySet) {
|
||||
if (node?.permissions?.locallySet) {
|
||||
node.permissions.locallySet.map((permissionElement: PermissionElement) => {
|
||||
const permission = new PermissionDisplayModel(permissionElement);
|
||||
allPermissions.push(permission);
|
||||
});
|
||||
}
|
||||
if (node.permissions.inherited) {
|
||||
if (node?.permissions?.inherited) {
|
||||
node.permissions.inherited.map((permissionElement: PermissionElement) => {
|
||||
const permissionInherited = new PermissionDisplayModel(permissionElement);
|
||||
permissionInherited.isInherited = true;
|
||||
|
@@ -303,7 +303,7 @@ export class SearchFilterComponent implements OnInit, OnDestroy {
|
||||
private getResponseQueryBuckets(responseField: GenericFacetResponse, configGroup: any): FacetFieldBucket[] {
|
||||
return (configGroup || []).map((query) => {
|
||||
const respBucket = ((responseField && responseField.buckets) || [])
|
||||
.find((bucket) => bucket.label === query.label);
|
||||
.find((bucket) => bucket.label === query.label) || {};
|
||||
|
||||
respBucket['count'] = this.getCountValue(respBucket);
|
||||
return <FacetFieldBucket> {
|
||||
@@ -316,8 +316,7 @@ export class SearchFilterComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
private getCountValue(bucket: GenericBucket): number {
|
||||
return (!!bucket && !!bucket.metrics && bucket.metrics[0] && bucket.metrics[0].value && bucket.metrics[0].value.count)
|
||||
|| 0;
|
||||
return (!!bucket && !!bucket.metrics && bucket.metrics[0]?.value?.count) || 0;
|
||||
}
|
||||
|
||||
getBucketCountDisplay(bucket: FacetFieldBucket): string {
|
||||
|
@@ -57,6 +57,7 @@ export class AddPermissionsDialogPage {
|
||||
|
||||
async searchUserOrGroup(name: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.searchUserInput, name);
|
||||
await this.dataTableComponentPage.waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async checkResultListIsDisplayed(): Promise<void> {
|
||||
@@ -65,7 +66,7 @@ export class AddPermissionsDialogPage {
|
||||
|
||||
async clickUserOrGroup(name: string): Promise<void> {
|
||||
const userOrGroupName = element(by.cssContainingText('mat-list-option .mat-list-text', name));
|
||||
await BrowserActions.clickScript(userOrGroupName);
|
||||
await BrowserActions.click(userOrGroupName);
|
||||
await BrowserActions.click(this.addButton);
|
||||
}
|
||||
|
||||
@@ -95,8 +96,8 @@ export class AddPermissionsDialogPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noPermissions);
|
||||
}
|
||||
|
||||
async getPermissionInheritedButtonText(): Promise<string> {
|
||||
return BrowserActions.getText(this.permissionInheritedButton);
|
||||
async getPermissionInheritedButtonText(text: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementHasText(this.permissionInheritedButton, text);
|
||||
}
|
||||
|
||||
async checkPermissionsDatatableIsDisplayed(): Promise<void> {
|
||||
|
@@ -21,6 +21,7 @@ import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
||||
import { BreadcrumbDropdownPage } from '../pages/breadcrumb/breadcrumb-dropdown.page';
|
||||
import { Logger } from '../../core/utils/logger';
|
||||
|
||||
export class ContentNodeSelectorDialogPage {
|
||||
dialog = element(by.css(`adf-content-node-selector`));
|
||||
@@ -96,9 +97,12 @@ export class ContentNodeSelectorDialogPage {
|
||||
return this.dataTable.numberOfRows();
|
||||
}
|
||||
|
||||
async typeIntoNodeSelectorSearchField(text): Promise<void> {
|
||||
async typeIntoNodeSelectorSearchField(text: string): Promise<void> {
|
||||
Logger.log(`Search Node content node selector ${text}`);
|
||||
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchInputElement);
|
||||
await BrowserActions.clearSendKeys(this.searchInputElement, text);
|
||||
await BrowserActions.clearSendKeys(this.searchInputElement, text, 100);
|
||||
await this.dataTable.waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async clickContentNodeSelectorResult(name: string): Promise<void> {
|
||||
|
@@ -54,6 +54,7 @@ export class SearchCheckListPage {
|
||||
await this.checkSearchFilterInputIsDisplayed();
|
||||
await this.searchInFilter(option);
|
||||
await this.clickCheckListOption(option);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@@ -60,6 +60,8 @@ export class GroupIdentityService {
|
||||
}
|
||||
|
||||
async getGroupInfoByGroupName(groupName: string): Promise<any> {
|
||||
Logger.log(`Get GroupInfoByGroupName ${groupName}`);
|
||||
|
||||
const predicate = (result: any) => {
|
||||
return !!result;
|
||||
};
|
||||
@@ -71,6 +73,9 @@ export class GroupIdentityService {
|
||||
const queryParams = { search: groupName }, postBody = {};
|
||||
|
||||
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
|
||||
|
||||
Logger.log(`Data ${JSON.stringify(data)}`);
|
||||
|
||||
return data[0];
|
||||
} catch (error) {
|
||||
Logger.error('Group not found');
|
||||
@@ -81,6 +86,8 @@ export class GroupIdentityService {
|
||||
}
|
||||
|
||||
async assignRole(groupId: string, roleId: string, roleName: string): Promise<any> {
|
||||
Logger.log(`Assign to group ${groupId} Role ${roleName}`);
|
||||
|
||||
const path = `/groups/${groupId}/role-mappings/realm`;
|
||||
const method = 'POST';
|
||||
const queryParams = {};
|
||||
|
@@ -41,6 +41,7 @@ export class IdentityService {
|
||||
}
|
||||
|
||||
async createIdentityUser(user: UserModel = new UserModel()): Promise<any> {
|
||||
Logger.log(`Create Identity User ${user.email}`);
|
||||
await this.createUser(user);
|
||||
|
||||
const userIdentity = await this.getUserInfoByUsername(user.username);
|
||||
@@ -99,6 +100,8 @@ export class IdentityService {
|
||||
}
|
||||
|
||||
async addUserToGroup(userId: string, groupId: string): Promise<any> {
|
||||
Logger.log(`Add user to group userId ${userId} ${groupId}`);
|
||||
|
||||
try {
|
||||
const path = `/users/${userId}/groups/${groupId}`;
|
||||
const method = 'PUT';
|
||||
|
@@ -157,6 +157,8 @@ export class DataTableComponentPage {
|
||||
}
|
||||
|
||||
async rightClickOnRow(columnName: string, columnValue: string): Promise<void> {
|
||||
Logger.log(`Right Click On Row ${columnName} ${columnValue}`);
|
||||
|
||||
const row = this.getRow(columnName, columnValue);
|
||||
await BrowserActions.rightClick(row);
|
||||
|
||||
@@ -256,6 +258,7 @@ export class DataTableComponentPage {
|
||||
}
|
||||
|
||||
async checkContentIsDisplayed(columnName: string, columnValue: string): Promise<void> {
|
||||
Logger.log(`Wait content is displayed ${columnName} ${columnValue}`);
|
||||
const row = this.getCellElementByValue(columnName, columnValue);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
}
|
||||
@@ -289,48 +292,74 @@ export class DataTableComponentPage {
|
||||
async waitTillContentLoaded(): Promise<void> {
|
||||
await browser.sleep(500);
|
||||
|
||||
if (element(by.tagName('mat-spinner')).isPresent()) {
|
||||
if (this.isSpinnerPresent()) {
|
||||
Logger.log('wait datatable loading spinner disappear');
|
||||
await BrowserVisibility.waitUntilElementIsNotPresent(element(by.tagName('mat-spinner')));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.tagName('mat-spinner')));
|
||||
|
||||
if (this.isEmpty()) {
|
||||
Logger.log('empty page');
|
||||
} else {
|
||||
await this.waitFirstElementPresent();
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
Logger.log('wait datatable loading spinner is present');
|
||||
await BrowserVisibility.waitUntilElementIsPresent(element(by.tagName('mat-spinner')));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.tagName('mat-spinner')));
|
||||
} catch (error) {
|
||||
}
|
||||
if (this.isEmpty()) {
|
||||
Logger.log('empty page');
|
||||
} else {
|
||||
await this.waitFirstElementPresent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async isSpinnerPresent(): Promise<boolean> {
|
||||
let isSpinnerPresent;
|
||||
|
||||
try {
|
||||
isSpinnerPresent = await element(by.tagName('mat-spinner')).isDisplayed();
|
||||
} catch (error) {
|
||||
isSpinnerPresent = false;
|
||||
}
|
||||
|
||||
return isSpinnerPresent;
|
||||
}
|
||||
|
||||
private async waitFirstElementPresent(): Promise<void> {
|
||||
try {
|
||||
Logger.log('wait first element is present');
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first());
|
||||
} catch (error) {
|
||||
Logger.log('Possible empty page');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async waitTillContentLoadedInfinitePagination(): Promise<void> {
|
||||
await browser.sleep(500);
|
||||
|
||||
if (element(by.tagName('mat-progress-bar')).isPresent()) {
|
||||
if (this.isSpinnerPresent()) {
|
||||
Logger.log('wait datatable loading spinner disappear');
|
||||
await BrowserVisibility.waitUntilElementIsNotPresent(element(by.tagName('mat-progress-bar')));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.tagName('mat-progress-bar')));
|
||||
|
||||
if (this.isEmpty()) {
|
||||
Logger.log('empty page');
|
||||
} else {
|
||||
await this.waitFirstElementPresent();
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
Logger.log('wait datatable loading spinner is present');
|
||||
await BrowserVisibility.waitUntilElementIsPresent(element(by.tagName('mat-progress-bar')));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.tagName('mat-progress-bar')));
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Logger.log('wait first element is present');
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first(), 1000);
|
||||
} catch (error) {
|
||||
Logger.log('Possible empty page');
|
||||
}
|
||||
|
||||
}
|
||||
if (this.isEmpty()) {
|
||||
Logger.log('empty page');
|
||||
} else {
|
||||
await this.waitFirstElementPresent();
|
||||
}
|
||||
} }
|
||||
|
||||
async checkColumnIsDisplayed(column: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`div[data-automation-id="auto_id_entry.${column}"]`)));
|
||||
@@ -449,11 +478,18 @@ export class DataTableComponentPage {
|
||||
}
|
||||
|
||||
async isEmpty(): Promise<boolean> {
|
||||
return this.emptyList.isPresent();
|
||||
let isDisplayed;
|
||||
|
||||
try {
|
||||
isDisplayed = await this.emptyList.isDisplayed();
|
||||
} catch (error) {
|
||||
isDisplayed = false;
|
||||
}
|
||||
return isDisplayed;
|
||||
}
|
||||
|
||||
async waitForEmptyState(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsPresent(this.emptyList);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.emptyList);
|
||||
}
|
||||
|
||||
async getEmptyStateTitle(): Promise<string> {
|
||||
|
@@ -63,6 +63,8 @@ export class LoginPage {
|
||||
} else {
|
||||
await this.loginBasicAuth(username, password);
|
||||
}
|
||||
|
||||
await browser.waitForAngular();
|
||||
}
|
||||
|
||||
async loginSSOIdentityService(username: string, password: string) {
|
||||
@@ -84,8 +86,6 @@ export class LoginPage {
|
||||
await this.clickLoginButton();
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.header);
|
||||
|
||||
await browser.waitForAngular();
|
||||
}
|
||||
|
||||
async loginBasicAuth(username: string, password: string): Promise<void> {
|
||||
|
@@ -35,12 +35,12 @@ export class TabsPage {
|
||||
}
|
||||
|
||||
async getNoOfTabs(): Promise<number> {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.tabs.first());
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.tabs.first());
|
||||
return this.tabs.count();
|
||||
}
|
||||
|
||||
async getTabsLabels(): Promise<string> {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.tabs.first());
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.tabs.first());
|
||||
return this.tabs.getText();
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ import { TabsPage } from './material/tabs.page';
|
||||
import { TogglePage } from './material/toggle.page';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { element, by, browser, protractor } from 'protractor';
|
||||
import { Logger } from '../utils/logger';
|
||||
|
||||
export class ViewerPage {
|
||||
|
||||
@@ -110,6 +111,34 @@ export class ViewerPage {
|
||||
const fileView = element.all(by.css(`#document-list-container div[data-automation-id="${fileName}"]`)).first();
|
||||
await BrowserActions.click(fileView);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
await this.waitTillContentLoaded();
|
||||
}
|
||||
|
||||
async waitTillContentLoaded(): Promise<void> {
|
||||
await browser.sleep(500);
|
||||
|
||||
if (this.isSpinnerPresent()) {
|
||||
Logger.log('wait spinner disappear');
|
||||
await BrowserVisibility.waitUntilElementIsNotPresent(element(by.tagName('mat-spinner')));
|
||||
} else {
|
||||
try {
|
||||
Logger.log('wait spinner is present');
|
||||
await BrowserVisibility.waitUntilElementIsPresent(element(by.tagName('mat-spinner')));
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async isSpinnerPresent(): Promise<boolean> {
|
||||
let isSpinnerPresent;
|
||||
|
||||
try {
|
||||
isSpinnerPresent = await element(by.tagName('mat-spinner')).isDisplayed();
|
||||
} catch (error) {
|
||||
isSpinnerPresent = false;
|
||||
}
|
||||
|
||||
return isSpinnerPresent;
|
||||
}
|
||||
|
||||
async clearPageNumber(): Promise<void> {
|
||||
@@ -338,7 +367,7 @@ export class ViewerPage {
|
||||
}
|
||||
|
||||
async clickInfoButton(): Promise<void> {
|
||||
await BrowserActions.clickExecuteScript('button[data-automation-id="adf-toolbar-sidebar"]');
|
||||
await BrowserActions.click(element(by.css('button[data-automation-id="adf-toolbar-sidebar"]')));
|
||||
}
|
||||
|
||||
async clickOnTab(tabName: string): Promise<void> {
|
||||
|
@@ -21,32 +21,54 @@ import { Logger } from './logger';
|
||||
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { ApiUtil } from '../actions/api.util';
|
||||
|
||||
export class BrowserActions {
|
||||
|
||||
static async click(elementFinder: ElementFinder): Promise<void> {
|
||||
static async clickUntilIsNotVisible(elementToClick: ElementFinder, elementToFind: ElementFinder): Promise<void> {
|
||||
Logger.info(`Click until element is not present: ${elementToClick.locator().toString()}`);
|
||||
|
||||
const predicate = (isVisible: boolean) => {
|
||||
return isVisible;
|
||||
};
|
||||
|
||||
const apiCall = async () => {
|
||||
await this.click(elementToClick);
|
||||
|
||||
try {
|
||||
return BrowserVisibility.waitUntilElementIsVisible(elementToFind);
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
return ApiUtil.waitForApi(apiCall, predicate, 5, 2000);
|
||||
}
|
||||
|
||||
static async click(elementToClick: ElementFinder): Promise<void> {
|
||||
try {
|
||||
Logger.info(`Click element: ${elementFinder.locator().toString()}`);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(elementFinder);
|
||||
await BrowserVisibility.waitUntilElementIsClickable(elementFinder);
|
||||
await elementFinder.click();
|
||||
Logger.info(`Click element: ${elementToClick.locator().toString()}`);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(elementToClick);
|
||||
await BrowserVisibility.waitUntilElementIsClickable(elementToClick);
|
||||
await elementToClick.click();
|
||||
} catch (clickErr) {
|
||||
Logger.warn(`click error element ${elementFinder.locator().toString()} consider to use directly clickScript`);
|
||||
await this.clickScript(elementFinder);
|
||||
Logger.warn(`click error element ${elementToClick.locator().toString()} consider to use directly clickScript`);
|
||||
await this.clickScript(elementToClick);
|
||||
}
|
||||
}
|
||||
|
||||
static async clickScript(elementFinder: ElementFinder): Promise<void> {
|
||||
Logger.info(`Click script ${elementFinder.locator().toString()}`);
|
||||
static async clickScript(elementToClick: ElementFinder): Promise<void> {
|
||||
Logger.info(`Click script ${elementToClick.locator().toString()}`);
|
||||
|
||||
await browser.executeScript(`arguments[0].scrollIntoView();`, elementFinder);
|
||||
await browser.executeScript(`arguments[0].click();`, elementFinder);
|
||||
await browser.executeScript(`arguments[0].scrollIntoView();`, elementToClick);
|
||||
await browser.executeScript(`arguments[0].click();`, elementToClick);
|
||||
}
|
||||
|
||||
static async clickExecuteScript(elementCssSelector: string): Promise<void> {
|
||||
Logger.info(`Click execute script ${elementCssSelector}`);
|
||||
|
||||
await BrowserVisibility.waitUntilElementIsPresent(element(by.css(elementCssSelector)));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(elementCssSelector)));
|
||||
await browser.executeScript(`document.querySelector('${elementCssSelector}').click();`);
|
||||
}
|
||||
|
||||
@@ -72,12 +94,14 @@ export class BrowserActions {
|
||||
static async getText(elementFinder: ElementFinder): Promise<string> {
|
||||
Logger.info(`Get Text ${elementFinder.locator().toString()}`);
|
||||
|
||||
const present = await BrowserVisibility.waitUntilElementIsPresent(elementFinder);
|
||||
const present = await BrowserVisibility.waitUntilElementIsVisible(elementFinder);
|
||||
|
||||
if (present) {
|
||||
let text = await elementFinder.getText();
|
||||
|
||||
if (text === '') { // DO NOT REMOVE BUG sometime wrongly return empty text for cdk elements
|
||||
Logger.info(`Use backup get text script`);
|
||||
|
||||
text = await this.getTextScript(elementFinder);
|
||||
return text?.trim();
|
||||
}
|
||||
@@ -89,14 +113,15 @@ export class BrowserActions {
|
||||
}
|
||||
}
|
||||
|
||||
static async getTextScript(elementFinder: ElementFinder): Promise<string> {
|
||||
// Don't make it pub,ic use getText
|
||||
private static async getTextScript(elementFinder: ElementFinder): Promise<string> {
|
||||
return browser.executeScript(`return arguments[0].textContent`, elementFinder);
|
||||
}
|
||||
|
||||
static async getInputValue(elementFinder: ElementFinder): Promise<string> {
|
||||
Logger.info(`Get Input value ${elementFinder.locator().toString()}`);
|
||||
|
||||
const present = await BrowserVisibility.waitUntilElementIsPresent(elementFinder);
|
||||
const present = await BrowserVisibility.waitUntilElementIsVisible(elementFinder);
|
||||
if (present) {
|
||||
return elementFinder.getAttribute('value');
|
||||
} else {
|
||||
@@ -187,7 +212,7 @@ export class BrowserActions {
|
||||
|
||||
const fileWithPath = path.join(screenshotFilePath, filenameWithExt);
|
||||
const stream = fs.createWriteStream(fileWithPath);
|
||||
stream.write(new Buffer(pngData, 'base64'));
|
||||
stream.write(Buffer.from(pngData, 'base64'));
|
||||
stream.end();
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user