From 98324c31160879138e8bdc1649c36e70bfbb12c0 Mon Sep 17 00:00:00 2001 From: Nisarg Date: Wed, 2 Oct 2024 13:45:31 -0700 Subject: [PATCH] fix: move save code inside block --- .../smoke-test/a-class-seedlot-reg-form-orchard.cy.ts | 9 ++++++--- .../smoke-test/a-class-seedlot-reg-form-ownership.cy.ts | 5 ++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/cypress/e2e/smoke-test/a-class-seedlot-reg-form-orchard.cy.ts b/frontend/cypress/e2e/smoke-test/a-class-seedlot-reg-form-orchard.cy.ts index 48dffe3ff..1ceb911fb 100644 --- a/frontend/cypress/e2e/smoke-test/a-class-seedlot-reg-form-orchard.cy.ts +++ b/frontend/cypress/e2e/smoke-test/a-class-seedlot-reg-form-orchard.cy.ts @@ -611,6 +611,9 @@ describe('A Class Seedlot Registration form, Orchard', () => { .find('ul li') .contains('219 - VERNON - S - PRD') .click(); + + // Save changes + cy.saveSeedlotRegFormProgress(); } }); @@ -629,11 +632,11 @@ describe('A Class Seedlot Registration form, Orchard', () => { .find('ul li') .contains('222 - VERNON - S - PRD') .click(); + + // Save changes + cy.saveSeedlotRegFormProgress(); } }); - - // Save changes - cy.saveSeedlotRegFormProgress(); }); it('Step complete status', () => { diff --git a/frontend/cypress/e2e/smoke-test/a-class-seedlot-reg-form-ownership.cy.ts b/frontend/cypress/e2e/smoke-test/a-class-seedlot-reg-form-ownership.cy.ts index bd6880e3f..19c44eb66 100644 --- a/frontend/cypress/e2e/smoke-test/a-class-seedlot-reg-form-ownership.cy.ts +++ b/frontend/cypress/e2e/smoke-test/a-class-seedlot-reg-form-ownership.cy.ts @@ -71,13 +71,12 @@ describe('A Class Seedlot Registration form, Ownership', () => { .then($checkbox => { if ($checkbox.is(':not(:checked)')) { cy.get('#default-owner-checkbox').check({ force: true }); + // Save changes + cy.saveSeedlotRegFormProgress(); } }) .should("be.checked"); - // Save changes - cy.saveSeedlotRegFormProgress(); - cy.get(`.${prefix}--accordion__title`) .find('.item-title-section') .should('have.text', initialAccordionTitle);