From e3ff4217384b90d76e30583295ef039986ac264d Mon Sep 17 00:00:00 2001 From: Valencia McMurray Date: Fri, 6 Oct 2023 13:13:13 -0400 Subject: [PATCH] error fixes and resolving merging weirdness --- .../cypress/cypress/e2e/FAQ_Page.spec.feature | 24 +++++++++++++++---- tests/cypress/cypress/e2e/common/steps.js | 16 +++++++------ tests/cypress/support/pages/oneMacFAQPage.js | 2 +- .../support/pages/oneMacSubmissionTypePage.js | 2 -- .../pages/oneMacSubmitNewWaiverActionPage.js | 16 ++++++++++--- 5 files changed, 42 insertions(+), 18 deletions(-) diff --git a/tests/cypress/cypress/e2e/FAQ_Page.spec.feature b/tests/cypress/cypress/e2e/FAQ_Page.spec.feature index f8657c636..4e09f1903 100644 --- a/tests/cypress/cypress/e2e/FAQ_Page.spec.feature +++ b/tests/cypress/cypress/e2e/FAQ_Page.spec.feature @@ -88,17 +88,31 @@ Feature: OY2_Update_Text_on_FAQ_Page Then Click on What is my SPA ID link Then Verify text contains Enter the State Plan Amendment transmittal number Assign consecutive numbers on a calendar year basis - Scenario: Verify redirect link on waivers + Scenario: Verify redirect link on 1915b4 waivers Given I am on Login Page When Clicking on Development Login When Login with state submitter user Then click on New Submission Then Click on Waiver Action - Then Click on Waiver Action under Waiver Type - Then Click on What is my Waiver ID Link - Then Verify text contains "Waiver number must follow the format" + Then click on 1915b Waiver Actions + Then click on 1915b 4 FFS Selective Contracting waivers + Then click on 1915b 4 FFS Selective Contracting New Initial Waiver + Then click on What is my Initial Waiver Number + Then verify What format is used to enter a 1915b Initial Waiver number body is visible + + Scenario: Verify redirect link on 1915b waivers + Given I am on Login Page + When Clicking on Development Login + When Login with state submitter user + Then click on New Submission + Then Click on Waiver Action + Then click on 1915b Waiver Actions + Then click on 1915b Comprehensive Capitated Waiver Authority + Then click on 1915b Comprehensive Capitated Renewal Waiver + Then click on What is my 1915b Waiver Renewal Number + Then verify What format is used to enter a 1915b Waiver Renewal number header is visible - Scenario: Screen enhancement + Scenario: Verify the Guides exist in the FAQ Given I am on Login Page When Clicking on FAQ Tab Then verify Onboarding Materials exists diff --git a/tests/cypress/cypress/e2e/common/steps.js b/tests/cypress/cypress/e2e/common/steps.js index 38c933cdd..5aa88cbc1 100644 --- a/tests/cypress/cypress/e2e/common/steps.js +++ b/tests/cypress/cypress/e2e/common/steps.js @@ -449,10 +449,6 @@ Then("Add file for Waiver RAI Response", () => { medicaidSPARAIResponsePage.uploadRAIResponseAddFile(); }); -Then("Click on Waiver Action under Waiver Type", () => { - OneMacSubmissionTypePage.clickWaiverActionUnderWaiverAction(); -}); - Then("verify error message is not present on New Waiver Page", () => { OneMacSubmitNewWaiverActionPage.verifyErrorMessageIsNotDisplayed(); }); @@ -962,14 +958,17 @@ Then("verify Contact Email label Exists", () => { Then("verify actual Contact Email address Exists", () => { OneMacFAQPage.verifyActualEmailExists(); }); -Then("Verify page title is {string}", () => { +Then("Verify page title is {string}", (s) => { OneMacFAQPage.VerifyPageTitleIs(s); }); Then("Click on What is my SPA ID link", () => { OneMacSubmitNewMedicaidSpaPage.clickWhatIsMySPAIDLink(); }); -Then("Click on What is my Waiver ID Link", () => { - OneMacSubmitNewWaiverActionPage.clickWhatIsMyWaiverIdLink(); +Then("click on What is my Initial Waiver Number", () => { + OneMacSubmitNewWaiverActionPage.clickWhatIsMyInitialWaiverNumberLink(); +}); +Then("click on What is my 1915b Waiver Renewal Number", () => { + OneMacSubmitNewWaiverActionPage.clickWhatIsMyWaiverRenewalNumberLink(); }); Then("Home tab exists", () => { @@ -1441,6 +1440,9 @@ Then("click on Formal RAI Received dropdown filter", () => { Then("verify state filter select exists", () => { OneMacPackagePage.verifyStateFilterSelectExists(); }); +Then("verify no states are selected", () => { + OneMacPackagePage.verifyStateFilterSelectIsEmpty(); +}); Then("set value on state filter select to {string}", (state) => { OneMacPackagePage.typeStateToSelect(state + "{enter}"); }); diff --git a/tests/cypress/support/pages/oneMacFAQPage.js b/tests/cypress/support/pages/oneMacFAQPage.js index 74316fdbd..20af76b0b 100644 --- a/tests/cypress/support/pages/oneMacFAQPage.js +++ b/tests/cypress/support/pages/oneMacFAQPage.js @@ -277,7 +277,7 @@ export class oneMacFAQPage { verifyActualEmailExists() { cy.xpath(actualEmail).should("be.visible"); } - VerifyPageTitleIsFAQ(s) { + VerifyPageTitleIs(s) { cy.xpath(pageHeader).should("be.visible").contains(s); } verifyOnboardingMaterialsBtnExists() { diff --git a/tests/cypress/support/pages/oneMacSubmissionTypePage.js b/tests/cypress/support/pages/oneMacSubmissionTypePage.js index e6e8391b0..c7798d13e 100644 --- a/tests/cypress/support/pages/oneMacSubmissionTypePage.js +++ b/tests/cypress/support/pages/oneMacSubmissionTypePage.js @@ -22,8 +22,6 @@ const chipEligibility = ':contains("CHIP Eligibility")'; //Element is Xpath use cy.xpath instead of cy.get const allOtherChip = ':contains("All Other CHIP SPA Submissions")'; //Element is Xpath use cy.xpath instead of cy.get -const waiverActionWaiverAction = - '//p[contains(text(),"Submit 1915(b) waivers, amendments, and renewals")]'; const ffsSelectiveAuthority = "//div[contains(text(),'1915(b)(4) FFS Selective Contracting Waivers')]"; const comprehensiveCapitatedWaiverAuthority = diff --git a/tests/cypress/support/pages/oneMacSubmitNewWaiverActionPage.js b/tests/cypress/support/pages/oneMacSubmitNewWaiverActionPage.js index 18c732a2c..2ed8ee0e9 100644 --- a/tests/cypress/support/pages/oneMacSubmitNewWaiverActionPage.js +++ b/tests/cypress/support/pages/oneMacSubmitNewWaiverActionPage.js @@ -15,7 +15,10 @@ const fileUpload2 = "#uploader-input-1"; const commentsInputBox = "#field_2"; const additionalInfoTextarea = "#additional-information"; const existingWaiverNumber = "MD-22005.R00.00"; -const whatIsMyWaiverIDLink = "//a[@href='/FAQ#waiver-id-format']"; +const whatIsMyInitialWaiverNumberLink = + "//a[@href='/FAQ#initial-waiver-id-format']"; +const whatIsMyWaiverRenewalNumberLink = + "//a[@href='/FAQ#waiver-renewal-id-format']"; const proposedEffectiveDate = "#proposed-effective-date"; const parentIDInputBox = "#parent-componentId"; const parentErrMsgForWaiverNumber = "#parent-componentIdStatusMsg0"; @@ -126,8 +129,15 @@ export class oneMacSubmitNewWaiverActionPage { cy.get(additionalInfoTextarea).type(s); } - clickWhatIsMyWaiverIdLink() { - cy.xpath(whatIsMyWaiverIDLink) + clickWhatIsMyInitialWaiverNumberLink() { + cy.xpath(whatIsMyInitialWaiverNumberLink) + .invoke("attr", "href") + .then((href) => { + cy.visit(href); + }); + } + clickWhatIsMyWaiverRenewalNumberLink() { + cy.xpath(whatIsMyWaiverRenewalNumberLink) .invoke("attr", "href") .then((href) => { cy.visit(href);