|
| 1 | +import { |
| 2 | + completeBusinessStructureTask, |
| 3 | + fillOutLicenseStatusCheckForm, |
| 4 | +} from "@businessnjgovnavigator/cypress/support/helpers/helpers"; |
| 5 | +import { onOnboardingPageStartingBusiness } from "../../support/page_objects/onboardingPageNew"; |
| 6 | +describe("License Status Check [feature] [all] [group5]", () => { |
| 7 | + let checkStatusFormData: { |
| 8 | + businessName: string; |
| 9 | + addressLine1: string; |
| 10 | + addressZipCode: string; |
| 11 | + }; |
| 12 | + beforeEach(() => { |
| 13 | + cy.loginByCognitoApi(); |
| 14 | + checkStatusFormData = { |
| 15 | + businessName: "Pending Business Name", |
| 16 | + addressLine1: "111 Business St", |
| 17 | + addressZipCode: "12345", |
| 18 | + }; |
| 19 | + }); |
| 20 | + it("shows the Permit Status screen after submitting form for Cosmetology Shop License", () => { |
| 21 | + cy.url().should("include", "onboarding?page=1"); |
| 22 | + onOnboardingPageStartingBusiness.selectBusinessPersonaRadio("STARTING"); |
| 23 | + onOnboardingPageStartingBusiness.getBusinessPersonaRadio("STARTING").should("be.checked"); |
| 24 | + onOnboardingPageStartingBusiness.clickNext(); |
| 25 | + |
| 26 | + cy.url().should("include", "onboarding?page=2"); |
| 27 | + onOnboardingPageStartingBusiness.selectIndustryDropdown("cosmetology"); |
| 28 | + onOnboardingPageStartingBusiness.clickNext(); |
| 29 | + |
| 30 | + cy.url().should("include", "dashboard"); |
| 31 | + |
| 32 | + completeBusinessStructureTask({ legalStructureId: "limited-liability-company" }); |
| 33 | + |
| 34 | + cy.get('[data-testid="apply-for-shop-license"]').click(); |
| 35 | + cy.contains("Check Status").click(); |
| 36 | + |
| 37 | + fillOutLicenseStatusCheckForm(checkStatusFormData); |
| 38 | + |
| 39 | + cy.get('[data-testid="check-status-submit"]').click(); |
| 40 | + cy.contains("Permit Status:"); |
| 41 | + }); |
| 42 | +}); |
0 commit comments