mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[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:
parent
70cf1da78e
commit
4bfae518fb
@ -204,7 +204,7 @@ describe('Document List Component', () => {
|
||||
timeAgoUploadedNode = await uploadActions.uploadFile(this.alfrescoJsApi, timeAgoFileModel.location, timeAgoFileModel.name, '-my-');
|
||||
contentServicesPage.goToDocumentList();
|
||||
const dateValue = contentServicesPage.getColumnValueForRow(timeAgoFileModel.name, 'Created');
|
||||
expect(dateValue).toContain('ago');
|
||||
expect(dateValue).toMatch(/(ago|few)/);
|
||||
done();
|
||||
});
|
||||
|
||||
@ -608,25 +608,25 @@ describe('Document List Component', () => {
|
||||
expect(contentServicesPage.getAttributeValueForElement(folderName, cardProperties.DISPLAY_NAME)).toBe(folderName);
|
||||
expect(contentServicesPage.getAttributeValueForElement(folderName, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(folderName, cardProperties.CREATED)).toContain('ago');
|
||||
expect(contentServicesPage.getAttributeValueForElement(folderName, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.DISPLAY_NAME)).toBe(pdfFile.name);
|
||||
expect(contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.SIZE)).toBe(`702.76 KB`);
|
||||
expect(contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.CREATED)).toContain('ago');
|
||||
expect(contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.DISPLAY_NAME)).toBe(docxFile.name);
|
||||
expect(contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.SIZE)).toBe(`81.05 KB`);
|
||||
expect(contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.CREATED)).toContain('ago');
|
||||
expect(contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.DISPLAY_NAME)).toBe(testFile.name);
|
||||
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.SIZE)).toBe(`14 Bytes`);
|
||||
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED)).toContain('ago');
|
||||
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
});
|
||||
|
||||
it('[C280129] Should keep Gallery View when accessing a folder', () => {
|
||||
|
@ -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)/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -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)/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user