[TLC-380] further browse link unit test fixes (waitForAsync)

This commit is contained in:
Kim Shepherd
2022-11-23 15:12:17 +13:00
parent bc73032e45
commit b80545642f

View File

@@ -139,21 +139,23 @@ describe('ItemPageFieldComponent', () => {
beforeEach(() => {
fixture.detectChanges();
});
waitForAsync(() => {
it('should have a browse link', () => {
expect(fixture.debugElement.query(By.css('a.ds-browse-link')).nativeElement.innerHTML).toContain(mockValue);
});
});
});
describe('test rendering of configured regex-based links', () => {
beforeEach(() => {
comp.urlRegex = '^test';
fixture.detectChanges();
});
beforeEach(waitForAsync(() => {
waitForAsync(() => {
it('should have a rendered (non-browse) link since the value matches ^test', () => {
expect(fixture.debugElement.query(By.css('a.ds-simple-metadata-link')).nativeElement.innerHTML).toContain(mockValue);
});
}));
});
});
describe('test skipping of configured links that do NOT match regex', () => {