Solved test issues

This commit is contained in:
lotte
2023-02-23 14:39:34 +01:00
parent ab78df2e68
commit d2871ea8a0
3 changed files with 6 additions and 12 deletions

View File

@@ -68,7 +68,7 @@ describe('DsoEditMetadataValueComponent', () => {
});
it('should not show a badge', () => {
expect(fixture.debugElement.query(By.css('ds-type-badge'))).toBeNull();
expect(fixture.debugElement.query(By.css('ds-themed-type-badge'))).toBeNull();
});
describe('when no changes have been made', () => {
@@ -134,7 +134,7 @@ describe('DsoEditMetadataValueComponent', () => {
});
it('should show a badge', () => {
expect(fixture.debugElement.query(By.css('ds-type-badge'))).toBeTruthy();
expect(fixture.debugElement.query(By.css('ds-themed-type-badge'))).toBeTruthy();
});
assertButton(EDIT_BTN, true, true);

View File

@@ -12,7 +12,6 @@ import { getMockLinkService } from '../../../../mocks/link-service.mock';
import { VarDirective } from '../../../../utils/var.directive';
import { TruncatableService } from '../../../../truncatable/truncatable.service';
import { LinkService } from '../../../../../core/cache/builders/link.service';
import { MyDspaceItemStatusType } from '../../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
import { DSONameServiceMock } from '../../../../mocks/dso-name.service.mock';
import { APP_CONFIG } from '../../../../../../config/app-config.interface';
@@ -102,8 +101,4 @@ describe('ClaimedDeclinedTaskSearchResultListElementComponent', () => {
});
});
it('should have properly status', () => {
expect(component.status).toEqual(MyDspaceItemStatusType.DECLINED_TASk);
});
});

View File

@@ -6,8 +6,7 @@ import { ReactiveFormsModule } from '@angular/forms';
import { BrowserModule, By } from '@angular/platform-browser';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { SharedModule } from '../../shared.module';
import { DebugElement } from '@angular/core';
import { DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SubscriptionViewComponent } from './subscription-view.component';
@@ -61,7 +60,6 @@ describe('SubscriptionViewComponent', () => {
ReactiveFormsModule,
BrowserModule,
RouterTestingModule,
SharedModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
@@ -74,7 +72,8 @@ describe('SubscriptionViewComponent', () => {
{ provide: ComponentFixtureAutoDetect, useValue: true },
{ provide: NotificationsService, useValue: NotificationsServiceStub },
{ provide: SubscriptionsDataService, useValue: subscriptionServiceStub },
]
],
schemas: [NO_ERRORS_SCHEMA]
})
.compileComponents();
});
@@ -94,7 +93,7 @@ describe('SubscriptionViewComponent', () => {
});
it('should have dso object info', () => {
expect(de.query(By.css('.dso-info > ds-type-badge'))).toBeTruthy();
expect(de.query(By.css('.dso-info > ds-themed-type-badge'))).toBeTruthy();
expect(de.query(By.css('.dso-info > p > a'))).toBeTruthy();
});