remove useless tests

This commit is contained in:
Denys Vuika
2023-02-25 15:53:10 -05:00
parent dd4543e1a3
commit cd131d1420

View File

@@ -72,31 +72,6 @@ describe('HeaderActionsComponent', () => {
const getCreateButton = (): HTMLButtonElement => fixture.debugElement.query(By.css('[data-automation-id="create-button"]')).nativeElement; const getCreateButton = (): HTMLButtonElement => fixture.debugElement.query(By.css('[data-automation-id="create-button"]')).nativeElement;
const getUploadButton = (): HTMLButtonElement => fixture.debugElement.query(By.css('[data-automation-id="upload-button"]')).nativeElement; const getUploadButton = (): HTMLButtonElement => fixture.debugElement.query(By.css('[data-automation-id="upload-button"]')).nativeElement;
it('total number of buttons in header should be 2 if route is personal-files', async () => {
spyOnProperty(router, 'url').and.returnValue('/personal-files');
fixture.detectChanges();
await fixture.whenStable();
const buttons = fixture.debugElement.queryAll(By.css('.mat-flat-button'));
expect(buttons.length).toBe(2);
expect(getCreateButton()).toBeTruthy();
expect(getUploadButton()).toBeTruthy();
});
it('total number of buttons in header should be 1 if route is libraries', async () => {
spyOnProperty(router, 'url').and.returnValue('/libraries');
fixture.detectChanges();
await fixture.whenStable();
const buttons = fixture.debugElement.queryAll(By.css('.mat-flat-button'));
expect(buttons.length).toBe(1);
expect(getCreateButton()).toBeTruthy();
});
it('should render menu items when create menu is opened', async () => { it('should render menu items when create menu is opened', async () => {
spyOnProperty(router, 'url').and.returnValue('/personal-files'); spyOnProperty(router, 'url').and.returnValue('/personal-files');