Skip to content

Commit

Permalink
* Added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
sivakumar414ram committed Nov 23, 2020
1 parent 129b3f2 commit 62bba43
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,25 @@ describe('ContentNodeSelectorComponent', () => {
component.data.showLocalUploadButton = true;
component.hasAllowableOperations = false;
component.showingSearch = false;
component.isLoading = false;

fixture.detectChanges();
const warnningMessage = fixture.debugElement.query(By.css('.adf-content-node-upload-button-warning-message span'));

expect(warnningMessage).not.toBeNull();
expect(warnningMessage.nativeElement.innerText).toEqual('NODE_SELECTOR.UPLOAD_BUTTON_PERMISSION_WARNING_MESSAGE');
});

it('should not be able to show warning message while loading documents', () => {
component.data.showLocalUploadButton = true;
component.hasAllowableOperations = false;
component.showingSearch = false;
component.isLoading = true;

fixture.detectChanges();
const warnningMessage = fixture.debugElement.query(By.css('.adf-content-node-upload-button-warning-message span'));

expect(warnningMessage).toBeNull();
});
});
});

0 comments on commit 62bba43

Please sign in to comment.