fix: update BootSoPartition and RemoveCacheImage component tests with new dependencies and mock data
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
parent
c7ed41a1a5
commit
a26f2481fa
|
@ -1,7 +1,5 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { BootSoPartitionComponent } from './boot-so-partition.component';
|
||||
import {ExecuteCommandComponent} from "../execute-command.component";
|
||||
import { FormBuilder, FormsModule, ReactiveFormsModule } from "@angular/forms";
|
||||
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from "@angular/material/dialog";
|
||||
import { MatFormFieldModule } from "@angular/material/form-field";
|
||||
|
@ -19,6 +17,8 @@ import {DataService} from "../../data.service";
|
|||
import { provideHttpClient } from "@angular/common/http";
|
||||
import { provideHttpClientTesting } from "@angular/common/http/testing";
|
||||
import { ConfigService } from "@services/config.service";
|
||||
import { MatExpansionModule } from '@angular/material/expansion';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
|
||||
describe('BootSoPartitionComponent', () => {
|
||||
let component: BootSoPartitionComponent;
|
||||
|
@ -40,9 +40,11 @@ describe('BootSoPartitionComponent', () => {
|
|||
MatInputModule,
|
||||
MatCheckboxModule,
|
||||
MatButtonModule,
|
||||
MatExpansionModule,
|
||||
MatMenuModule,
|
||||
BrowserAnimationsModule,
|
||||
MatTableModule,
|
||||
MatDividerModule,
|
||||
MatSelectModule,
|
||||
MatIconModule,
|
||||
ToastrModule.forRoot(),
|
||||
|
@ -60,7 +62,9 @@ describe('BootSoPartitionComponent', () => {
|
|||
},
|
||||
{
|
||||
provide: MAT_DIALOG_DATA,
|
||||
useValue: {}
|
||||
useValue: {
|
||||
clients: []
|
||||
}
|
||||
},
|
||||
{ provide: ConfigService, useValue: mockConfigService }
|
||||
]
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RemoveCacheImageComponent } from './remove-cache-image.component';
|
||||
import {BootSoPartitionComponent} from "../boot-so-partition/boot-so-partition.component";
|
||||
import { FormBuilder, FormsModule, ReactiveFormsModule } from "@angular/forms";
|
||||
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from "@angular/material/dialog";
|
||||
import { MatFormFieldModule } from "@angular/material/form-field";
|
||||
|
@ -19,6 +17,9 @@ import {DataService} from "../../data.service";
|
|||
import { provideHttpClient } from "@angular/common/http";
|
||||
import { provideHttpClientTesting } from "@angular/common/http/testing";
|
||||
import { ConfigService } from "@services/config.service";
|
||||
import { MatExpansionModule } from '@angular/material/expansion';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
|
||||
describe('RemoveCacheImageComponent', () => {
|
||||
let component: RemoveCacheImageComponent;
|
||||
|
@ -41,9 +42,12 @@ describe('RemoveCacheImageComponent', () => {
|
|||
MatCheckboxModule,
|
||||
MatButtonModule,
|
||||
MatMenuModule,
|
||||
MatExpansionModule,
|
||||
BrowserAnimationsModule,
|
||||
MatTableModule,
|
||||
MatDividerModule,
|
||||
MatSelectModule,
|
||||
MatRadioModule,
|
||||
MatIconModule,
|
||||
ToastrModule.forRoot(),
|
||||
TranslateModule.forRoot()
|
||||
|
@ -60,7 +64,17 @@ describe('RemoveCacheImageComponent', () => {
|
|||
},
|
||||
{
|
||||
provide: MAT_DIALOG_DATA,
|
||||
useValue: {}
|
||||
useValue: {
|
||||
clients: [
|
||||
{
|
||||
'@id': '/clients/1',
|
||||
uuid: 'client-uuid-1',
|
||||
selected: false,
|
||||
status: 'og-live',
|
||||
state: 'og-live'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{ provide: ConfigService, useValue: mockConfigService }
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue