[ADF-3378] Create automated tests for comments - Content Services PT2 (#3708)

* [ADF-3378] Create automated tests for comments - Content Services PT2

* Removing unnecessary import
This commit is contained in:
jdosti
2018-09-10 10:55:39 +01:00
committed by Eugenio Romano
parent 649e6c6d22
commit 1ec9f2e9c2
2 changed files with 33 additions and 1 deletions

View File

@@ -53,7 +53,8 @@ describe('Comment Component', () => {
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit">
</form>`
</form>`,
test: 'Test'
};
beforeAll(async (done) => {
@@ -96,6 +97,26 @@ describe('Comment Component', () => {
done();
});
it('[C276947] Should be able to add a comment on ACS and view on ADF', () => {
browser.controlFlow().execute(async() => {
await this.alfrescoJsApi.core.commentsApi.addComment(nodeId, {content: comments.test});
});
viewerPage.viewFile(pngFileModel.name);
viewerPage.clickInfoButton();
viewerPage.checkInfoSideBarIsDisplayed();
commentsPage.checkCommentsTabIsSelected();
commentsPage.checkCommentInputIsDisplayed();
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');
});
it('[C276948] Should be able to add a comment on a file', () => {
viewerPage.viewFile(pngFileModel.name);
viewerPage.clickInfoButton();