Skip to content

Commit

Permalink
feat: add calculate metrics test
Browse files Browse the repository at this point in the history
  • Loading branch information
ngunner15 committed Aug 19, 2024
1 parent 14eb112 commit b071399
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,4 +393,32 @@ describe('A Class Seedlot Registration form, Parent Tree and SMP part-2(SMP succ
cy.get('#219-nonOrchardPollenContam-value-input')
.should('have.value', '22');
});

it('Calculate Metrics button', () => {
// Check info sections not visible in DOM
cy.get('.info-section-sub-title')
.should('not.exist');

// Click 'Calculate metrics' button
cy.get('.gen-worth-cal-row')
.find('button')
.contains('Calculate metrics')
.click();

// Check info sections visible in DOM
cy.get('.info-section-sub-title')
.find(`.${prefix}--col`)
.contains('Genetic worth and percent of Tested parent tree contribution')
.should('be.visible');

cy.get('.info-section-sub-title')
.find(`.${prefix}--col`)
.contains('Effective population size and diversity')
.should('be.visible');

cy.get('.info-section-sub-title')
.find(`.${prefix}--col`)
.contains('Orchard parent tree geospatial summary')
.should('be.visible');
});
});

0 comments on commit b071399

Please sign in to comment.