Fixed false positive tests caused by fixture.debugElement.query().toBeDefined()

This commit is contained in:
Alexandre Vryghem
2023-01-19 00:07:57 +01:00
parent ca864379c8
commit 718db3466d
26 changed files with 168 additions and 146 deletions

View File

@@ -123,19 +123,19 @@ describe('WorkspaceitemActionsComponent', () => {
it('should display edit button', () => {
const btn = fixture.debugElement.query(By.css('.btn-primary'));
expect(btn).toBeDefined();
expect(btn).not.toBeNull();
});
it('should display delete button', () => {
const btn = fixture.debugElement.query(By.css('.btn-danger'));
expect(btn).toBeDefined();
expect(btn).not.toBeNull();
});
it('should display view button', () => {
const btn = fixture.debugElement.query(By.css('button [data-test="view-btn"]'));
const btn = fixture.debugElement.query(By.css('button[data-test="view-btn"]'));
expect(btn).toBeDefined();
expect(btn).not.toBeNull();
});
describe('on discard confirmation', () => {