diff --git a/frontend/test/views/AnnotationView.spec.js b/frontend/test/views/AnnotationView.spec.js index 253134fc..0f3de47c 100644 --- a/frontend/test/views/AnnotationView.spec.js +++ b/frontend/test/views/AnnotationView.spec.js @@ -236,15 +236,15 @@ describe('AnnotationView', () => { }); describe('when an image section has an image', () => { - - - it('allows user to add an image when an image already exists', async () => { - const initialImageAnnotation = {'file_id': 'fake-image-id-1', 'created_date': 'fake-date'}; + const initialImageAnnotation = {'file_id': 'fake-image-id-1', 'created_date': 'fake-date'}; + beforeEach(() => { const annotationsWithNewEvidence = mockAnnotationsForCPAM0002; annotationsWithNewEvidence['GeneHomology_Multi-SequenceAlignment'] = [initialImageAnnotation]; mockAnnotations.returns(annotationsWithNewEvidence); wrapper = getMountedComponent(); + }); + it('allows user to add an image when an image already exists', async () => { const newImageResult = { file_id: 'fake-image-id-2', section: 'GeneHomology_Multi-SequenceAlignment', @@ -252,6 +252,10 @@ describe('AnnotationView', () => { annotationAttachMock.returns([initialImageAnnotation, newImageResult]); + const lookingFor = wrapper.findAllComponents(SectionImage); + + // expect(lookingFor.length).to.equal(1); + const annotationSection = wrapper.findComponent('[id=Gene_Homology]'); annotationSection.vm.$emit('attach-image', 'GeneHomology_Multi-SequenceAlignment', 'hgvs_variant');