mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[no-issue] fix share dialog test for scenario of last day of the month (#3937)
* fix share dialog test for scenario of last day of the month * fix today and tomorrow * remove fit * fix spec share file * use moment to calculate tomorrow
This commit is contained in:
@@ -118,7 +118,7 @@ describe('ShareDialogComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it(`should copy shared link and notify on button event`, async(() => {
|
||||
it(`should copy shared link and notify on button event`, (done) => {
|
||||
node.entry.properties['qshare:sharedId'] = 'sharedId';
|
||||
spyOn(document, 'execCommand').and.callThrough();
|
||||
|
||||
@@ -139,8 +139,9 @@ describe('ShareDialogComponent', () => {
|
||||
|
||||
expect(document.execCommand).toHaveBeenCalledWith('copy');
|
||||
expect(notificationServiceMock.openSnackMessage).toHaveBeenCalledWith('SHARE.CLIPBOARD-MESSAGE');
|
||||
done();
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||
it('should open a confirmation dialog when unshare button is triggered', () => {
|
||||
spyOn(matDialog, 'open').and.returnValue({ beforeClose: () => of(false) });
|
||||
|
Reference in New Issue
Block a user