Skip to content

Commit

Permalink
ix build (#6347)
Browse files Browse the repository at this point in the history
* create after e2e and before e2e script

* permission test exclude

* flaky exclude

* fix

* chmod permission

* modify check cs

* fix

* execute

* fix

* fix
  • Loading branch information
eromano committed Nov 16, 2020
1 parent d36fd9d commit ababde3
Show file tree
Hide file tree
Showing 42 changed files with 152 additions and 130 deletions.
30 changes: 14 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,37 +88,35 @@ jobs:
- stage: Release tag
script: ./scripts/travis/release/git-tag.sh


- stage: e2e Test
name: core
before_script:
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-demoshell.tar.bz2" -o "./dist/demo-shell"
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-libs.tar.bz2" -o "./lib/dist"
before_script: ./scripts/ci/job_hooks/before_e2e.sh
script: ./scripts/travis/e2e/core-e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh

- stage: e2e Test
name: content
before_script:
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-demoshell.tar.bz2" -o "./dist/demo-shell"
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-libs.tar.bz2" -o "./lib/dist"
before_script: ./scripts/ci/job_hooks/before_e2e.sh
script: ./scripts/travis/e2e/content-services-e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh

- stage: e2e Test
name: search
before_script:
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-demoshell.tar.bz2" -o "./dist/demo-shell"
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-libs.tar.bz2" -o "./lib/dist"
before_script: ./scripts/ci/job_hooks/before_e2e.sh
script: ./scripts/travis/e2e/search-e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh

- stage: e2e Test
name: process
before_script:
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-demoshell.tar.bz2" -o "./dist/demo-shell"
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-libs.tar.bz2" -o "./lib/dist"
before_script: ./scripts/ci/job_hooks/before_e2e.sh
script: ./scripts/travis/e2e/process-services-e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh

- stage: e2e Test
name: process Cloud
before_script:
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-demoshell.tar.bz2" -o "./dist/demo-shell"
- ./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/alfresco-libs.tar.bz2" -o "./lib/dist"
before_script: ./scripts/ci/job_hooks/before_e2e.sh
script: ./scripts/travis/e2e/process-services-cloud-e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh

- stage: Check bundle
script:
Expand Down
4 changes: 2 additions & 2 deletions e2e/content-services/comments/comment-component.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('Comment Component', () => {

await loginPage.login(acsUser.email, acsUser.password);

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
});

Expand Down Expand Up @@ -184,7 +184,7 @@ describe('Comment Component', () => {

await loginPage.login(acsUser.email, acsUser.password);

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
});

afterAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/content-services/directives/download-directive.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('Version component actions', () => {

await loginPage.login(acsUser.email, acsUser.password);

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('Edit folder directive', () => {

beforeEach(async () => {
await navigationBarPage.clickHomeButton();
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
});

Expand Down
8 changes: 4 additions & 4 deletions e2e/content-services/directives/favorite-directive.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('Favorite directive', () => {
});

beforeEach(async () => {
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
});

Expand All @@ -95,7 +95,7 @@ describe('Favorite directive', () => {
await customSourcesPage.selectFavoritesSourceType();
await customSourcesPage.checkRowIsDisplayed(testFile.entry.name);

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFile.entry.name);
Expand All @@ -117,7 +117,7 @@ describe('Favorite directive', () => {
await customSourcesPage.selectFavoritesSourceType();
await customSourcesPage.checkRowIsDisplayed(testFolder1.entry.name);

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFolder1.entry.name);
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFolder1.entry.name);
Expand Down Expand Up @@ -153,7 +153,7 @@ describe('Favorite directive', () => {
await trashcanPage.contentList.dataTablePage().waitTillContentLoaded();
await trashcanPage.checkTrashcanIsEmpty();

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFile.entry.name);
Expand Down
18 changes: 9 additions & 9 deletions e2e/content-services/directives/restore-content-directive.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ describe('Restore content directive', () => {

beforeEach(async () => {
await BrowserActions.closeMenuAndDialogs();
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
});

describe('Restore same name folders', () => {
beforeAll(async () => {
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
await contentServicesPage.checkContentIsDisplayed(folderName);
await contentServicesPage.deleteContent(folderName);
Expand All @@ -110,7 +110,7 @@ describe('Restore content directive', () => {

it('[C260227] Should validate when restoring Folders with same name', async () => {
await uploadActions.createFolder(folderName, '-my-');
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await browser.refresh();
await contentServicesPage.waitForTableBody();
await contentServicesPage.checkContentIsDisplayed(folderName);
Expand All @@ -123,7 +123,7 @@ describe('Restore content directive', () => {
await trashcanPage.getDocumentList().dataTablePage().checkAllRows();
await trashcanPage.clickRestore();
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
await contentServicesPage.checkContentIsDisplayed(folderName);

Expand All @@ -144,7 +144,7 @@ describe('Restore content directive', () => {

await notificationHistoryPage.checkNotifyContains(testFile.entry.name + ' item restored');

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
await contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
await contentServicesPage.deleteContent(testFile.entry.name);
Expand All @@ -165,7 +165,7 @@ describe('Restore content directive', () => {
await trashcanPage.clickRestore();
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsNotDisplayed(folderWithContent.entry.name);

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
await contentServicesPage.checkContentIsDisplayed(folderWithContent.entry.name);
await contentServicesPage.getDocumentList().dataTablePage().doubleClickRow('Display name', folderWithContent.entry.name);
Expand Down Expand Up @@ -201,7 +201,7 @@ describe('Restore content directive', () => {
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderWithFolder.entry.name);
await trashcanPage.clickRestore();
await notificationHistoryPage.checkNotifyContains('Restore successful');
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
await contentServicesPage.openFolder(folderWithFolder.entry.name);
Expand Down Expand Up @@ -261,7 +261,7 @@ describe('Restore content directive', () => {
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(publicSite.entry.id);
await trashcanPage.clickRestore();

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
await contentServicesPage.selectSite(publicSite.entry.title);
await contentServicesPage.waitForTableBody();
Expand Down Expand Up @@ -312,7 +312,7 @@ describe('Restore content directive', () => {
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(mainFile.entry.name);
await trashcanPage.clickRestore();

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
await contentServicesPage.checkContentIsDisplayed(parentFolder.entry.name);
await contentServicesPage.checkContentIsDisplayed(mainFolder.entry.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('Document List Component - Actions', () => {
});

beforeEach(async () => {
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('Document List Component', () => {

beforeEach(async () => {
await BrowserActions.closeMenuAndDialogs();
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,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 navigationBar.navigateToContentServices();
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();

await contentServicesPage.openFolder(parentFolder.entry.name);
Expand All @@ -75,7 +75,7 @@ describe('Document List Component - Properties', () => {
});

it('[C91319] Should allow upload content on a folder row if allowDropFiles is true', async () => {
await navigationBar.clickContentServicesButton();
await navigationBar.navigateToContentServices();
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();

await contentServicesPage.openFolder(parentFolder.entry.name);
Expand Down
16 changes: 8 additions & 8 deletions e2e/content-services/metadata/aspect-oriented-config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('Aspect oriented config', () => {
}
}));

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();

await viewerPage.viewFile(pngFileModel.name);
await viewerPage.clickInfoButton();
Expand Down Expand Up @@ -143,7 +143,7 @@ describe('Aspect oriented config', () => {
}
}));

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();

await viewerPage.viewFile(pngFileModel.name);
await viewerPage.clickInfoButton();
Expand All @@ -161,7 +161,7 @@ describe('Aspect oriented config', () => {
it('[C260183] Should show all the aspect if the content-metadata configuration is NOT provided', async () => {
await LocalStorageUtil.setConfigField('content-metadata', '{}');

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();

await viewerPage.viewFile(pngFileModel.name);
await viewerPage.clickInfoButton();
Expand All @@ -182,7 +182,7 @@ describe('Aspect oriented config', () => {
}
}));

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();

await viewerPage.viewFile(pngFileModel.name);
await viewerPage.clickInfoButton();
Expand Down Expand Up @@ -222,7 +222,7 @@ describe('Aspect oriented config', () => {
' }' +
'}');

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();

await viewerPage.viewFile(pngFileModel.name);
await viewerPage.clickInfoButton();
Expand All @@ -249,7 +249,7 @@ describe('Aspect oriented config', () => {
' }' +
'}');

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();

await viewerPage.viewFile(pngFileModel.name);
await viewerPage.clickInfoButton();
Expand All @@ -276,7 +276,7 @@ describe('Aspect oriented config', () => {
' }' +
'}');

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();

await viewerPage.viewFile(pngFileModel.name);
await viewerPage.clickInfoButton();
Expand All @@ -298,7 +298,7 @@ describe('Aspect oriented config', () => {
' }' +
'}');

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();

await viewerPage.viewFile(pngFileModel.name);
await viewerPage.clickInfoButton();
Expand Down
2 changes: 1 addition & 1 deletion e2e/content-services/metadata/metadata-properties.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('CardView Component - properties', () => {

await loginPage.login(acsUser.email, acsUser.password);

await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
});

Expand Down
6 changes: 3 additions & 3 deletions e2e/content-services/metadata/metadata-smoke-tests.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('Metadata component', () => {
describe('Viewer Metadata', () => {
beforeAll(async () => {
await loginPage.login(acsUser.email, acsUser.password);
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
presets: {
Expand Down Expand Up @@ -230,7 +230,7 @@ describe('Metadata component', () => {
await uploadActions.createFolder(folderName, '-my-');

await loginPage.login(acsUser.email, acsUser.password);
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
});

Expand Down Expand Up @@ -280,7 +280,7 @@ describe('Metadata component', () => {
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('check author example description');

await loginPage.login(acsUser.email, acsUser.password);
await navigationBarPage.clickContentServicesButton();
await navigationBarPage.navigateToContentServices();

await viewerPage.viewFile(pngFileModel.name);
await viewerPage.checkFileIsLoaded();
Expand Down
7 changes: 4 additions & 3 deletions e2e/content-services/permissions/permissions-component.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ describe('Permissions Component', () => {
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
await permissionsPage.addPermissionsDialog.searchUserOrGroup(groupBody.id);
await permissionsPage.addPermissionsDialog.clickUserOrGroup(groupBody.displayName);
await permissionsPage.addPermissionsDialog.checkUserOrGroupIsAdded(groupBody.id);

await permissionsPage.addPermissionsDialog.checkGroupIsAdded(groupBody.id);
});

it('[C277100] Should display EVERYONE group in the search result set', async () => {
Expand Down Expand Up @@ -263,7 +264,7 @@ describe('Permissions Component', () => {
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
await permissionsPage.addPermissionsDialog.searchUserOrGroup(filePermissionUser.email);
await permissionsPage.addPermissionsDialog.clickUserOrGroup(filePermissionUser.firstName);
await permissionsPage.addPermissionsDialog.checkUserOrGroupIsAdded(filePermissionUser.email);
await permissionsPage.addPermissionsDialog.checkUserIsAdded(filePermissionUser.email);
});

afterEach(async () => {
Expand Down Expand Up @@ -313,7 +314,7 @@ describe('Permissions Component', () => {
it('[C276982] Should be able to remove User or Group from the locally set permissions', async () => {
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Contributor');
await permissionsPage.addPermissionsDialog.clickDeletePermissionButton();
await permissionsPage.addPermissionsDialog.checkUserOrGroupIsDeleted(filePermissionUser.email);
await permissionsPage.addPermissionsDialog.checkUserIsDeleted(filePermissionUser.email);
});
});

Expand Down
2 changes: 1 addition & 1 deletion e2e/content-services/permissions/site-permissions.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ describe('Permissions Component', () => {
await permissionsPage.addPermissionsDialog.searchUserOrGroup(consumerUser.email);

await permissionsPage.addPermissionsDialog.clickUserOrGroup(consumerUser.firstName);
await permissionsPage.addPermissionsDialog.checkUserOrGroupIsAdded(consumerUser.email);
await permissionsPage.addPermissionsDialog.checkUserIsAdded(consumerUser.email);

await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(consumerUser.email)).toEqual('SiteCollaborator');

Expand Down

0 comments on commit ababde3

Please sign in to comment.