[no-issue] general fix e2e and unit test (#3903)

* add missing import
remove creation folder in redirect test in main folder
fix update script
update node js-api to last alpha before to install
improve share dialog test

* update gnu

* fix notification and search e2e

* change name compatible with file name

* improve failing test to avoid cdk overlay problems

* [ADF-3561] fix Outcome not translatable

* increase sleep in user permission
checklist missing uppercase
comment possible different value in test due time

* improve document list actions

* improve document list action test

* tag refresh bbefore next test
comment possible value due the time
This commit is contained in:
Eugenio Romano
2018-10-20 18:16:44 +01:00
committed by GitHub
parent 4c9629c2d6
commit 368f949fc4
42 changed files with 225 additions and 232 deletions

View File

@@ -23,7 +23,7 @@ jobs:
script: if ([ "$TRAVIS_BRANCH" = "master" ]); then script: if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/npm-build-all.sh || exit 1;); (./scripts/npm-build-all.sh || exit 1;);
else 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 fi
- stage: Lint - stage: Lint
script: (./scripts/lint.sh) script: (./scripts/lint.sh)

View File

@@ -56,6 +56,8 @@
<button mat-icon-button (click)="sendCustomConfig()" data-automation-id="notification-custom-config-button"> <button mat-icon-button (click)="sendCustomConfig()" data-automation-id="notification-custom-config-button">
<mat-icon>send</mat-icon> <mat-icon>send</mat-icon>
</button> </button>
<button mat-raised-button (click)="dismissSnackBar()" data-automation-id="notification-custom-dismiss-button" color="primary">
</button>
</form> </form>
<div> <div>
<h3>SnackBar Config</h3> <h3>SnackBar Config</h3>

View File

@@ -113,4 +113,8 @@ export class NotificationsComponent implements OnInit {
} }
} }
} }
dismissSnackBar() {
this.notificationService.dismissSnackMessageAction();
}
} }

View File

@@ -25,6 +25,8 @@ Shows a notification message with optional feedback.
- _action:_ `string` - Caption for the response button - _action:_ `string` - Caption for the response button
- _config:_ `number|MatSnackBarConfig` - Time before notification disappears after being shown or MatSnackBarConfig object - _config:_ `number|MatSnackBarConfig` - Time before notification disappears after being shown or MatSnackBarConfig object
- **Returns** [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>` - Information/control object for the SnackBar - **Returns** [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>` - Information/control object for the SnackBar
- **dismissSnackMessageAction()**<br/>
dismiss the notification snackbar
## Details ## Details

View File

@@ -113,7 +113,7 @@ describe('Comment Component', () => {
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)'); expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
expect(commentsPage.getMessage(0)).toEqual(comments.test); expect(commentsPage.getMessage(0)).toEqual(comments.test);
expect(commentsPage.getUserName(0)).toEqual(userFullName); 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.getTotalNumberOfComments()).toEqual('Comments (1)');
expect(commentsPage.getMessage(0)).toEqual(comments.first); expect(commentsPage.getMessage(0)).toEqual(comments.first);
expect(commentsPage.getUserName(0)).toEqual(userFullName); 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', () => { 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.getTotalNumberOfComments()).toEqual('Comments (1)');
expect(commentsPage.getMessage(0)).toEqual(comments.multiline); expect(commentsPage.getMessage(0)).toEqual(comments.multiline);
expect(commentsPage.getUserName(0)).toEqual(userFullName); expect(commentsPage.getUserName(0)).toEqual(userFullName);
expect(commentsPage.getTime(0)).toContain('ago'); expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
commentsPage.addComment(comments.second); commentsPage.addComment(comments.second);
commentsPage.checkUserIconIsDisplayed(0); commentsPage.checkUserIconIsDisplayed(0);
@@ -152,7 +152,7 @@ describe('Comment Component', () => {
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (2)'); expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (2)');
expect(commentsPage.getMessage(0)).toEqual(comments.second); expect(commentsPage.getMessage(0)).toEqual(comments.second);
expect(commentsPage.getUserName(0)).toEqual(userFullName); 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', () => { 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.getTotalNumberOfComments()).toEqual('Comments (1)');
expect(commentsPage.getMessage(0)).toEqual('First name: Last name:'); expect(commentsPage.getMessage(0)).toEqual('First name: Last name:');
expect(commentsPage.getUserName(0)).toEqual(userFullName); expect(commentsPage.getUserName(0)).toEqual(userFullName);
expect(commentsPage.getTime(0)).toContain('ago'); expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
}); });
}); });

View File

