Skip to content

Commit

Permalink
feat: 1446 cone and pollen count step 5 (#1456)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngunner15 authored Aug 23, 2024
1 parent 24f6ff0 commit 8c04a32
Show file tree
Hide file tree
Showing 8 changed files with 629 additions and 16 deletions.
3 changes: 2 additions & 1 deletion frontend/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export default defineConfig({
'**/a-class-seedlot-reg-form-collection-interim.cy.ts',
'**/a-class-seedlot-reg-form-ownership.cy.ts',
'**/a-class-seedlot-reg-form-orchard.cy.ts',
'**/a-class-seedlot-reg-form-extraction.cy.ts'
'**/a-class-seedlot-reg-form-extraction.cy.ts',
'**/a-class-seedlot-reg-form-parent-tree-part-1.cy.ts'
],
chromeWebSecurity: false,
retries: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ describe('A Class Seedlot Registration form, Collection and Interim storage', ()
.type('2024-05-25')
.blur();

// Save changes
cy.saveSeedlotRegFormProgress();

cy.get('#end-date-input')
.clear()
.type('2024-05-26')
Expand Down Expand Up @@ -509,6 +512,9 @@ describe('A Class Seedlot Registration form, Collection and Interim storage', ()
.type('Test comment')
.blur();

// Save changes
cy.saveSeedlotRegFormProgress();

// Press next button
cy.get('.seedlot-registration-button-row')
.find('button.form-action-btn')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ describe('A Class Seedlot Registration form, Orchard', () => {
const parentTreeSet = new Set();
const unionParentTreeArray: string[] = [];
const lengthOfArray = 6;
const F2GameticValue = 'F2 - Measured Cone Volume';
const M3GameticValue = 'M3 - Pollen Volume Estimate by 100% Survey';

beforeEach(() => {
// Login
Expand Down Expand Up @@ -452,11 +454,11 @@ describe('A Class Seedlot Registration form, Orchard', () => {

cy.get(`.${prefix}--list-box--expanded`)
.find('ul li')
.contains('F2 - Measured Cone Volume')
.contains(F2GameticValue)
.click();

cy.get('#orchard-female-gametic')
.should('have.value', 'F2 - Measured Cone Volume');
.should('have.value', F2GameticValue);

// Select male gametic contribution methodology
cy.get('#orchard-male-gametic')
Expand All @@ -465,11 +467,11 @@ describe('A Class Seedlot Registration form, Orchard', () => {

cy.get(`.${prefix}--list-box--expanded`)
.find('ul li')
.contains('M3 - Pollen Volume Estimate by 100% Survey')
.contains(M3GameticValue)
.click();

cy.get('#orchard-male-gametic')
.should('have.value', 'M3 - Pollen Volume Estimate by 100% Survey');
.should('have.value', M3GameticValue);

// Check 'x' button
cy.get('#orchard-female-gametic')
Expand All @@ -493,18 +495,24 @@ describe('A Class Seedlot Registration form, Orchard', () => {

cy.get(`.${prefix}--list-box--expanded`)
.find('ul li')
.contains('F2 - Measured Cone Volume')
.contains(F2GameticValue)
.click();

cy.get('#orchard-female-gametic')
.should('have.value', F2GameticValue);

cy.get('#orchard-male-gametic')
.siblings()
.click();

cy.get(`.${prefix}--list-box--expanded`)
.find('ul li')
.contains('M3 - Pollen Volume Estimate by 100% Survey')
.contains(M3GameticValue)
.click();

cy.get('#orchard-male-gametic')
.should('have.value', M3GameticValue);

// Change radio inputs of gamete section
cy.get('#controlled-cross-yes')
.check({ force: true });
Expand Down Expand Up @@ -597,6 +605,12 @@ describe('A Class Seedlot Registration form, Orchard', () => {

// Save changes
cy.saveSeedlotRegFormProgress();
});

it('Step complete status', () => {
// Make sure value is loaded
cy.get('#orchard-breading-perc')
.should('have.value', '5');

// Press next button
cy.get('.seedlot-registration-button-row')
Expand Down
Loading

0 comments on commit 8c04a32

Please sign in to comment.