[ADF-4216] Recently uploaded files are missing 'ago' in the Created column (#4578)

* replaced the assertion for 'ago' to 'ago | few'

* replaced the assertion for 'ago' to 'ago | few'
This commit is contained in:
gmandakini
2019-04-10 01:11:35 +01:00
committed by Eugenio Romano
parent 70cf1da78e
commit 4bfae518fb
3 changed files with 12 additions and 12 deletions

View File

@@ -96,7 +96,7 @@ describe('Comment component for Processes', () => {
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (' + addedComment.total + ')');
expect(commentsPage.getMessage(0)).toEqual(addedComment.data[0].message);
expect(commentsPage.getUserName(0)).toEqual(addedComment.data[0].createdBy.firstName + ' ' + addedComment.data[0].createdBy.lastName);
expect(commentsPage.getTime(0)).toContain('ago');
expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
});
});
@@ -146,7 +146,7 @@ describe('Comment component for Processes', () => {
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (' + addedTaskComment.total + ')');
expect(commentsPage.getMessage(0)).toEqual(addedTaskComment.data[0].message);
expect(commentsPage.getUserName(0)).toEqual(addedTaskComment.data[0].createdBy.firstName + ' ' + addedTaskComment.data[0].createdBy.lastName);
expect(commentsPage.getTime(0)).toContain('ago');
expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
});
});
});

View File

@@ -138,8 +138,8 @@ describe('Comment component for Processes', () => {
await expect(commentsPage.getUserName(0)).toEqual(totalComments.data[0].createdBy.firstName + ' ' + totalComments.data[0].createdBy.lastName);
await expect(commentsPage.getUserName(1)).toEqual(totalComments.data[1].createdBy.firstName + ' ' + totalComments.data[1].createdBy.lastName);
await expect(commentsPage.getTime(0)).toContain('ago');
await expect(commentsPage.getTime(1)).toContain('ago');
await expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
await expect(commentsPage.getTime(1)).toMatch(/(ago|few)/);
await loginPage.loginToProcessServicesUsingUserModel(secondUser);
@@ -169,9 +169,9 @@ describe('Comment component for Processes', () => {
await expect(commentsPage.getUserName(1)).toEqual(totalComments.data[1].createdBy.firstName + ' ' + totalComments.data[1].createdBy.lastName);
await expect(commentsPage.getUserName(2)).toEqual(totalComments.data[2].createdBy.firstName + ' ' + totalComments.data[2].createdBy.lastName);
await expect(commentsPage.getTime(0)).toContain('ago');
await expect(commentsPage.getTime(1)).toContain('ago');
await expect(commentsPage.getTime(2)).toContain('ago');
await expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
await expect(commentsPage.getTime(1)).toMatch(/(ago|few)/);
await expect(commentsPage.getTime(2)).toMatch(/(ago|few)/);
});
});
});