@@ -27,7 +27,6 @@ import AcsUserModel = require('../../models/ACS/acsUserModel');
import TestConfig = require('../../test.config'); import TestConfig = require('../../test.config');
import AlfrescoApi = require('alfresco-js-api-node'); import AlfrescoApi = require('alfresco-js-api-node');
import CONSTANTS = require('../../util/constants');
import { browser, protractor } from 'protractor'; import { browser, protractor } from 'protractor';
@@ -41,8 +40,6 @@ describe('Create folder directive', function () {
let contentListPage = new ContentListPage(); let contentListPage = new ContentListPage();
let acsUser = new AcsUserModel(); let acsUser = new AcsUserModel();
let consumerUser = new AcsUserModel();
let site;
beforeAll(async (done) => { beforeAll(async (done) => {
this.alfrescoJsApi = new AlfrescoApi({ this.alfrescoJsApi = new AlfrescoApi({

View File

@@ -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', () => { describe('File Actions', () => {
let pdfUploadedNode; let pdfUploadedNode;
@@ -87,18 +74,27 @@ describe('Document List Component - Actions', () => {
done(); 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', () => { it('[C213257] Should be able to copy a file', () => {
browser.driver.sleep(12000); browser.driver.sleep(15000);
contentListPage.rightClickOnRowNamed(pdfUploadedNode.entry.name); contentListPage.rightClickOnRowNamed(pdfUploadedNode.entry.name);
contentListPage.pressContextMenuActionNamed('Copy'); contentListPage.pressContextMenuActionNamed('Copy');
contentServicesPage.typeIntoNodeSelectorSearchField(folderName); contentServicesPage.typeIntoNodeSelectorSearchField(folderName);
contentServicesPage.clickContentNodeSelectorResult(folderName); contentServicesPage.clickContentNodeSelectorResult(folderName);
contentServicesPage.clickCopyButton(); contentServicesPage.clickCopyButton();
contentServicesPage.checkAcsContainer();
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name); contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
browser.get(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id); contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
contentServicesPage.checkAcsContainer();
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name); contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
}); });
@@ -166,6 +162,16 @@ describe('Document List Component - Actions', () => {
done(); 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', () => { it('[C260123] Should be able to delete a folder using context menu', () => {
contentListPage.deleteContent(folderName); contentListPage.deleteContent(folderName);
contentListPage.checkContentIsNotDisplayed(folderName); contentListPage.checkContentIsNotDisplayed(folderName);
@@ -183,16 +189,14 @@ describe('Document List Component - Actions', () => {
}); });
it('[C260138] Should be able to copy a folder', () => { it('[C260138] Should be able to copy a folder', () => {
browser.driver.sleep(12000); browser.driver.sleep(15000);
contentListPage.copyContent(folderName); contentListPage.copyContent(folderName);
contentServicesPage.typeIntoNodeSelectorSearchField(secondfolderName); contentServicesPage.typeIntoNodeSelectorSearchField(secondfolderName);
contentServicesPage.clickContentNodeSelectorResult(secondfolderName); contentServicesPage.clickContentNodeSelectorResult(secondfolderName);
contentServicesPage.clickCopyButton(); contentServicesPage.clickCopyButton();
contentServicesPage.checkAcsContainer();
contentServicesPage.checkContentIsDisplayed(folderName); contentServicesPage.checkContentIsDisplayed(folderName);
browser.get(TestConfig.adf.url + '/files/' + secondUploadedFolder.entry.id); contentServicesPage.doubleClickRow(secondUploadedFolder.entry.name);
contentServicesPage.checkAcsContainer();
contentServicesPage.checkContentIsDisplayed(folderName); contentServicesPage.checkContentIsDisplayed(folderName);
}); });

View File

@@ -46,17 +46,14 @@ describe('Notifications Component', () => {
notificationPage.goToNotificationsPage(); notificationPage.goToNotificationsPage();
notificationPage.enterDurationField(6000); notificationPage.enterDurationField(3000);
done(); done();
}); });
afterEach(async (done) => { afterEach( () => {
notificationPage.enterDurationField(1); browser.executeScript(`document.querySelector('button[data-automation-id="notification-custom-dismiss-button"]').click();`);
notificationPage.clickNotificationButton(); notificationPage.enterDurationField(3000);
browser.sleep(100);
notificationPage.enterDurationField(6000);
done();
}); });
it('[C279977] Should show notification when the message is not empty and button is clicked', () => { it('[C279977] Should show notification when the message is not empty and button is clicked', () => {

View File

@@ -89,7 +89,7 @@ describe('Search Filters', () => {
}); });
it('[C277146] Should Show more/less buttons be hidden when inactive', () => { 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.checkShowLessButtonIsNotDisplayed();
searchFiltersPage.checkSizeShowMoreButtonIsDisplayed(); searchFiltersPage.checkSizeShowMoreButtonIsDisplayed();

View File

@@ -55,7 +55,7 @@ describe('Search component - Search Page', () => {
let searchResultPage = new SearchResultsPage(); let searchResultPage = new SearchResultsPage();
let acsUser = new AcsUserModel(); let acsUser = new AcsUserModel();
let emptyFolderModel = new FolderModel({ 'name': Util.generateRandomString() }); let emptyFolderModel = new FolderModel({ 'name': 'search' + Util.generateRandomString() });
let firstFileModel; let firstFileModel;
let newFolderModel = new FolderModel({ 'name': 'newFolder' }); let newFolderModel = new FolderModel({ 'name': 'newFolder' });
let fileNames = [], adminFileNames = [], nrOfFiles = 15, adminNrOfFiles = 5; let fileNames = [], adminFileNames = [], nrOfFiles = 15, adminNrOfFiles = 5;
@@ -100,25 +100,18 @@ describe('Search component - Search Page', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList();
done(); done();
}); });
it('[C260264] Should display message when no results are found', () => { it('[C260264] Should display message when no results are found', () => {
let notExistentFileName = Util.generateRandomString(); let notExistentFileName = Util.generateRandomString();
contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon() searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(notExistentFileName); .enterTextAndPressEnter(notExistentFileName);
searchResultPage.checkNoResultMessageIsDisplayed(); searchResultPage.checkNoResultMessageIsDisplayed();
}); });
it('[C260265] Should display file previewer when opening a file from search results', () => { it('[C260265] Should display file previewer when opening a file from search results', () => {
contentServicesPage.goToDocumentList();
searchDialog searchDialog
.checkSearchBarIsNotVisible()
.checkSearchIconIsVisible()
.clickOnSearchIcon() .clickOnSearchIcon()
.enterTextAndPressEnter(firstFileModel.name); .enterTextAndPressEnter(firstFileModel.name);
@@ -131,11 +124,7 @@ describe('Search component - Search Page', () => {
}); });
it('[C272810] Should display only files corresponding to search', () => { it('[C272810] Should display only files corresponding to search', () => {
contentServicesPage.goToDocumentList();
searchDialog searchDialog
.checkSearchBarIsNotVisible()
.checkSearchIconIsVisible()
.clickOnSearchIcon() .clickOnSearchIcon()
.enterTextAndPressEnter(search.active.firstFile); .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', () => { it('[C260267] Should display content when opening a folder from search results', () => {
contentServicesPage.goToDocumentList(); searchDialog
searchDialog.checkSearchBarIsNotVisible()
.checkSearchIconIsVisible()
.clickOnSearchIcon() .clickOnSearchIcon()
.enterTextAndPressEnter(emptyFolderModel.name); .enterTextAndPressEnter(emptyFolderModel.name);
@@ -160,11 +146,7 @@ describe('Search component - Search Page', () => {
}); });
it('[C260261] Should be able to delete a file from search results', () => { it('[C260261] Should be able to delete a file from search results', () => {
contentServicesPage.goToDocumentList();
searchDialog searchDialog
.checkSearchBarIsNotVisible()
.checkSearchIconIsVisible()
.clickOnSearchIcon() .clickOnSearchIcon()
.enterTextAndPressEnter(search.active.firstFile); .enterTextAndPressEnter(search.active.firstFile);
@@ -175,15 +157,13 @@ describe('Search component - Search Page', () => {
searchResultPage.checkNoResultMessageIsDisplayed(); searchResultPage.checkNoResultMessageIsDisplayed();
searchResultPage.checkContentIsNotDisplayed(search.active.firstFile); searchResultPage.checkContentIsNotDisplayed(search.active.firstFile);
contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon() searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(search.active.firstFile); .enterTextAndPressEnter(search.active.firstFile);
searchResultPage.checkNoResultMessageIsDisplayed(); searchResultPage.checkNoResultMessageIsDisplayed();
}); });
it('[C272809] Should be able to delete a folder from search results', () => { it('[C272809] Should be able to delete a folder from search results', () => {
searchDialog.checkSearchBarIsNotVisible() searchDialog
.checkSearchIconIsVisible()
.clickOnSearchIcon() .clickOnSearchIcon()
.enterTextAndPressEnter(emptyFolderModel.name); .enterTextAndPressEnter(emptyFolderModel.name);
@@ -198,100 +178,87 @@ describe('Search component - Search Page', () => {
searchResultPage.checkNoResultMessageIsDisplayed(); searchResultPage.checkNoResultMessageIsDisplayed();
}); });
it('[C272803] Should be able to sort results by name (Ascending)', () => { describe('Sorting', () => {
contentServicesPage.goToDocumentList();
searchDialog afterEach(async (done) => {
.checkSearchBarIsNotVisible() await browser.refresh();
.checkSearchIconIsVisible() done();
.clickOnSearchIcon()
.enterTextAndPressEnter(search.active.base);
searchResultPage.checkContentIsDisplayed(search.active.secondFile);
searchResultPage.sortAndCheckListIsOrderedByName(true).then((result) => {
expect(result).toEqual(true);
}); });
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)', () => { it('[C260262] Should not be able to delete a file from search results without rights', () => {
contentServicesPage.goToDocumentList();
searchDialog searchDialog
.checkSearchBarIsNotVisible()
.checkSearchIconIsVisible()
.clickOnSearchIcon() .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); .enterTextAndPressEnter(search.no_permission.noPermFile);
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFile); searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFile);
searchResultPage.checkDeleteIsDisabled(search.no_permission.noPermFile); searchResultPage.checkDeleteIsDisabled(search.no_permission.noPermFile);
searchResultPage.checkContentIsDisplayed(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); searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFile);
}); });
it('[C272808] Shouldn\'t be able to delete a folder from search results without rights', () => { it('[C272808] Should not be able to delete a folder from search results without rights', () => {
contentServicesPage.goToDocumentList(); searchDialog
searchDialog.checkSearchBarIsNotVisible(); .clickOnSearchIcon()
searchDialog.checkSearchIconIsVisible(); .enterTextAndPressEnter(search.no_permission.noPermFolder);
searchDialog.clickOnSearchIcon();
searchDialog.enterTextAndPressEnter(search.no_permission.noPermFolder);
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder); searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder);
searchResultPage.checkDeleteIsDisabled(search.no_permission.noPermFolder); searchResultPage.checkDeleteIsDisabled(search.no_permission.noPermFolder);
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder); searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder);
searchDialog.checkSearchBarIsNotVisible() searchDialog
.checkSearchIconIsVisible()
.clickOnSearchIcon() .clickOnSearchIcon()
.enterTextAndPressEnter(search.no_permission.noPermFolder); .enterTextAndPressEnter(search.no_permission.noPermFolder);
@@ -321,10 +285,11 @@ describe('Search component - Search Page', () => {
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder); searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFolder);
}); });
it('[C286675] Should display results when searching for \*', () => { it('[C286675] Should display results when searching for all elements', () => {
contentServicesPage.goToDocumentList(); searchDialog
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon() .clickOnSearchIcon()
.enterTextAndPressEnter('*'); .enterTextAndPressEnter('*');
searchResultPage.checkNoResultMessageIsNotDisplayed(); searchResultPage.checkNoResultMessageIsNotDisplayed();
}); });
}); });

View File

@@ -95,7 +95,7 @@ describe('Tag component', () => {
afterAll(async (done) => { afterAll(async (done) => {
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, pdfUploadedFile.entry.id); await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, pdfUploadedFile.entry.id);
browser.refresh();
done(); done();
}); });

View File

@@ -132,7 +132,7 @@ describe('Upload - User permission', () => {
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid); navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
browser.sleep(1000); browser.sleep(3000);
dragAndDrop.dropFile(dragAndDropArea, emptyFile.location); dragAndDrop.dropFile(dragAndDropArea, emptyFile.location);
dragAndDrop.dropFolder(dragAndDropArea, folder.location); dragAndDrop.dropFolder(dragAndDropArea, folder.location);
@@ -146,7 +146,7 @@ describe('Upload - User permission', () => {
contentServicesPage.checkContentIsNotDisplayed(folder.name); 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); contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name);
uploadDialog.fileIsUploaded(emptyFile.name); uploadDialog.fileIsUploaded(emptyFile.name);
@@ -155,7 +155,7 @@ describe('Upload - User permission', () => {
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid); navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
browser.sleep(1000); browser.sleep(3000);
contentServicesPage.uploadFile(emptyFile.location); contentServicesPage.uploadFile(emptyFile.location);
@@ -175,7 +175,7 @@ describe('Upload - User permission', () => {
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid); navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
browser.sleep(1000); browser.sleep(3000);
uploadToggles.enableFolderUpload(); uploadToggles.enableFolderUpload();

View File

@@ -39,6 +39,7 @@ describe('Login component - Redirect', () => {
let navigationBarPage = new NavigationBarPage(); let navigationBarPage = new NavigationBarPage();
let contentServicesPage = new ContentServicesPage(); let contentServicesPage = new ContentServicesPage();
let loginPage = new LoginPage(); let loginPage = new LoginPage();
let user = new AcsUserModel();
let adminUserModel = new AcsUserModel({ let adminUserModel = new AcsUserModel({
'id': TestConfig.adf.adminUser, 'id': TestConfig.adf.adminUser,
'password': TestConfig.adf.adminPassword '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.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(user);
done(); done();
}); });
it('[C213838] Should after login in CS be redirect to Login page when try to access to PS', () => { it('[C213838] Should after login in CS be redirect to Login page when try to access to PS', () => {
settingsPage.setProviderEcm(); settingsPage.setProviderEcm();
loginPage.login(adminUserModel.id, adminUserModel.password); loginPage.login(user.id, user.password);
navigationBarPage.clickContentServicesButton(); navigationBarPage.clickContentServicesButton();
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
@@ -96,14 +99,14 @@ describe('Login component - Redirect', () => {
contentServicesPage.checkAcsContainer(); 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 uploadActions = new UploadActions();
let uploadedFolder; let uploadedFolder;
let folderName = Util.generateRandomString(); let folderName = Util.generateRandomString();
settingsPage.setProviderEcmBpm(); settingsPage.setProviderEcm();
loginPage.login(adminUserModel.id, adminUserModel.password); loginPage.login(user.id, user.password);
browser.controlFlow().execute(async () => { browser.controlFlow().execute(async () => {
uploadedFolder = await uploadActions.uploadFolder(this.alfrescoJsApi, folderName, '-my-'); uploadedFolder = await uploadActions.uploadFolder(this.alfrescoJsApi, folderName, '-my-');
@@ -123,8 +126,8 @@ describe('Login component - Redirect', () => {
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id); navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
loginPage.waitForElements(); loginPage.waitForElements();
loginPage.enterUsername(adminUserModel.id); loginPage.enterUsername(user.id);
loginPage.enterPassword(adminUserModel.password); loginPage.enterPassword(user.password);
loginPage.clickSignInButton(); loginPage.clickSignInButton();
browser.driver.sleep(1000); browser.driver.sleep(1000);

View File

@@ -23,6 +23,8 @@ import { NavigationBarPage } from './navigationBarPage';
import path = require('path'); import path = require('path');
import { element, by, protractor, browser } from 'protractor';
export class ContentServicesPage { export class ContentServicesPage {
contentList = new ContentList(); contentList = new ContentList();
@@ -258,11 +260,6 @@ export class ContentServicesPage {
return this; return this;
} }
checkElementIsDisplayed(elementName) {
let dataElement = element(by.css(`div[data-automation-id="${elementName}"]`));
Util.waitUntilElementIsVisible(dataElement);
}
navigateToFolderViaBreadcrumbs(folder) { navigateToFolderViaBreadcrumbs(folder) {
this.contentList.tableIsLoaded(); this.contentList.tableIsLoaded();
let breadcrumb = element(by.css('a[data-automation-id="breadcrumb_' + folder + '"]')); let breadcrumb = element(by.css('a[data-automation-id="breadcrumb_' + folder + '"]'));

View File

@@ -229,15 +229,6 @@ var DataTablePage = function () {
Util.waitUntilElementIsVisible(nodeId, 10000); 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) { this.getRowsName = function (content) {
var row = element(by.css("div[data-automation-id*='" + content + "']")); var row = element(by.css("div[data-automation-id*='" + content + "']"));
Util.waitUntilElementIsPresent(row); Util.waitUntilElementIsPresent(row);

View File

@@ -20,6 +20,7 @@ import { FormControllersPage } from './material/formControllersPage';
import Util = require('../../util/util'); import Util = require('../../util/util');
import TestConfig = require('../../test.config'); import TestConfig = require('../../test.config');
import { SettingsPage } from './settingsPage'; import { SettingsPage } from './settingsPage';
import { element, by, protractor, browser } from 'protractor';
export class LoginPage { export class LoginPage {
@@ -50,11 +51,6 @@ export class LoginPage {
header = element(by.id('adf-header')); header = element(by.id('adf-header'));
cardBackground = element(by.css('mat-card[class*="adf-login-card"]')); cardBackground = element(by.css('mat-card[class*="adf-login-card"]'));
settingsPage = new SettingsPage(); settingsPage = new SettingsPage();
loginForm = element(by.css('form[id="adf-login-form"'));
checkLoginFormIsDisplayed() {
Util.waitUntilElementIsVisible(this.loginForm);
}
waitForElements() { waitForElements() {
let deferred = protractor.promise.defer(); let deferred = protractor.promise.defer();

View File

@@ -17,6 +17,7 @@
import Util = require('../../util/util'); import Util = require('../../util/util');
import TestConfig = require('../../test.config'); import TestConfig = require('../../test.config');
import { element, by } from 'protractor';
export class NavigationBarPage { export class NavigationBarPage {

View File

@@ -16,6 +16,7 @@
*/ */
import Util = require('../../util/util'); import Util = require('../../util/util');
import { element, by, protractor, browser } from 'protractor';
export class NotificationPage { export class NotificationPage {
@@ -27,7 +28,6 @@ export class NotificationPage {
actionToggle = element(by.css('mat-slide-toggle[data-automation-id="notification-action-toggle"]')); actionToggle = element(by.css('mat-slide-toggle[data-automation-id="notification-action-toggle"]'));
notificationSnackBar = element.all(by.css('simple-snack-bar')).first(); notificationSnackBar = element.all(by.css('simple-snack-bar')).first();
actionOutput = element(by.css('div[data-automation-id="notification-action-output"]')); 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"]')); customNotificationButton = element(by.css('button[data-automation-id="notification-custom-config-button"]'));
selectionDropDown = element.all(by.css('div[class*="mat-select-content"]')).first(); selectionDropDown = element.all(by.css('div[class*="mat-select-content"]')).first();
notificationsPage = element(by.css('a[data-automation-id="Notifications"]')); notificationsPage = element(by.css('a[data-automation-id="Notifications"]'));
@@ -111,7 +111,7 @@ export class NotificationPage {
} }
clickActionButton() { clickActionButton() {
this.actionButton.click(); browser.executeScript(`document.querySelector("simple-snack-bar > div > button").click();`);
} }
clearMessage() { clearMessage() {

View File

@@ -16,6 +16,7 @@
*/ */
import Util = require('../../../util/util'); import Util = require('../../../util/util');
import { element, by } from 'protractor';
export class AppNavigationBarPage { export class AppNavigationBarPage {

View File

@@ -16,6 +16,7 @@
*/ */
import { FormControllersPage } from '../../material/formControllersPage'; import { FormControllersPage } from '../../material/formControllersPage';
import { element, by } from 'protractor';
export class AppSettingsToggles { export class AppSettingsToggles {

View File

@@ -16,24 +16,17 @@
*/ */
import Util = require('../../../util/util'); import Util = require('../../../util/util');
import { NavigationBarPage } from '../navigationBarPage';
import { element, by } from 'protractor';
export class ProcessListPage { 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"]')); 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"]')); processDetailsMessage = element(by.css('adf-process-instance-details div[class="ng-star-inserted"]'));
openProcessDropdownElement = element(by.id('adf-select-process-dropdown')); openProcessDropdownElement = element(by.id('adf-select-process-dropdown'));
selectProcessDropdownElement = element.all(by.css('span[class="mat-option-text"]')); selectProcessDropdownElement = element.all(by.css('span[class="mat-option-text"]'));
startProcessButton = element(by.css('button[data-automation-id="btn-start"]')); startProcessButton = element(by.css('button[data-automation-id="btn-start"]'));
goToProcessList() {
let navigationBarPage = new NavigationBarPage();
navigationBarPage.clickProcessServicesButton();
Util.waitUntilElementIsVisible(pageLoaded);
}
checkProcessListTitleIsDisplayed() { checkProcessListTitleIsDisplayed() {
Util.waitUntilElementIsVisible(this.processListTitle); Util.waitUntilElementIsVisible(this.processListTitle);
return this.processListTitle.getText(); return this.processListTitle.getText();
@@ -59,13 +52,4 @@ export class ProcessListPage {
return this.startProcessButton.click(); return this.startProcessButton.click();
} }
checkProcessListIcon() {
Util.waitUntilElementIsVisible(this.processListIcon);
return this.processListIcon.getText();
}
checkProcessListSubtitle() {
Util.waitUntilElementIsVisible(this.processListSubtitle);
return this.processListSubtitle.getText();
}
} }

View File

@@ -18,6 +18,8 @@
import Util = require('../../../util/util'); import Util = require('../../../util/util');
import { AppNavigationBarPage } from './appNavigationBarPage'; import { AppNavigationBarPage } from './appNavigationBarPage';
import { element, by } from 'protractor';
export class ProcessServicesPage { export class ProcessServicesPage {
apsAppsContainer = element(by.css('div[class="adf-app-listgrid ng-star-inserted"]')); apsAppsContainer = element(by.css('div[class="adf-app-listgrid ng-star-inserted"]'));

View File

@@ -24,6 +24,8 @@ import FiltersPage = require('./filtersPage');
import ChecklistDialog = require('./dialog/createChecklistDialog'); import ChecklistDialog = require('./dialog/createChecklistDialog');
import TasksListPage = require('./tasksListPage'); import TasksListPage = require('./tasksListPage');
import { element, by } from 'protractor';
export class TasksPage { export class TasksPage {
createButton = element(by.css('button[data-automation-id="create-button"')); createButton = element(by.css('button[data-automation-id="create-button"'));

View File

@@ -20,6 +20,7 @@ import TestConfig = require('../../../../test.config');
import path = require('path'); import path = require('path');
import Util = require('../../../../util/util'); import Util = require('../../../../util/util');
import remote = require('selenium-webdriver/remote'); import remote = require('selenium-webdriver/remote');
import { element, by, browser } from 'protractor';
export class AttachFile { export class AttachFile {

View File

@@ -16,6 +16,7 @@
*/ */
import FormFields = require('../formFields'); import FormFields = require('../formFields');
import { by } from 'protractor';
export class DisplayText { export class DisplayText {

View File

@@ -16,6 +16,7 @@
*/ */
import FormFields = require('../formFields'); import FormFields = require('../formFields');
import { by } from 'protractor';
export class DisplayValue { export class DisplayValue {

View File

@@ -16,6 +16,7 @@
*/ */
import FormFields = require('../formFields'); import FormFields = require('../formFields');
import { by } from 'protractor';
export class Header { export class Header {

View File

@@ -16,6 +16,7 @@
*/ */
import FormFields = require('../formFields'); import FormFields = require('../formFields');
import { by } from 'protractor';
export class Hyperlink { export class Hyperlink {

View File

@@ -16,6 +16,7 @@
*/ */
import FormFields = require('../formFields'); import FormFields = require('../formFields');
import { by } from 'protractor';
export class MultilineText { export class MultilineText {

View File

@@ -17,6 +17,7 @@
import FormFields = require('../formFields'); import FormFields = require('../formFields');
import Util = require('../../../../util/util'); import Util = require('../../../../util/util');
import { by } from 'protractor';
export class RadioButtons { export class RadioButtons {

View File

@@ -16,17 +16,18 @@
*/ */
import Util = require('../../util/util'); import Util = require('../../util/util');
import { element, by } from 'protractor';
export class SearchFiltersPage { export class SearchFiltersPage {
searchFilters = element(by.css('adf-search-filter')); searchFilters = element(by.css('adf-search-filter'));
fileTypeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.TYPE"')); 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"')); 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"')); 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"')); 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"')); 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"]')); showMoreButtonForSize = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.SIZE"] button[title="Show more"]'));
showLessButtonForSize = this.fileSizeFilter.element(by.css('button[title="Show less"]')); 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"]')); numberOfCheckboxesforSize = element.all(by.css('mat-checkbox[data-automation-id*="checkbox-SEARCH.FACET_FIELDS.SIZE"]'));
checkSearchFiltersIsDisplayed() { checkSearchFiltersIsDisplayed() {

View File

@@ -18,6 +18,7 @@
import Util = require('../../util/util'); import Util = require('../../util/util');
import ContentList = require('./dialog/contentList'); import ContentList = require('./dialog/contentList');
import DatatablePage = require('./dataTablePage'); import DatatablePage = require('./dataTablePage');
import { element, by, protractor, browser } from 'protractor';
export class SearchResultsPage { export class SearchResultsPage {
@@ -61,7 +62,7 @@ export class SearchResultsPage {
} }
navigateToFolder(content) { navigateToFolder(content) {
this.dataTable.navigateToContent(content); this.contentList.doubleClickRow(content);
return this; return this;
} }
@@ -86,13 +87,13 @@ export class SearchResultsPage {
this.sortBy(sortOrder, 'Name'); this.sortBy(sortOrder, 'Name');
} }
sortBy(sortOrder) { sortBy(sortOrder, sortType) {
Util.waitUntilElementIsClickable(this.sortingArrow);
this.sortingArrow.click(); this.sortingArrow.click();
let selectedSortingOption = element(by.xpath('//span [contains(text(), \"Name\")]')); let selectedSortingOption = element(by.xpath(``));
Util.waitUntilElementIsClickable(selectedSortingOption);
selectedSortingOption.click(); browser.executeScript(`document.evaluate('//span [contains(text(), "${sortType}")]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click();`);
this.sortByOrder(sortOrder); this.sortByOrder(sortOrder);
} }
@@ -102,11 +103,11 @@ export class SearchResultsPage {
return element(this.sortArrowLocator).getText().then((result) => { return element(this.sortArrowLocator).getText().then((result) => {
if (sortOrder === true) { if (sortOrder === true) {
if (result !== 'arrow_upward') { if (result !== 'arrow_upward') {
element(this.sortArrowLocator).click(); browser.executeScript(`document.querySelector('adf-sorting-picker button mat-icon').click();`);
} }
} else { } else {
if (result === 'arrow_upward') { if (result === 'arrow_upward') {
element(this.sortArrowLocator).click(); browser.executeScript(`document.querySelector('adf-sorting-picker button mat-icon').click();`);
} }
} }

View File

@@ -17,6 +17,7 @@
import TestConfig = require('../../test.config'); import TestConfig = require('../../test.config');
import Util = require('../../util/util'); import Util = require('../../util/util');
import { element, by, browser } from 'protractor';
export class SettingsPage { export class SettingsPage {

View File

@@ -18,6 +18,8 @@
import Util = require('../../util/util'); import Util = require('../../util/util');
import ContentList = require('./dialog/contentList'); import ContentList = require('./dialog/contentList');
import { element, by, protractor, browser } from 'protractor';
export class TagPage { export class TagPage {
addTagButton = element(by.css('button[id="add-tag"]')); addTagButton = element(by.css('button[id="add-tag"]'));

View File

@@ -17,6 +17,8 @@
import Util = require('../../util/util'); import Util = require('../../util/util');
import { element, by } from 'protractor';
export class TrashcanPage { export class TrashcanPage {
rows = by.css('adf-document-list div[class*="adf-datatable-body"] div[class*="adf-datatable-row"]'); rows = by.css('adf-document-list div[class*="adf-datatable-body"] div[class*="adf-datatable-row"]');

View File

@@ -30,10 +30,7 @@ export class ClipboardService {
isTargetValid(target: HTMLInputElement | HTMLTextAreaElement) { isTargetValid(target: HTMLInputElement | HTMLTextAreaElement) {
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) { if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) {
if (target.hasAttribute('disabled')) { return !target.hasAttribute('disabled');
return false;
}
return true;
} }
this.logService.error(`${target} should be input or textarea`); this.logService.error(`${target} should be input or textarea`);

View File

@@ -26,7 +26,7 @@
[class.mdl-button--colored]="!outcome.isSystem" [class.mdl-button--colored]="!outcome.isSystem"
[class.adf-form-hide-button]="!isOutcomeButtonVisible(outcome, form.readOnly)" [class.adf-form-hide-button]="!isOutcomeButtonVisible(outcome, form.readOnly)"
(click)="onOutcomeClicked(outcome)"> (click)="onOutcomeClicked(outcome)">
{{ outcome.name | translate | uppercase}} {{ outcome.name | uppercase | translate | uppercase }}
</button> </button>
</mat-card-content> </mat-card-content>
<mat-card-actions *ngIf="showRefreshButton"> <mat-card-actions *ngIf="showRefreshButton">

View File

@@ -66,4 +66,11 @@ export class NotificationService {
return this.snackBar.open(translatedMessage, action, config); return this.snackBar.open(translatedMessage, action, config);
} }
/**
* dismiss the notification snackbar
*/
dismissSnackMessageAction() {
return this.snackBar.dismiss();
}
} }

View File

@@ -36,8 +36,8 @@
</mat-form-field> </mat-form-field>
</mat-dialog-content> </mat-dialog-content>
<mat-dialog-actions class="adf-checklist-dialog-actions"> <mat-dialog-actions class="adf-checklist-dialog-actions">
<button mat-button type="button" id="close-check-dialog" (click)="cancel()">{{ 'ADF_TASK_LIST.DETAILS.CHECKLIST.DIALOG.CANCEL-BUTTON' | translate }}</button> <button mat-button type="button" id="close-check-dialog" (click)="cancel()">{{ 'ADF_TASK_LIST.DETAILS.CHECKLIST.DIALOG.CANCEL-BUTTON' | translate | uppercase }}</button>
<button mat-button type="button" id="add-check" (click)="add()">{{ 'ADF_TASK_LIST.DETAILS.CHECKLIST.DIALOG.ADD-BUTTON' | translate }}</button> <button mat-button type="button" id="add-check" (click)="add()">{{ 'ADF_TASK_LIST.DETAILS.CHECKLIST.DIALOG.ADD-BUTTON' | translate | uppercase }}</button>
</mat-dialog-actions> </mat-dialog-actions>
</div> </div>
</ng-template> </ng-template>

View File

@@ -149,7 +149,6 @@ exports.config = {
let saveScreenshot = process.env.SAVE_SCREENSHOT; let saveScreenshot = process.env.SAVE_SCREENSHOT;
if (saveScreenshot) { if (saveScreenshot) {
console.log('HOST AFTER' +HOST );
var retryCount = 1; var retryCount = 1;
if (argv.retry) { if (argv.retry) {
retryCount = ++argv.retry; retryCount = ++argv.retry;

View File

@@ -6,6 +6,7 @@ BROWSER_RUN=false
DEVELOPMENT=false DEVELOPMENT=false
EXECLINT=true EXECLINT=true
LITESERVER=false LITESERVER=false
EXEC_VERSION_JSAPI=false
show_help() { show_help() {
echo "Usage: ./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin" 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 "-save save the error screenshot in the remote env"
echo "-timeout or --timeout override the timeout foe the wait utils" echo "-timeout or --timeout override the timeout foe the wait utils"
echo "-sl --skip-lint skip lint" 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" echo "-h or --help"
} }
@@ -81,6 +83,18 @@ lite_server(){
LITESERVER=true 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 while [[ $1 == -* ]]; do
case "$1" in case "$1" in
-h|--help|-\?) show_help; exit 0;; -h|--help|-\?) show_help; exit 0;;
@@ -98,6 +112,7 @@ while [[ $1 == -* ]]; do
-s|--seleniumServer) set_selenium $2; shift 2;; -s|--seleniumServer) set_selenium $2; shift 2;;
-host|--host) set_host $2; shift 2;; -host|--host) set_host $2; shift 2;;
-sl|--skip-lint) skip_lint; shift;; -sl|--skip-lint) skip_lint; shift;;
-vjsapi) version_js_api $2; shift 2;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;; -*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
esac esac
done done
@@ -117,6 +132,12 @@ export FOLDER=$FOLDER'/'
export SELENIUM_SERVER=$SELENIUM_SERVER export SELENIUM_SERVER=$SELENIUM_SERVER
export NAME_TEST=$NAME_TEST 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 if [[ EXECLINT == "true" ]]; then
npm run lint-e2e || exit 1 npm run lint-e2e || exit 1
fi fi

View File

@@ -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 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(){ update_component_js_version(){