Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADF-5235] Facet fix and improve search test #6122

Merged
merged 34 commits into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion demo-shell/src/app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"redirectUriLogout": "/logout",
"publicUrls": [
"**/preview/s/*",
"**/settings"
"**/settings",
"**/logout"
]
},
"application": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
8 changes: 3 additions & 5 deletions e2e/content-services/comments/comment-component.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
17 changes: 4 additions & 13 deletions e2e/content-services/directives/create-library-directive.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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();
Expand All @@ -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);
Expand All @@ -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();
Expand All @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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 () => {
Expand Down
1 change: 1 addition & 0 deletions e2e/content-services/directives/delete-directive.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
});

Expand Down Expand Up @@ -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');
});
Expand All @@ -287,7 +287,6 @@ describe('Restore content directive', () => {

await loginPage.login(anotherAcsUser.email, anotherAcsUser.password);
await contentServicesPage.goToDocumentList();
await contentServicesPage.waitForTableBody();
});

afterAll(async () => {
Expand Down Expand Up @@ -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);
});
Expand Down