Skip to content

Commit

Permalink
wip for figuring out whats wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
SeriousHorncat committed Oct 1, 2024
1 parent 5658c2f commit 73fa518
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions frontend/test/views/AnnotationView.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,22 +236,26 @@ 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',
};

annotationAttachMock.returns([initialImageAnnotation, newImageResult]);

const lookingFor = wrapper.findAllComponents(SectionImage);

Check failure on line 255 in frontend/test/views/AnnotationView.spec.js

View workflow job for this annotation

GitHub Actions / nodejs-ci (20.8)

'lookingFor' is assigned a value but never used

// expect(lookingFor.length).to.equal(1);

const annotationSection = wrapper.findComponent('[id=Gene_Homology]');

annotationSection.vm.$emit('attach-image', 'GeneHomology_Multi-SequenceAlignment', 'hgvs_variant');
Expand Down

0 comments on commit 73fa518

Please sign in to comment.