From 73fa5182dce45addb190b6b414fd8a3f53dfe4cf Mon Sep 17 00:00:00 2001 From: SeriousHorncat Date: Tue, 1 Oct 2024 07:23:29 -0500 Subject: [PATCH] wip for figuring out whats wrong --- frontend/test/views/AnnotationView.spec.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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');