Skip to content
Snippets Groups Projects
Verified Commit 43d59214 authored by Sebastian Bergandy's avatar Sebastian Bergandy :keyboard:
Browse files

OZG-5977 fix unit test

parent 681a96fb
Branches
Tags
1 merge request!74OZG-5977 add multi file upload to wiedervorlagen
import { BinaryFile2ContainerComponent, BinaryFileModule } from '@alfa-client/binary-file';
import { BinaryFileResource } from '@alfa-client/binary-file-shared';
import {
convertForDataTest,
ConvertForDataTestPipe,
ConvertProblemDetailToErrorMessagesPipe,
createEmptyStateResource,
createErrorStateResource,
......@@ -31,12 +33,14 @@ describe('FileUploadListItemComponent', () => {
const file: File = createFile();
const binaryFileResource: BinaryFileResource = createBinaryFileResource();
const attachmentTestId: string = getDataTestIdOf(file.name + '-file-upload-list-item-attachment-upload');
const binaryFileContainerTestId: string = getDataTestIdOf(binaryFileResource.name + '-file-upload-list-item-uploaded');
const attachmentTestId: string = getDataTestIdOf(convertForDataTest(file.name) + '-file-upload-list-item-attachment-upload');
const binaryFileContainerTestId: string = getDataTestIdOf(
convertForDataTest(binaryFileResource.name) + '-file-upload-list-item-uploaded',
);
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [FileUploadListItemComponent, ConvertProblemDetailToErrorMessagesPipe],
imports: [FileUploadListItemComponent, ConvertProblemDetailToErrorMessagesPipe, ConvertForDataTestPipe],
declarations: [MockModule(BinaryFileModule), MockComponent(BinaryFile2ContainerComponent)],
}).compileComponents();
......
......@@ -15,7 +15,7 @@ describe('OdsMultiFileUploadComponent', () => {
let component: MultiFileUploadComponent;
let fixture: ComponentFixture<MultiFileUploadComponent>;
const fileUploadListTestId: string = getDataTestIdOf('multi-file-upload-list');
const fileUploadListTestId: string = getDataTestIdOf('file-list');
const fileUploadEditorTestId: string = getDataTestIdOf('multi-file-upload-editor');
const fileUploadType: FileUploadType = faker.word.noun();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment