diff --git a/.travis.yml b/.travis.yml
index 120e26ff1c..b3ea007312 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,7 +23,7 @@ jobs:
script: if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/npm-build-all.sh || exit 1;);
else
- (./scripts/npm-build-all.sh -vjsapi alpha -sb --skip-lint || exit 1;);
+ (./scripts/update-version.sh -gnu -alpha && ././scripts/npm-build-all.sh -sb --skip-lint || exit 1;);
fi
- stage: Lint
script: (./scripts/lint.sh)
diff --git a/demo-shell/src/app/components/notifications/notifications.component.html b/demo-shell/src/app/components/notifications/notifications.component.html
index 765a36e7fc..d8f8bd065e 100644
--- a/demo-shell/src/app/components/notifications/notifications.component.html
+++ b/demo-shell/src/app/components/notifications/notifications.component.html
@@ -56,6 +56,8 @@
+
SnackBar Config
diff --git a/demo-shell/src/app/components/notifications/notifications.component.ts b/demo-shell/src/app/components/notifications/notifications.component.ts
index d8b3e72ecd..218f3ddc8b 100644
--- a/demo-shell/src/app/components/notifications/notifications.component.ts
+++ b/demo-shell/src/app/components/notifications/notifications.component.ts
@@ -113,4 +113,8 @@ export class NotificationsComponent implements OnInit {
}
}
}
+
+ dismissSnackBar() {
+ this.notificationService.dismissSnackMessageAction();
+ }
}
diff --git a/docs/core/notification.service.md b/docs/core/notification.service.md
index c2d0a701c4..8fd5590f18 100644
--- a/docs/core/notification.service.md
+++ b/docs/core/notification.service.md
@@ -25,6 +25,8 @@ Shows a notification message with optional feedback.
- _action:_ `string` - Caption for the response button
- _config:_ `number|MatSnackBarConfig` - Time before notification disappears after being shown or MatSnackBarConfig object
- **Returns** [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`
` - Information/control object for the SnackBar
+- **dismissSnackMessageAction()**
+ dismiss the notification snackbar
## Details
diff --git a/e2e/content-services/comments/comment_component.e2e.ts b/e2e/content-services/comments/comment_component.e2e.ts
index 0375fc27ad..ff7cad6514 100644
--- a/e2e/content-services/comments/comment_component.e2e.ts
+++ b/e2e/content-services/comments/comment_component.e2e.ts
@@ -113,7 +113,7 @@ describe('Comment Component', () => {
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
expect(commentsPage.getMessage(0)).toEqual(comments.test);
expect(commentsPage.getUserName(0)).toEqual(userFullName);
- expect(commentsPage.getTime(0)).toContain('ago');
+ expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
});
@@ -129,7 +129,7 @@ describe('Comment Component', () => {
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
expect(commentsPage.getMessage(0)).toEqual(comments.first);
expect(commentsPage.getUserName(0)).toEqual(userFullName);
- expect(commentsPage.getTime(0)).toContain('ago');
+ expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
});
it('[C280021] Should be able to add a multiline comment on a file', () => {
@@ -144,7 +144,7 @@ describe('Comment Component', () => {
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
expect(commentsPage.getMessage(0)).toEqual(comments.multiline);
expect(commentsPage.getUserName(0)).toEqual(userFullName);
- expect(commentsPage.getTime(0)).toContain('ago');
+ expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
commentsPage.addComment(comments.second);
commentsPage.checkUserIconIsDisplayed(0);
@@ -152,7 +152,7 @@ describe('Comment Component', () => {
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (2)');
expect(commentsPage.getMessage(0)).toEqual(comments.second);
expect(commentsPage.getUserName(0)).toEqual(userFullName);
- expect(commentsPage.getTime(0)).toContain('ago');
+ expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
});
it('[C280022] Should not be able to add an HTML or other code input into the comment input filed', () => {
@@ -167,6 +167,6 @@ describe('Comment Component', () => {
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
expect(commentsPage.getMessage(0)).toEqual('First name: Last name:');
expect(commentsPage.getUserName(0)).toEqual(userFullName);
- expect(commentsPage.getTime(0)).toContain('ago');
+ expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
});
});
diff --git a/e2e/content-services/directives/create_folder_directive.e2e.ts b/e2e/content-services/directives/create_folder_directive.e2e.ts
index f2bb3c5ba8..d7101c66ca 100644
--- a/e2e/content-services/directives/create_folder_directive.e2e.ts
+++ b/e2e/content-services/directives/create_folder_directive.e2e.ts
@@ -27,7 +27,6 @@ import AcsUserModel = require('../../models/ACS/acsUserModel');
import TestConfig = require('../../test.config');
import AlfrescoApi = require('alfresco-js-api-node');
-import CONSTANTS = require('../../util/constants');
import { browser, protractor } from 'protractor';
@@ -41,8 +40,6 @@ describe('Create folder directive', function () {
let contentListPage = new ContentListPage();
let acsUser = new AcsUserModel();
- let consumerUser = new AcsUserModel();
- let site;
beforeAll(async (done) => {
this.alfrescoJsApi = new AlfrescoApi({
diff --git a/e2e/content-services/document-list/document_list_actions.e2e.ts b/e2e/content-services/document-list/document_list_actions.e2e.ts
index a1012f386c..db67c88221 100644
--- a/e2e/content-services/document-list/document_list_actions.e2e.ts
+++ b/e2e/content-services/document-list/document_list_actions.e2e.ts
@@ -53,19 +53,6 @@ describe('Document List Component - Actions', () => {
});
});
- afterEach(async (done) => {
- await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
- if (uploadedFolder) {
- await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, uploadedFolder.entry.id);
- uploadedFolder = null;
- }
- if (testFileNode) {
- await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, testFileNode.entry.id);
- testFileNode = null;
- }
- done();
- });
-
describe('File Actions', () => {
let pdfUploadedNode;
@@ -87,18 +74,27 @@ describe('Document List Component - Actions', () => {
done();
});
+ afterEach(async (done) => {
+ try {
+ await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
+ await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, pdfUploadedNode.entry.id);
+ await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, testFileNode.entry.id);
+ await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, uploadedFolder.entry.id);
+ } catch (error) {
+ }
+ done();
+ });
+
it('[C213257] Should be able to copy a file', () => {
- browser.driver.sleep(12000);
+ browser.driver.sleep(15000);
contentListPage.rightClickOnRowNamed(pdfUploadedNode.entry.name);
contentListPage.pressContextMenuActionNamed('Copy');
contentServicesPage.typeIntoNodeSelectorSearchField(folderName);
contentServicesPage.clickContentNodeSelectorResult(folderName);
contentServicesPage.clickCopyButton();
- contentServicesPage.checkAcsContainer();
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
- browser.get(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id);
- contentServicesPage.checkAcsContainer();
+ contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
});
@@ -166,6 +162,16 @@ describe('Document List Component - Actions', () => {
done();
});
+ afterEach(async (done) => {
+ try {
+ await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
+ await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, uploadedFolder.entry.id);
+ await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, secondUploadedFolder.entry.id);
+ } catch (error) {
+ }
+ done();
+ });
+
it('[C260123] Should be able to delete a folder using context menu', () => {
contentListPage.deleteContent(folderName);
contentListPage.checkContentIsNotDisplayed(folderName);
@@ -183,16 +189,14 @@ describe('Document List Component - Actions', () => {
});
it('[C260138] Should be able to copy a folder', () => {
- browser.driver.sleep(12000);
+ browser.driver.sleep(15000);
contentListPage.copyContent(folderName);
contentServicesPage.typeIntoNodeSelectorSearchField(secondfolderName);
contentServicesPage.clickContentNodeSelectorResult(secondfolderName);
contentServicesPage.clickCopyButton();
- contentServicesPage.checkAcsContainer();
contentServicesPage.checkContentIsDisplayed(folderName);
- browser.get(TestConfig.adf.url + '/files/' + secondUploadedFolder.entry.id);
- contentServicesPage.checkAcsContainer();
+ contentServicesPage.doubleClickRow(secondUploadedFolder.entry.name);
contentServicesPage.checkContentIsDisplayed(folderName);
});
diff --git a/e2e/content-services/notifications_component.e2e.ts b/e2e/content-services/notifications_component.e2e.ts
index f3d559294e..ee992bc4b5 100644
--- a/e2e/content-services/notifications_component.e2e.ts
+++ b/e2e/content-services/notifications_component.e2e.ts
@@ -46,17 +46,14 @@ describe('Notifications Component', () => {
notificationPage.goToNotificationsPage();
- notificationPage.enterDurationField(6000);
+ notificationPage.enterDurationField(3000);
done();
});
- afterEach(async (done) => {
- notificationPage.enterDurationField(1);
- notificationPage.clickNotificationButton();
- browser.sleep(100);
- notificationPage.enterDurationField(6000);
- done();
+ afterEach( () => {
+ browser.executeScript(`document.querySelector('button[data-automation-id="notification-custom-dismiss-button"]').click();`);
+ notificationPage.enterDurationField(3000);
});
it('[C279977] Should show notification when the message is not empty and button is clicked', () => {
diff --git a/e2e/content-services/search/search_filters.e2e.ts b/e2e/content-services/search/search_filters.e2e.ts
index a7061e0e84..fa8b6600eb 100644
--- a/e2e/content-services/search/search_filters.e2e.ts
+++ b/e2e/content-services/search/search_filters.e2e.ts
@@ -89,7 +89,7 @@ describe('Search Filters', () => {
});
it('[C277146] Should Show more/less buttons be hidden when inactive', () => {
- browser.get(TestConfig.adf.url + '/search;q=files*');
+ browser.get(TestConfig.adf.url + '/search;q=*');
searchFiltersPage.checkShowLessButtonIsNotDisplayed();
searchFiltersPage.checkSizeShowMoreButtonIsDisplayed();
diff --git a/e2e/content-services/search/search_page_component.e2e.ts b/e2e/content-services/search/search_page_component.e2e.ts
index eeee1418c4..74c0f2b8f9 100644
--- a/e2e/content-services/search/search_page_component.e2e.ts
+++ b/e2e/content-services/search/search_page_component.e2e.ts
@@ -55,7 +55,7 @@ describe('Search component - Search Page', () => {
let searchResultPage = new SearchResultsPage();
let acsUser = new AcsUserModel();
- let emptyFolderModel = new FolderModel({ 'name': Util.generateRandomString() });
+ let emptyFolderModel = new FolderModel({ 'name': 'search' + Util.generateRandomString() });
let firstFileModel;
let newFolderModel = new FolderModel({ 'name': 'newFolder' });
let fileNames = [], adminFileNames = [], nrOfFiles = 15, adminNrOfFiles = 5;
@@ -100,25 +100,18 @@ describe('Search component - Search Page', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
- contentServicesPage.goToDocumentList();
-
done();
});
it('[C260264] Should display message when no results are found', () => {
let notExistentFileName = Util.generateRandomString();
- contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(notExistentFileName);
searchResultPage.checkNoResultMessageIsDisplayed();
});
it('[C260265] Should display file previewer when opening a file from search results', () => {
- contentServicesPage.goToDocumentList();
-
searchDialog
- .checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
.clickOnSearchIcon()
.enterTextAndPressEnter(firstFileModel.name);
@@ -131,11 +124,7 @@ describe('Search component - Search Page', () => {
});
it('[C272810] Should display only files corresponding to search', () => {
- contentServicesPage.goToDocumentList();
-
searchDialog
- .checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
.clickOnSearchIcon()
.enterTextAndPressEnter(search.active.firstFile);
@@ -144,10 +133,7 @@ describe('Search component - Search Page', () => {
});
it('[C260267] Should display content when opening a folder from search results', () => {
- contentServicesPage.goToDocumentList();
-
- searchDialog.checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
+ searchDialog
.clickOnSearchIcon()
.enterTextAndPressEnter(emptyFolderModel.name);
@@ -160,11 +146,7 @@ describe('Search component - Search Page', () => {
});
it('[C260261] Should be able to delete a file from search results', () => {
- contentServicesPage.goToDocumentList();
-
searchDialog
- .checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
.clickOnSearchIcon()
.enterTextAndPressEnter(search.active.firstFile);
@@ -175,15 +157,13 @@ describe('Search component - Search Page', () => {
searchResultPage.checkNoResultMessageIsDisplayed();
searchResultPage.checkContentIsNotDisplayed(search.active.firstFile);
- contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(search.active.firstFile);
searchResultPage.checkNoResultMessageIsDisplayed();
});
it('[C272809] Should be able to delete a folder from search results', () => {
- searchDialog.checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
+ searchDialog
.clickOnSearchIcon()
.enterTextAndPressEnter(emptyFolderModel.name);
@@ -198,100 +178,87 @@ describe('Search component - Search Page', () => {
searchResultPage.checkNoResultMessageIsDisplayed();
});
- it('[C272803] Should be able to sort results by name (Ascending)', () => {
- contentServicesPage.goToDocumentList();
+ describe('Sorting', () => {
- searchDialog
- .checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
- .clickOnSearchIcon()
- .enterTextAndPressEnter(search.active.base);
-
- searchResultPage.checkContentIsDisplayed(search.active.secondFile);
- searchResultPage.sortAndCheckListIsOrderedByName(true).then((result) => {
- expect(result).toEqual(true);
+ afterEach(async (done) => {
+ await browser.refresh();
+ done();
});
+
+ it('[C272803] Should be able to sort results by name (Ascending)', () => {
+ searchDialog
+ .clickOnSearchIcon()
+ .enterTextAndPressEnter(search.active.base);
+
+ searchResultPage.checkContentIsDisplayed(search.active.secondFile);
+ searchResultPage.sortAndCheckListIsOrderedByName(true).then((result) => {
+ expect(result).toEqual(true);
+ });
+ });
+
+ it('[C272804] Should be able to sort results by name (Descending)', () => {
+ searchDialog
+ .clickOnSearchIcon()
+ .enterTextAndPressEnter(search.active.base);
+
+ searchResultPage.checkContentIsDisplayed(search.active.secondFile);
+ searchResultPage.sortAndCheckListIsOrderedByName(false).then((result) => {
+ expect(result).toEqual(true);
+ });
+ });
+
+ it('[C272805] Should be able to sort results by author (Ascending)', () => {
+ searchDialog
+ .clickOnSearchIcon()
+ .enterTextAndPressEnter(search.active.base);
+
+ searchResultPage.checkContentIsDisplayed(search.active.secondFile);
+
+ searchResultPage.sortAndCheckListIsOrderedByAuthor(true).then((result) => {
+ expect(result).toEqual(true);
+ });
+ });
+
+ it('[C272806] Should be able to sort results by author (Descending)', () => {
+ searchDialog
+ .clickOnSearchIcon()
+ .enterTextAndPressEnter(search.active.base);
+
+ searchResultPage.checkContentIsDisplayed(search.active.secondFile);
+ searchResultPage.sortAndCheckListIsOrderedByAuthor(false).then((result) => {
+ expect(result).toEqual(true);
+ });
+ });
+
+ it('[C272807] Should be able to sort results by date (Ascending)', () => {
+ searchDialog
+ .clickOnSearchIcon()
+ .enterTextAndPressEnter(search.active.base);
+
+ searchResultPage.checkContentIsDisplayed(search.active.secondFile);
+ searchResultPage.sortAndCheckListIsOrderedByCreated(true).then((result) => {
+ expect(result).toEqual(true);
+ });
+ });
+
+ it('[C260260] Should be able to sort results by date (Descending)', () => {
+ searchDialog
+ .clickOnSearchIcon()
+ .enterTextAndPressEnter(search.active.base);
+
+ searchResultPage.checkContentIsDisplayed(search.active.secondFile);
+ searchResultPage.sortAndCheckListIsOrderedByCreated(false).then((result) => {
+ expect(result).toEqual(true);
+ });
+ });
+
});
- it('[C272804] Should be able to sort results by name (Descending)', () => {
- contentServicesPage.goToDocumentList();
-
+ it('[C260262] Should not be able to delete a file from search results without rights', () => {
searchDialog
- .checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
.clickOnSearchIcon()
- .enterTextAndPressEnter(search.active.base);
-
- searchResultPage.checkContentIsDisplayed(search.active.secondFile);
- searchResultPage.sortAndCheckListIsOrderedByName(false).then((result) => {
- expect(result).toEqual(true);
- });
- });
-
- it('[C272805] Should be able to sort results by author (Ascending)', () => {
- contentServicesPage.goToDocumentList();
-
- searchDialog
- .checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
- .clickOnSearchIcon()
- .enterTextAndPressEnter(search.active.base);
-
- searchResultPage.checkContentIsDisplayed(search.active.secondFile);
- searchResultPage.sortAndCheckListIsOrderedByAuthor(true).then((result) => {
- expect(result).toEqual(true);
- });
- });
-
- it('[C272806] Should be able to sort results by author (Descending)', () => {
- contentServicesPage.goToDocumentList();
-
- searchDialog
- .checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
- .clickOnSearchIcon()
- .enterTextAndPressEnter(search.active.base);
-
- searchResultPage.checkContentIsDisplayed(search.active.secondFile);
- searchResultPage.sortAndCheckListIsOrderedByAuthor(false).then((result) => {
- expect(result).toEqual(true);
- });
- });
-
- it('[C272807] Should be able to sort results by date (Ascending)', () => {
- contentServicesPage.goToDocumentList();
-
- searchDialog
- .checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
- .clickOnSearchIcon()
- .enterTextAndPressEnter(search.active.base);
-
- searchResultPage.checkContentIsDisplayed(search.active.secondFile);
- searchResultPage.sortAndCheckListIsOrderedByCreated(true).then((result) => {
- expect(result).toEqual(true);
- });
- });
-
- it('[C260260] Should be able to sort results by date (Descending)', () => {
- contentServicesPage.goToDocumentList();
-
- searchDialog
- .checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
- .clickOnSearchIcon()
- .enterTextAndPressEnter(search.active.base);
-
- searchResultPage.checkContentIsDisplayed(search.active.secondFile);
- searchResultPage.sortAndCheckListIsOrderedByCreated(false).then((result) => {
- expect(result).toEqual(true);
- });
- });
-
- it('[C260262] Shouldn\'t be able to delete a file from search results without rights', () => {
- contentServicesPage.goToDocumentList();
- searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(search.no_permission.noPermFile);
+
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFile);
searchResultPage.checkDeleteIsDisabled(search.no_permission.noPermFile);
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFile);
@@ -301,19 +268,16 @@ describe('Search component - Search Page', () => {
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFile);
});
- it('[C272808] Shouldn\'t be able to delete a folder from search results without rights', () => {
- contentServicesPage.goToDocumentList();
- searchDialog.checkSearchBarIsNotVisible();
- searchDialog.checkSearchIconIsVisible();
- searchDialog.clickOnSearchIcon();
- searchDialog.enterTextAndPressEnter(search.no_permission.noPermFolder);
+ it('[C272808] Should not be able to delete a folder from search results without rights', () => {
+ searchDialog
+ .clickOnSearchIcon()
+ .enterTextAndPressEnter(search.no_permission.noPermFolder);
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder);
searchResultPage.checkDeleteIsDisabled(search.no_permission.noPermFolder);
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder);
- searchDialog.checkSearchBarIsNotVisible()
- .checkSearchIconIsVisible()
+ searchDialog
.clickOnSearchIcon()
.enterTextAndPressEnter(search.no_permission.noPermFolder);
@@ -321,10 +285,11 @@ describe('Search component - Search Page', () => {
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder);
});
- it('[C286675] Should display results when searching for \*', () => {
- contentServicesPage.goToDocumentList();
- searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
+ it('[C286675] Should display results when searching for all elements', () => {
+ searchDialog
+ .clickOnSearchIcon()
.enterTextAndPressEnter('*');
+
searchResultPage.checkNoResultMessageIsNotDisplayed();
});
});
diff --git a/e2e/content-services/tag_component.e2e.ts b/e2e/content-services/tag_component.e2e.ts
index 1c6814fb8b..fe3f4781eb 100644
--- a/e2e/content-services/tag_component.e2e.ts
+++ b/e2e/content-services/tag_component.e2e.ts
@@ -95,7 +95,7 @@ describe('Tag component', () => {
afterAll(async (done) => {
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, pdfUploadedFile.entry.id);
-
+ browser.refresh();
done();
});
diff --git a/e2e/content-services/upload/user_permission.e2e.ts b/e2e/content-services/upload/user_permission.e2e.ts
index 8082a98bad..f75ac9cb1c 100644
--- a/e2e/content-services/upload/user_permission.e2e.ts
+++ b/e2e/content-services/upload/user_permission.e2e.ts
@@ -132,7 +132,7 @@ describe('Upload - User permission', () => {
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
- browser.sleep(1000);
+ browser.sleep(3000);
dragAndDrop.dropFile(dragAndDropArea, emptyFile.location);
dragAndDrop.dropFolder(dragAndDropArea, folder.location);
@@ -146,7 +146,7 @@ describe('Upload - User permission', () => {
contentServicesPage.checkContentIsNotDisplayed(folder.name);
});
- it('[C279915] Should not be allowed to upload a file in folder with consumer permissions', () => {
+ fit('[C279915] Should not be allowed to upload a file in folder with consumer permissions', () => {
contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name);
uploadDialog.fileIsUploaded(emptyFile.name);
@@ -155,7 +155,7 @@ describe('Upload - User permission', () => {
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
- browser.sleep(1000);
+ browser.sleep(3000);
contentServicesPage.uploadFile(emptyFile.location);
@@ -175,7 +175,7 @@ describe('Upload - User permission', () => {
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
- browser.sleep(1000);
+ browser.sleep(3000);
uploadToggles.enableFolderUpload();
diff --git a/e2e/core/login/redirection.e2e.ts b/e2e/core/login/redirection.e2e.ts
index 1953d6ed40..93ff8a3c1e 100644
--- a/e2e/core/login/redirection.e2e.ts
+++ b/e2e/core/login/redirection.e2e.ts
@@ -39,6 +39,7 @@ describe('Login component - Redirect', () => {
let navigationBarPage = new NavigationBarPage();
let contentServicesPage = new ContentServicesPage();
let loginPage = new LoginPage();
+ let user = new AcsUserModel();
let adminUserModel = new AcsUserModel({
'id': TestConfig.adf.adminUser,
'password': TestConfig.adf.adminPassword
@@ -53,12 +54,14 @@ describe('Login component - Redirect', () => {
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
+ await this.alfrescoJsApi.core.peopleApi.addPerson(user);
+
done();
});
it('[C213838] Should after login in CS be redirect to Login page when try to access to PS', () => {
settingsPage.setProviderEcm();
- loginPage.login(adminUserModel.id, adminUserModel.password);
+ loginPage.login(user.id, user.password);
navigationBarPage.clickContentServicesButton();
contentServicesPage.checkAcsContainer();
@@ -96,14 +99,14 @@ describe('Login component - Redirect', () => {
contentServicesPage.checkAcsContainer();
});
- it('[C260088] Sould be re-redirect to the request URL after login when try to access to a protect URL ', () => {
+ it('[C260088] Should be re-redirect to the request URL after login when try to access to a protect URL ', () => {
let uploadActions = new UploadActions();
let uploadedFolder;
let folderName = Util.generateRandomString();
- settingsPage.setProviderEcmBpm();
- loginPage.login(adminUserModel.id, adminUserModel.password);
+ settingsPage.setProviderEcm();
+ loginPage.login(user.id, user.password);
browser.controlFlow().execute(async () => {
uploadedFolder = await uploadActions.uploadFolder(this.alfrescoJsApi, folderName, '-my-');
@@ -123,8 +126,8 @@ describe('Login component - Redirect', () => {
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
loginPage.waitForElements();
- loginPage.enterUsername(adminUserModel.id);
- loginPage.enterPassword(adminUserModel.password);
+ loginPage.enterUsername(user.id);
+ loginPage.enterPassword(user.password);
loginPage.clickSignInButton();
browser.driver.sleep(1000);
diff --git a/e2e/pages/adf/contentServicesPage.ts b/e2e/pages/adf/contentServicesPage.ts
index 7c75ca9ed3..a877a1fafd 100644
--- a/e2e/pages/adf/contentServicesPage.ts
+++ b/e2e/pages/adf/contentServicesPage.ts
@@ -23,6 +23,8 @@ import { NavigationBarPage } from './navigationBarPage';
import path = require('path');
+import { element, by, protractor, browser } from 'protractor';
+
export class ContentServicesPage {
contentList = new ContentList();
@@ -258,11 +260,6 @@ export class ContentServicesPage {
return this;
}
- checkElementIsDisplayed(elementName) {
- let dataElement = element(by.css(`div[data-automation-id="${elementName}"]`));
- Util.waitUntilElementIsVisible(dataElement);
- }
-
navigateToFolderViaBreadcrumbs(folder) {
this.contentList.tableIsLoaded();
let breadcrumb = element(by.css('a[data-automation-id="breadcrumb_' + folder + '"]'));
diff --git a/e2e/pages/adf/dataTablePage.js b/e2e/pages/adf/dataTablePage.js
index dffc83c258..d9cff126bc 100644
--- a/e2e/pages/adf/dataTablePage.js
+++ b/e2e/pages/adf/dataTablePage.js
@@ -229,15 +229,6 @@ var DataTablePage = function () {
Util.waitUntilElementIsVisible(nodeId, 10000);
};
- this.navigateToContent = function (content) {
- var row = this.getRowByRowName(content);
- Util.waitUntilElementIsPresent(row);
- row.click();
- this.checkRowIsSelected(content);
- browser.actions().sendKeys(protractor.Key.ENTER).perform();
- return this;
- };
-
this.getRowsName = function (content) {
var row = element(by.css("div[data-automation-id*='" + content + "']"));
Util.waitUntilElementIsPresent(row);
diff --git a/e2e/pages/adf/loginPage.ts b/e2e/pages/adf/loginPage.ts
index 723d81b833..64b9f80bd6 100644
--- a/e2e/pages/adf/loginPage.ts
+++ b/e2e/pages/adf/loginPage.ts
@@ -20,6 +20,7 @@ import { FormControllersPage } from './material/formControllersPage';
import Util = require('../../util/util');
import TestConfig = require('../../test.config');
import { SettingsPage } from './settingsPage';
+import { element, by, protractor, browser } from 'protractor';
export class LoginPage {
@@ -50,11 +51,6 @@ export class LoginPage {
header = element(by.id('adf-header'));
cardBackground = element(by.css('mat-card[class*="adf-login-card"]'));
settingsPage = new SettingsPage();
- loginForm = element(by.css('form[id="adf-login-form"'));
-
- checkLoginFormIsDisplayed() {
- Util.waitUntilElementIsVisible(this.loginForm);
- }
waitForElements() {
let deferred = protractor.promise.defer();
diff --git a/e2e/pages/adf/navigationBarPage.ts b/e2e/pages/adf/navigationBarPage.ts
index 63bc188e02..e5f953e156 100644
--- a/e2e/pages/adf/navigationBarPage.ts
+++ b/e2e/pages/adf/navigationBarPage.ts
@@ -17,6 +17,7 @@
import Util = require('../../util/util');
import TestConfig = require('../../test.config');
+import { element, by } from 'protractor';
export class NavigationBarPage {
diff --git a/e2e/pages/adf/notificationPage.ts b/e2e/pages/adf/notificationPage.ts
index f65d722928..30ae45e493 100644
--- a/e2e/pages/adf/notificationPage.ts
+++ b/e2e/pages/adf/notificationPage.ts
@@ -16,6 +16,7 @@
*/
import Util = require('../../util/util');
+import { element, by, protractor, browser } from 'protractor';
export class NotificationPage {
@@ -27,7 +28,6 @@ export class NotificationPage {
actionToggle = element(by.css('mat-slide-toggle[data-automation-id="notification-action-toggle"]'));
notificationSnackBar = element.all(by.css('simple-snack-bar')).first();
actionOutput = element(by.css('div[data-automation-id="notification-action-output"]'));
- actionButton = element(by.css('simple-snack-bar > div > button'));
customNotificationButton = element(by.css('button[data-automation-id="notification-custom-config-button"]'));
selectionDropDown = element.all(by.css('div[class*="mat-select-content"]')).first();
notificationsPage = element(by.css('a[data-automation-id="Notifications"]'));
@@ -111,7 +111,7 @@ export class NotificationPage {
}
clickActionButton() {
- this.actionButton.click();
+ browser.executeScript(`document.querySelector("simple-snack-bar > div > button").click();`);
}
clearMessage() {
diff --git a/e2e/pages/adf/process_services/appNavigationBarPage.ts b/e2e/pages/adf/process_services/appNavigationBarPage.ts
index 5748ad1894..0a365eaea5 100644
--- a/e2e/pages/adf/process_services/appNavigationBarPage.ts
+++ b/e2e/pages/adf/process_services/appNavigationBarPage.ts
@@ -16,6 +16,7 @@
*/
import Util = require('../../../util/util');
+import { element, by } from 'protractor';
export class AppNavigationBarPage {
diff --git a/e2e/pages/adf/process_services/dialog/appSettingsToggles.ts b/e2e/pages/adf/process_services/dialog/appSettingsToggles.ts
index 282572af87..e0ffeee3da 100644
--- a/e2e/pages/adf/process_services/dialog/appSettingsToggles.ts
+++ b/e2e/pages/adf/process_services/dialog/appSettingsToggles.ts
@@ -16,6 +16,7 @@
*/
import { FormControllersPage } from '../../material/formControllersPage';
+import { element, by } from 'protractor';
export class AppSettingsToggles {
diff --git a/e2e/pages/adf/process_services/processListPage.ts b/e2e/pages/adf/process_services/processListPage.ts
index d874dd8bad..314be31f97 100644
--- a/e2e/pages/adf/process_services/processListPage.ts
+++ b/e2e/pages/adf/process_services/processListPage.ts
@@ -16,24 +16,17 @@
*/
import Util = require('../../../util/util');
-import { NavigationBarPage } from '../navigationBarPage';
+
+import { element, by } from 'protractor';
export class ProcessListPage {
- processListIcon = element(by.css('mat-icon[class="adf-empty-content__icon mat-icon material-icons"]'));
processListTitle = element(by.css('p[class="adf-empty-content__title"]'));
- processListSubtitle = element(by.css('p[class="adf-empty-content__subtitle"]'));
processDetailsMessage = element(by.css('adf-process-instance-details div[class="ng-star-inserted"]'));
openProcessDropdownElement = element(by.id('adf-select-process-dropdown'));
selectProcessDropdownElement = element.all(by.css('span[class="mat-option-text"]'));
startProcessButton = element(by.css('button[data-automation-id="btn-start"]'));
- goToProcessList() {
- let navigationBarPage = new NavigationBarPage();
- navigationBarPage.clickProcessServicesButton();
- Util.waitUntilElementIsVisible(pageLoaded);
- }
-
checkProcessListTitleIsDisplayed() {
Util.waitUntilElementIsVisible(this.processListTitle);
return this.processListTitle.getText();
@@ -59,13 +52,4 @@ export class ProcessListPage {
return this.startProcessButton.click();
}
- checkProcessListIcon() {
- Util.waitUntilElementIsVisible(this.processListIcon);
- return this.processListIcon.getText();
- }
-
- checkProcessListSubtitle() {
- Util.waitUntilElementIsVisible(this.processListSubtitle);
- return this.processListSubtitle.getText();
- }
}
diff --git a/e2e/pages/adf/process_services/processServicesPage.ts b/e2e/pages/adf/process_services/processServicesPage.ts
index 5a2fce843a..ed0bbe0678 100644
--- a/e2e/pages/adf/process_services/processServicesPage.ts
+++ b/e2e/pages/adf/process_services/processServicesPage.ts
@@ -18,6 +18,8 @@
import Util = require('../../../util/util');
import { AppNavigationBarPage } from './appNavigationBarPage';
+import { element, by } from 'protractor';
+
export class ProcessServicesPage {
apsAppsContainer = element(by.css('div[class="adf-app-listgrid ng-star-inserted"]'));
diff --git a/e2e/pages/adf/process_services/tasksPage.ts b/e2e/pages/adf/process_services/tasksPage.ts
index f6a2f8a6ce..0cc4c8aa2c 100644
--- a/e2e/pages/adf/process_services/tasksPage.ts
+++ b/e2e/pages/adf/process_services/tasksPage.ts
@@ -24,6 +24,8 @@ import FiltersPage = require('./filtersPage');
import ChecklistDialog = require('./dialog/createChecklistDialog');
import TasksListPage = require('./tasksListPage');
+import { element, by } from 'protractor';
+
export class TasksPage {
createButton = element(by.css('button[data-automation-id="create-button"'));
diff --git a/e2e/pages/adf/process_services/widgets/attachFile.ts b/e2e/pages/adf/process_services/widgets/attachFile.ts
index fe0eec53ba..e49da3f53f 100644
--- a/e2e/pages/adf/process_services/widgets/attachFile.ts
+++ b/e2e/pages/adf/process_services/widgets/attachFile.ts
@@ -20,6 +20,7 @@ import TestConfig = require('../../../../test.config');
import path = require('path');
import Util = require('../../../../util/util');
import remote = require('selenium-webdriver/remote');
+import { element, by, browser } from 'protractor';
export class AttachFile {
diff --git a/e2e/pages/adf/process_services/widgets/displayText.ts b/e2e/pages/adf/process_services/widgets/displayText.ts
index 51ecf1844a..2a691050a4 100644
--- a/e2e/pages/adf/process_services/widgets/displayText.ts
+++ b/e2e/pages/adf/process_services/widgets/displayText.ts
@@ -16,6 +16,7 @@
*/
import FormFields = require('../formFields');
+import { by } from 'protractor';
export class DisplayText {
diff --git a/e2e/pages/adf/process_services/widgets/displayValue.ts b/e2e/pages/adf/process_services/widgets/displayValue.ts
index a2f0d9ce04..833eff2ac6 100644
--- a/e2e/pages/adf/process_services/widgets/displayValue.ts
+++ b/e2e/pages/adf/process_services/widgets/displayValue.ts
@@ -16,6 +16,7 @@
*/
import FormFields = require('../formFields');
+import { by } from 'protractor';
export class DisplayValue {
diff --git a/e2e/pages/adf/process_services/widgets/header.ts b/e2e/pages/adf/process_services/widgets/header.ts
index 7ce1d1a075..102092a38d 100644
--- a/e2e/pages/adf/process_services/widgets/header.ts
+++ b/e2e/pages/adf/process_services/widgets/header.ts
@@ -16,6 +16,7 @@
*/
import FormFields = require('../formFields');
+import { by } from 'protractor';
export class Header {
diff --git a/e2e/pages/adf/process_services/widgets/hyperlink.ts b/e2e/pages/adf/process_services/widgets/hyperlink.ts
index 342910d22d..f2b73e3f54 100644
--- a/e2e/pages/adf/process_services/widgets/hyperlink.ts
+++ b/e2e/pages/adf/process_services/widgets/hyperlink.ts
@@ -16,6 +16,7 @@
*/
import FormFields = require('../formFields');
+import { by } from 'protractor';
export class Hyperlink {
diff --git a/e2e/pages/adf/process_services/widgets/multilineText.ts b/e2e/pages/adf/process_services/widgets/multilineText.ts
index 35ce96e2a7..1a7a21a9ac 100644
--- a/e2e/pages/adf/process_services/widgets/multilineText.ts
+++ b/e2e/pages/adf/process_services/widgets/multilineText.ts
@@ -16,6 +16,7 @@
*/
import FormFields = require('../formFields');
+import { by } from 'protractor';
export class MultilineText {
diff --git a/e2e/pages/adf/process_services/widgets/radioButtons.ts b/e2e/pages/adf/process_services/widgets/radioButtons.ts
index 5fe50729ec..809a48c134 100644
--- a/e2e/pages/adf/process_services/widgets/radioButtons.ts
+++ b/e2e/pages/adf/process_services/widgets/radioButtons.ts
@@ -17,6 +17,7 @@
import FormFields = require('../formFields');
import Util = require('../../../../util/util');
+import { by } from 'protractor';
export class RadioButtons {
diff --git a/e2e/pages/adf/searchFiltersPage.ts b/e2e/pages/adf/searchFiltersPage.ts
index b39d52516a..a9c8beba5b 100644
--- a/e2e/pages/adf/searchFiltersPage.ts
+++ b/e2e/pages/adf/searchFiltersPage.ts
@@ -16,17 +16,18 @@
*/
import Util = require('../../util/util');
+import { element, by } from 'protractor';
export class SearchFiltersPage {
searchFilters = element(by.css('adf-search-filter'));
- fileTypeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.TYPE"'));
- searchFileTypeFilter = element(by.css('input[data-automation-id="facet-result-filter-SEARCH.FACET_FIELDS.TYPE"'));
- creatorFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.CREATOR"'));
- searchCreatorFilter = element(by.css('input[data-automation-id="facet-result-filter-SEARCH.FACET_FIELDS.CREATOR"'));
- fileSizeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.SIZE"'));
- showMoreButtonForSize = this.fileSizeFilter.element(by.css('button[title="Show more"]'));
- showLessButtonForSize = this.fileSizeFilter.element(by.css('button[title="Show less"]'));
+ fileTypeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.TYPE"]'));
+ searchFileTypeFilter = element(by.css('input[data-automation-id="facet-result-filter-SEARCH.FACET_FIELDS.TYPE"]'));
+ creatorFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.CREATOR"]'));
+ searchCreatorFilter = element(by.css('input[data-automation-id="facet-result-filter-SEARCH.FACET_FIELDS.CREATOR"]'));
+ fileSizeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.SIZE"]'));
+ showMoreButtonForSize = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.SIZE"] button[title="Show more"]'));
+ showLessButtonForSize = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.SIZE"] button[title="Show less"]'));
numberOfCheckboxesforSize = element.all(by.css('mat-checkbox[data-automation-id*="checkbox-SEARCH.FACET_FIELDS.SIZE"]'));
checkSearchFiltersIsDisplayed() {
diff --git a/e2e/pages/adf/searchResultsPage.ts b/e2e/pages/adf/searchResultsPage.ts
index bd1b8660eb..9e6ee06947 100644
--- a/e2e/pages/adf/searchResultsPage.ts
+++ b/e2e/pages/adf/searchResultsPage.ts
@@ -18,6 +18,7 @@
import Util = require('../../util/util');
import ContentList = require('./dialog/contentList');
import DatatablePage = require('./dataTablePage');
+import { element, by, protractor, browser } from 'protractor';
export class SearchResultsPage {
@@ -61,7 +62,7 @@ export class SearchResultsPage {
}
navigateToFolder(content) {
- this.dataTable.navigateToContent(content);
+ this.contentList.doubleClickRow(content);
return this;
}
@@ -86,13 +87,13 @@ export class SearchResultsPage {
this.sortBy(sortOrder, 'Name');
}
- sortBy(sortOrder) {
-
+ sortBy(sortOrder, sortType) {
+ Util.waitUntilElementIsClickable(this.sortingArrow);
this.sortingArrow.click();
- let selectedSortingOption = element(by.xpath('//span [contains(text(), \"Name\")]'));
-
- selectedSortingOption.click();
+ let selectedSortingOption = element(by.xpath(``));
+ Util.waitUntilElementIsClickable(selectedSortingOption);
+ browser.executeScript(`document.evaluate('//span [contains(text(), "${sortType}")]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click();`);
this.sortByOrder(sortOrder);
}
@@ -102,11 +103,11 @@ export class SearchResultsPage {
return element(this.sortArrowLocator).getText().then((result) => {
if (sortOrder === true) {
if (result !== 'arrow_upward') {
- element(this.sortArrowLocator).click();
+ browser.executeScript(`document.querySelector('adf-sorting-picker button mat-icon').click();`);
}
} else {
if (result === 'arrow_upward') {
- element(this.sortArrowLocator).click();
+ browser.executeScript(`document.querySelector('adf-sorting-picker button mat-icon').click();`);
}
}
diff --git a/e2e/pages/adf/settingsPage.ts b/e2e/pages/adf/settingsPage.ts
index 988acb0ce0..9f1d6d1595 100644
--- a/e2e/pages/adf/settingsPage.ts
+++ b/e2e/pages/adf/settingsPage.ts
@@ -17,6 +17,7 @@
import TestConfig = require('../../test.config');
import Util = require('../../util/util');
+import { element, by, browser } from 'protractor';
export class SettingsPage {
diff --git a/e2e/pages/adf/tagPage.ts b/e2e/pages/adf/tagPage.ts
index 9768ef088e..023d9234b5 100644
--- a/e2e/pages/adf/tagPage.ts
+++ b/e2e/pages/adf/tagPage.ts
@@ -18,6 +18,8 @@
import Util = require('../../util/util');
import ContentList = require('./dialog/contentList');
+import { element, by, protractor, browser } from 'protractor';
+
export class TagPage {
addTagButton = element(by.css('button[id="add-tag"]'));
diff --git a/e2e/pages/adf/trashcanPage.ts b/e2e/pages/adf/trashcanPage.ts
index c5ed2139e2..3718fa4fac 100644
--- a/e2e/pages/adf/trashcanPage.ts
+++ b/e2e/pages/adf/trashcanPage.ts
@@ -17,6 +17,8 @@
import Util = require('../../util/util');
+import { element, by } from 'protractor';
+
export class TrashcanPage {
rows = by.css('adf-document-list div[class*="adf-datatable-body"] div[class*="adf-datatable-row"]');
diff --git a/lib/core/clipboard/clipboard.service.ts b/lib/core/clipboard/clipboard.service.ts
index 6ddec1d17c..95df1fbd54 100644
--- a/lib/core/clipboard/clipboard.service.ts
+++ b/lib/core/clipboard/clipboard.service.ts
@@ -30,10 +30,7 @@ export class ClipboardService {
isTargetValid(target: HTMLInputElement | HTMLTextAreaElement) {
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) {
- if (target.hasAttribute('disabled')) {
- return false;
- }
- return true;
+ return !target.hasAttribute('disabled');
}
this.logService.error(`${target} should be input or textarea`);
diff --git a/lib/core/form/components/start-form.component.html b/lib/core/form/components/start-form.component.html
index 5093ea90e7..06eaa96630 100644
--- a/lib/core/form/components/start-form.component.html
+++ b/lib/core/form/components/start-form.component.html
@@ -26,7 +26,7 @@
[class.mdl-button--colored]="!outcome.isSystem"
[class.adf-form-hide-button]="!isOutcomeButtonVisible(outcome, form.readOnly)"
(click)="onOutcomeClicked(outcome)">
- {{ outcome.name | translate | uppercase}}
+ {{ outcome.name | uppercase | translate | uppercase }}
diff --git a/lib/core/services/notification.service.ts b/lib/core/services/notification.service.ts
index 4ac339b0cf..3a0ea41f82 100644
--- a/lib/core/services/notification.service.ts
+++ b/lib/core/services/notification.service.ts
@@ -66,4 +66,11 @@ export class NotificationService {
return this.snackBar.open(translatedMessage, action, config);
}
+
+ /**
+ * dismiss the notification snackbar
+ */
+ dismissSnackMessageAction() {
+ return this.snackBar.dismiss();
+ }
}
diff --git a/lib/process-services/task-list/components/checklist.component.html b/lib/process-services/task-list/components/checklist.component.html
index 3a0b5d6766..38e0d25267 100644
--- a/lib/process-services/task-list/components/checklist.component.html
+++ b/lib/process-services/task-list/components/checklist.component.html
@@ -36,8 +36,8 @@
-
-
+
+
diff --git a/protractor.conf.js b/protractor.conf.js
index 1853dad787..61f5c2002c 100644
--- a/protractor.conf.js
+++ b/protractor.conf.js
@@ -149,7 +149,6 @@ exports.config = {
let saveScreenshot = process.env.SAVE_SCREENSHOT;
if (saveScreenshot) {
- console.log('HOST AFTER' +HOST );
var retryCount = 1;
if (argv.retry) {
retryCount = ++argv.retry;
diff --git a/scripts/test-e2e-lib.sh b/scripts/test-e2e-lib.sh
index aec3b8ffb2..24f26156bb 100755
--- a/scripts/test-e2e-lib.sh
+++ b/scripts/test-e2e-lib.sh
@@ -6,6 +6,7 @@ BROWSER_RUN=false
DEVELOPMENT=false
EXECLINT=true
LITESERVER=false
+EXEC_VERSION_JSAPI=false
show_help() {
echo "Usage: ./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin"
@@ -23,6 +24,7 @@ show_help() {
echo "-save save the error screenshot in the remote env"
echo "-timeout or --timeout override the timeout foe the wait utils"
echo "-sl --skip-lint skip lint"
+ echo "-vjsapi install different version from npm of JS-API defined in the package.json"
echo "-h or --help"
}
@@ -81,6 +83,18 @@ lite_server(){
LITESERVER=true
}
+version_js_api() {
+ JSAPI_VERSION=$1
+
+ if [[ "${JSAPI_VERSION}" == "" ]]
+ then
+ echo "JSAPI version required with -vJSApi"
+ exit 0
+ fi
+
+ EXEC_VERSION_JSAPI=true
+}
+
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
@@ -98,6 +112,7 @@ while [[ $1 == -* ]]; do
-s|--seleniumServer) set_selenium $2; shift 2;;
-host|--host) set_host $2; shift 2;;
-sl|--skip-lint) skip_lint; shift;;
+ -vjsapi) version_js_api $2; shift 2;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
esac
done
@@ -117,6 +132,12 @@ export FOLDER=$FOLDER'/'
export SELENIUM_SERVER=$SELENIUM_SERVER
export NAME_TEST=$NAME_TEST
+
+if $EXEC_VERSION_JSAPI == true; then
+ echo "====== Use the alfresco JS-API '$JSAPI_VERSION'====="
+ npm install alfresco-js-api@${JSAPI_VERSION}
+fi
+
if [[ EXECLINT == "true" ]]; then
npm run lint-e2e || exit 1
fi
diff --git a/scripts/update-version.sh b/scripts/update-version.sh
index e222469475..766c7a8522 100755
--- a/scripts/update-version.sh
+++ b/scripts/update-version.sh
@@ -147,6 +147,12 @@ update_total_build_dependency_js_version(){
sed "${sedi[@]}" "s/\"${PACKAGETOCHANGE}\": \".*\"/\"${PACKAGETOCHANGE}\": \"${1}\"/g" ${DESTDIR}/package.json
sed "${sedi[@]}" "s/\"${PACKAGETOCHANGE}\": \"~.*\"/\"${PACKAGETOCHANGE}\": \"${1}\"/g" ${DESTDIR}/package.json
sed "${sedi[@]}" "s/\"${PACKAGETOCHANGE}\": \"^.*\"/\"${PACKAGETOCHANGE}\": \"${1}\"/g" ${DESTDIR}/package.json
+
+ JSAPINODE="alfresco-js-api-node"
+
+ sed "${sedi[@]}" "s/\"${JSAPINODE}\": \".*\"/\"${JSAPINODE}\": \"${1}\"/g" ${DESTDIR}/package.json
+ sed "${sedi[@]}" "s/\"${JSAPINODE}\": \"~.*\"/\"${JSAPINODE}\": \"${1}\"/g" ${DESTDIR}/package.json
+ sed "${sedi[@]}" "s/\"${JSAPINODE}\": \"^.*\"/\"${JSAPINODE}\": \"${1}\"/g" ${DESTDIR}/package.json
}
update_component_js_version(){