[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:
Eugenio Romano
2018-11-02 14:01:50 +00:00
committed by GitHub
parent c10f2dc276
commit ee068db496
2 changed files with 10 additions and 8 deletions

View File

@@ -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) });