From 8ad7f45d6ec1f6c2095f9da0d31919d9153eb376 Mon Sep 17 00:00:00 2001 From: Nehemiah Abuga <121119072+nehemiah-abuga@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:52:21 -0700 Subject: [PATCH 01/65] PXBF-1598-enhance-cypress-tests-custom-commands: Enhance Cypress Tests for Readability, Maintainability, and Dynamism This PR introduces enhancements to existing Cypress test automation by improving readability, maintainability, and flexibility. Key changes include the addition of reusable custom commands, better handling of optional fields, and streamlined navigation across test scenarios. --- benefit-finder/cypress.config.js | 3 +- .../e2e/storybook/aria-attribute-state.cy.js | 69 +- .../cypress/e2e/storybook/axe-a11y.cy.js | 83 +-- .../cypress/e2e/storybook/dataLayer.cy.js | 614 ++++++++---------- .../e2e/storybook/error-message-display.cy.js | 42 +- .../e2e/storybook/{modal.js => modal.cy.js} | 26 +- ...lected-criteria-eligibility-benefits.cy.js | 212 ++---- benefit-finder/cypress/support/commands.js | 241 +++++++ benefit-finder/cypress/support/utils.js | 26 - 9 files changed, 665 insertions(+), 651 deletions(-) rename benefit-finder/cypress/e2e/storybook/{modal.js => modal.cy.js} (77%) diff --git a/benefit-finder/cypress.config.js b/benefit-finder/cypress.config.js index f509b80bb..8e6a60e09 100644 --- a/benefit-finder/cypress.config.js +++ b/benefit-finder/cypress.config.js @@ -1,5 +1,4 @@ - -const { defineConfig } = require('cypress') +const { defineConfig } = require('Cypress') module.exports = defineConfig({ experimentalWebKitSupport: true, diff --git a/benefit-finder/cypress/e2e/storybook/aria-attribute-state.cy.js b/benefit-finder/cypress/e2e/storybook/aria-attribute-state.cy.js index df7393e45..3ba09984c 100644 --- a/benefit-finder/cypress/e2e/storybook/aria-attribute-state.cy.js +++ b/benefit-finder/cypress/e2e/storybook/aria-attribute-state.cy.js @@ -3,78 +3,49 @@ import * as utils from '../../support/utils.js' import * as EN_LOCALE_DATA from '../../../src/shared/locales/en/en.json' import * as EN_DOLO_MOCK_DATA from '../../../src/shared/api/mock-data/current.json' -import { pageObjects } from '../../support/pageObjects.js' -const dob = utils.getDateByOffset(-(18 * 365.2425 - 1)) -const relation = +const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) +const relationship = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[1].fieldset.inputs[0].inputCriteria.values[1].value const relationshipId = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[1].fieldset.inputs[0].inputCriteria.id -const status = +const maritalStatus = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[2].fieldset.inputs[0].inputCriteria.values[1].value describe('Validate state of aria-invalid attribute', () => { beforeEach(() => { cy.visit(utils.storybookUri) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() + cy.navigateToAboutTheApplicantPage() }) it('Should have default state of "false" for select, input, and radio', () => { - pageObjects - .fieldsetById(relationshipId) - .invoke('attr', 'aria-invalid') - .should('eq', 'false') - - pageObjects - .benefitMemorableDateById('day') - .invoke('attr', 'aria-invalid') - .should('eq', 'false') - - pageObjects - .radioGroup() - .invoke('attr', 'aria-invalid') - .should('eq', 'false') + cy.validateAriaInvalid('fieldsetById', 'false', relationshipId) + cy.validateAriaInvalid('benefitMemorableDateById', 'false', 'day') + cy.validateAriaInvalid('radioGroup', 'false') }) it('Should have state of "true" when a required field has no value', () => { - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - - pageObjects - .fieldsetById(relationshipId) - .invoke('attr', 'aria-invalid') - .should('eq', 'true') - - pageObjects - .benefitMemorableDateById('day') - .invoke('attr', 'aria-invalid') - .should('eq', 'true') + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) + cy.validateAriaInvalid('fieldsetById', 'true', relationshipId) + cy.validateAriaInvalid('benefitMemorableDateById', 'true', 'day') }) it('Should have state of "false" when previous was true but error has been resolved', () => { - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - - pageObjects - .fieldsetById(relationshipId) - .invoke('attr', 'aria-invalid') - .should('eq', 'true') - pageObjects - .benefitMemorableDateById('day') - .invoke('attr', 'aria-invalid') - .should('eq', 'true') + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) - utils.dataInputs({ dob, relation, status }) + cy.validateAriaInvalid('fieldsetById', 'true', relationshipId) + cy.validateAriaInvalid('benefitMemorableDateById', 'true', 'day') - pageObjects - .fieldsetById(relationshipId) - .invoke('attr', 'aria-invalid') - .should('eq', 'false') + cy.fillDetailsAboutTheApplicant({ + dateOfBirth, + relationship, + maritalStatus, + }) - pageObjects - .benefitMemorableDateById('day') - .invoke('attr', 'aria-invalid') - .should('eq', 'false') + cy.validateAriaInvalid('fieldsetById', 'false', relationshipId) + cy.validateAriaInvalid('benefitMemorableDateById', 'false', 'day') }) }) diff --git a/benefit-finder/cypress/e2e/storybook/axe-a11y.cy.js b/benefit-finder/cypress/e2e/storybook/axe-a11y.cy.js index de5e85d66..b1b6f9047 100644 --- a/benefit-finder/cypress/e2e/storybook/axe-a11y.cy.js +++ b/benefit-finder/cypress/e2e/storybook/axe-a11y.cy.js @@ -26,12 +26,12 @@ function terminalLog(violations) { cy.task('table', violationData) } -const dob = utils.getDateByOffset(-(18 * 365.2425 - 1)) -const dod = utils.getDateByOffset(-(18 * 365.2425 - 1)) -const relation = +const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) +const dateOfDeath = utils.getDateByOffset(-30) +const relationship = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[1].fieldset.inputs[0].inputCriteria.values[1].value -const status = +const maritalStatus = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[2].fieldset.inputs[0].inputCriteria.values[1].value @@ -60,57 +60,62 @@ describe(`Validate code passes axe scanning`, () => { // go to first step it('Has no detectable a11y violations on step 1', () => { - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() + cy.clickButton(EN_LOCALE_DATA.intro.button) runA11y() }) // create an error it('Has no detectable a11y violations on error state', () => { - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.intro.button) + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) // Click 'Next' without filling details about the applicant runA11y() }) it('Has no detectable a11y violations on error state resolved', () => { - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - utils.dataInputs({ dob, relation, status }) + cy.clickButton(EN_LOCALE_DATA.intro.button) + cy.fillDetailsAboutTheApplicant({ + dateOfBirth, + relationship, + maritalStatus, + }) runA11y() }) it('Has no detectable a11y violations on step 2', () => { - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - utils.dataInputs({ dob, relation, status }) - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.navigateToAboutTheDeceasedPage({ + dateOfBirth, + relationship, + maritalStatus, + }) + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) runA11y() }) it('Has no detectable a11y violations on modal launch', () => { - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - utils.dataInputs({ dob, relation, status }) - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - utils.dataInputs({ dod }) - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.navigateToModal({ + dateOfBirth, + relationship, + maritalStatus, + dateOfDeath, + }) cy.injectAxe() cy.checkA11y('#benefit-finder-modal') }) it('Has no detectable a11y violations on modal close review selections', () => { - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - utils.dataInputs({ dob, relation, status }) - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - utils.dataInputs({ dod }) - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - pageObjects - .button() - .contains(EN_LOCALE_DATA.reviewSelectionModal.buttonGroup[0].value) - .click() + cy.navigateToModal({ + dateOfBirth, + relationship, + maritalStatus, + dateOfDeath, + }) + cy.clickButton(EN_LOCALE_DATA.reviewSelectionModal.buttonGroup[0].value) // Close modal runA11y() }) it('Has no detectable a11y violations on see benefits', () => { const selectedData = BENEFITS_ELIBILITY_DATA.scenario_1_covid.en.param const scenario = utils.encodeURIFromObject(selectedData) - delete selectedData.shared // We don't want to include the "shared" param cy.visit(`${utils.storybookUri}${scenario}`) cy.injectAxe() // we inject axe again because of the reload -> visit @@ -132,19 +137,17 @@ describe(`Validate code passes axe scanning`, () => { }) it('Has no detectable a11y violations on see benefits you did not qualify for', () => { - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - utils.dataInputs({ dob, relation, status }) - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - utils.dataInputs({ dod }) - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - pageObjects - .button() - .contains(EN_LOCALE_DATA.reviewSelectionModal.buttonGroup[1].value) - .click() - pageObjects - .button() - .contains(EN_LOCALE_DATA.resultsView.zeroBenefits.cta) - .click() + cy.navigateToBenefitResultsPage({ + dateOfBirth, + relationship, + maritalStatus, + dateOfDeath, + }) + pageObjects.accordionHeading().should('exist') + + cy.clickButton(EN_LOCALE_DATA.resultsView.zeroBenefits.cta) + pageObjects.accordionHeading().should('exist') + // get a node list of all accordions // get the heading of the first in the list cy.get(`[data-testid="bf-usa-accordion"]`).then(accordionItems => { diff --git a/benefit-finder/cypress/e2e/storybook/dataLayer.cy.js b/benefit-finder/cypress/e2e/storybook/dataLayer.cy.js index 34e0b6ae6..6e046942b 100644 --- a/benefit-finder/cypress/e2e/storybook/dataLayer.cy.js +++ b/benefit-finder/cypress/e2e/storybook/dataLayer.cy.js @@ -192,16 +192,13 @@ const dataLayerValues = [ const removeID = item => delete item['gtm.uniqueEventId'] -const relationshipId = - EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section - .fieldsets[1].fieldset.inputs[0].inputCriteria.id -const relationshipValue = +const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) +const dateOfDeath = utils.getDateByOffset(-30) + +const relationship = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[1].fieldset.inputs[0].inputCriteria.values[1].value -const maritalStatusId = - EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section - .fieldsets[2].fieldset.inputs[0].inputCriteria.id -const maritalStatusValue = +const maritalStatus = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[2].fieldset.inputs[0].inputCriteria.values[1].value @@ -257,7 +254,8 @@ describe('Calls to Google Analytics Object', function () { it('first form step bf_page_change event', function () { cy.visit(utils.storybookUri) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() + + cy.navigateToAboutTheApplicantPage() cy.window().then(window => { assert.isDefined(window.dataLayer, 'window.dataLayer is defined') @@ -277,7 +275,8 @@ describe('Calls to Google Analytics Object', function () { it('second form step bf_page_change event, asserts incrmenting values', function () { cy.visit(utils.storybookUri) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() + + cy.navigateToAboutTheApplicantPage() cy.window().then(window => { assert.isDefined(window.dataLayer, 'window.dataLayer is defined') @@ -292,37 +291,31 @@ describe('Calls to Google Analytics Object', function () { expect(ev).to.deep.equal(dataLayerValueFormStepOne) - // fill out required fields - const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) - cy.visit('/iframe.html?args=&id=app--primary&viewMode=story') - - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - cy.enterDate(dateOfBirth.month, dateOfBirth.day, dateOfBirth.year) - pageObjects.fieldsetById(relationshipId).select(relationshipValue) - pageObjects.fieldsetById(maritalStatusId).select(maritalStatusValue) - - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { - // get all the events in our layer that matches the event value - const ev = [ - ...window.dataLayer.filter( - x => x?.event === dataLayerValueFormStepTwo.event - ), - ] - removeID(ev[2]) + cy.fillDetailsAboutTheApplicant({ + dateOfBirth, + relationship, + maritalStatus, + }) - expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) - }) + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { + // get all the events in our layer that matches the event value + const ev = [ + ...window.dataLayer.filter( + x => x?.event === dataLayerValueFormStepTwo.event + ), + ] + removeID(ev[2]) + + expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) + }) }) }) }) it('clicking Continue on the final form step opens a modal and triggers the modal event', function () { cy.visit(utils.storybookUri) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() + + cy.navigateToAboutTheApplicantPage() cy.window().then(window => { assert.isDefined(window.dataLayer, 'window.dataLayer is defined') @@ -338,49 +331,37 @@ describe('Calls to Google Analytics Object', function () { expect(ev).to.deep.equal(dataLayerValueFormStepOne) // fill out required fields - const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) - cy.visit('/iframe.html?args=&id=app--primary&viewMode=story') + cy.fillDetailsAboutTheApplicant({ + dateOfBirth, + relationship, + maritalStatus, + }) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - cy.enterDate(dateOfBirth.month, dateOfBirth.day, dateOfBirth.year) - pageObjects.fieldsetById(relationshipId).select(relationshipValue) - pageObjects.fieldsetById(maritalStatusId).select(maritalStatusValue) + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { + // get all the events in our layer that matches the event value + const ev = [ + ...window.dataLayer.filter( + x => x?.event === dataLayerValueFormStepTwo.event + ), + ] + removeID(ev[2]) - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { + expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) + + cy.fillDetailsAboutTheDeceased({ dateOfDeath }) + + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { // get all the events in our layer that matches the event value const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueFormStepTwo.event + x => x?.event === dataLayerValueFormCompletionModal.event ), ] - removeID(ev[2]) - - expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) + removeID(ev[3]) - // Date of death - 30 days ago - const dateOfDeath = utils.getDateByOffset(-30) - cy.enterDate(dateOfDeath.month, dateOfDeath.day, dateOfDeath.year) - - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { - // get all the events in our layer that matches the event value - const ev = [ - ...window.dataLayer.filter( - x => x?.event === dataLayerValueFormCompletionModal.event - ), - ] - removeID(ev[3]) - - expect(ev[3]).to.deep.equal(dataLayerValueFormCompletionModal) - }) + expect(ev[3]).to.deep.equal(dataLayerValueFormCompletionModal) }) + }) }) }) }) @@ -580,7 +561,8 @@ describe('Calls to Google Analytics Object', function () { it('clicking Continue on the final form step opens a modal, clicking Review selections loads the verification view and a bf_page_change event', function () { cy.visit(utils.storybookUri) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() + + cy.navigateToAboutTheApplicantPage() cy.window().then(window => { assert.isDefined(window.dataLayer, 'window.dataLayer is defined') @@ -596,67 +578,50 @@ describe('Calls to Google Analytics Object', function () { expect(ev).to.deep.equal(dataLayerValueFormStepOne) // fill out required fields - const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) - cy.visit('/iframe.html?args=&id=app--primary&viewMode=story') + cy.fillDetailsAboutTheApplicant({ + dateOfBirth, + relationship, + maritalStatus, + }) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - cy.enterDate(dateOfBirth.month, dateOfBirth.day, dateOfBirth.year) - pageObjects.fieldsetById(relationshipId).select(relationshipValue) - pageObjects.fieldsetById(maritalStatusId).select(maritalStatusValue) + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { + // get all the events in our layer that matches the event value + const ev = [ + ...window.dataLayer.filter( + x => x?.event === dataLayerValueFormStepTwo.event + ), + ] + removeID(ev[2]) - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { + expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) + + // Date of death - 30 days ago + cy.fillDetailsAboutTheDeceased({ dateOfDeath }) + + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { // get all the events in our layer that matches the event value const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueFormStepTwo.event + x => x?.event === dataLayerValueFormCompletionModal.event ), ] - removeID(ev[2]) - - expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) - - // Date of death - 30 days ago - const dateOfDeath = utils.getDateByOffset(-30) - cy.enterDate(dateOfDeath.month, dateOfDeath.day, dateOfDeath.year) + removeID(ev[3]) - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { - // get all the events in our layer that matches the event value - const ev = [ - ...window.dataLayer.filter( - x => x?.event === dataLayerValueFormCompletionModal.event - ), - ] - removeID(ev[3]) + expect(ev[3]).to.deep.equal(dataLayerValueFormCompletionModal) - expect(ev[3]).to.deep.equal(dataLayerValueFormCompletionModal) + cy.clickButton('Review your selections').then(() => { + // get all the events in our layer that matches the event value + const ev = [ + ...window.dataLayer.filter( + x => x?.event === dataLayerValueVerifySecletions.event + ), + ] + removeID(ev[4]) - pageObjects - .button() - .contains('Review your selections') - .click() - .then(() => { - // get all the events in our layer that matches the event value - const ev = [ - ...window.dataLayer.filter( - x => x?.event === dataLayerValueVerifySecletions.event - ), - ] - removeID(ev[4]) - - expect(ev[4]).to.deep.equal( - dataLayerValueVerifySecletions - ) - }) - }) + expect(ev[4]).to.deep.equal(dataLayerValueVerifySecletions) + }) }) + }) }) }) }) @@ -703,7 +668,8 @@ describe('Calls to Google Analytics Object', function () { it('navigating through all the form results in zeroBenefits views', function () { cy.visit(utils.storybookUri) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() + + cy.navigateToAboutTheApplicantPage() cy.window().then(window => { assert.isDefined(window.dataLayer, 'window.dataLayer is defined') @@ -719,112 +685,90 @@ describe('Calls to Google Analytics Object', function () { expect(ev).to.deep.equal(dataLayerValueFormStepOne) // fill out required fields - const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) - cy.visit('/iframe.html?args=&id=app--primary&viewMode=story') + cy.fillDetailsAboutTheApplicant({ + dateOfBirth, + relationship, + maritalStatus, + }) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - cy.enterDate(dateOfBirth.month, dateOfBirth.day, dateOfBirth.year) - pageObjects.fieldsetById(relationshipId).select(relationshipValue) - pageObjects.fieldsetById(maritalStatusId).select(maritalStatusValue) + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { + // get all the events in our layer that matches the event value + const ev = [ + ...window.dataLayer.filter( + x => x?.event === dataLayerValueFormStepTwo.event + ), + ] + removeID(ev[2]) - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { - // get all the events in our layer that matches the event value + expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) + + cy.fillDetailsAboutTheDeceased({ dateOfDeath }) + + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueFormStepTwo.event + x => x?.event === dataLayerValueFormCompletionModal.event ), ] - removeID(ev[2]) + removeID(ev[3]) - expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) + expect(ev[3]).to.deep.equal(dataLayerValueFormCompletionModal) - // Date of death - 30 days ago - const dateOfDeath = utils.getDateByOffset(-30) - cy.enterDate(dateOfDeath.month, dateOfDeath.day, dateOfDeath.year) + cy.clickButton('Review your selections').then(() => { + // get all the events in our layer that matches the event value + const ev = [ + ...window.dataLayer.filter( + x => x?.event === dataLayerValueVerifySecletions.event + ), + ] + removeID(ev[4]) - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { + expect(ev[4]).to.deep.equal(dataLayerValueVerifySecletions) + + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { + // get all the events in our layer that matches the event value const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueFormCompletionModal.event + x => + x?.event === dataLayerValueZeroResultsViewEligible.event ), ] - removeID(ev[3]) + removeID(ev[5]) - expect(ev[3]).to.deep.equal(dataLayerValueFormCompletionModal) + expect(ev[5]).to.deep.equal( + dataLayerValueZeroResultsViewEligible + ) pageObjects - .button() - .contains('Review your selections') + .seeAllBenefitsButton() .click() .then(() => { // get all the events in our layer that matches the event value const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueVerifySecletions.event + x => + x?.event === + dataLayerValueZeroResultsViewNotEligible.event ), ] - removeID(ev[4]) + removeID(ev[6]) - expect(ev[4]).to.deep.equal( - dataLayerValueVerifySecletions + expect(ev[6]).to.deep.equal( + dataLayerValueZeroResultsViewNotEligible ) - - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { - // get all the events in our layer that matches the event value - const ev = [ - ...window.dataLayer.filter( - x => - x?.event === - dataLayerValueZeroResultsViewEligible.event - ), - ] - removeID(ev[5]) - - expect(ev[5]).to.deep.equal( - dataLayerValueZeroResultsViewEligible - ) - - pageObjects - .seeAllBenefitsButton() - .click() - .then(() => { - // get all the events in our layer that matches the event value - const ev = [ - ...window.dataLayer.filter( - x => - x?.event === - dataLayerValueZeroResultsViewNotEligible.event - ), - ] - removeID(ev[6]) - - expect(ev[6]).to.deep.equal( - dataLayerValueZeroResultsViewNotEligible - ) - }) - }) }) }) + }) }) + }) }) }) }) it('navigating through all the test steps produces a deep equal comparison to our expected dataLayer array values', function () { cy.visit(utils.storybookUri) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() + + cy.navigateToAboutTheApplicantPage() cy.window().then(window => { assert.isDefined(window.dataLayer, 'window.dataLayer is defined') @@ -841,222 +785,190 @@ describe('Calls to Google Analytics Object', function () { expect(ev).to.deep.equal(dataLayerValueFormStepOne) // fill out required fields - const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) - cy.visit('/iframe.html?args=&id=app--primary&viewMode=story') + cy.fillDetailsAboutTheApplicant({ + dateOfBirth, + relationship, + maritalStatus, + }) + + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { + // get the last pushed event + const ev = [ + ...window.dataLayer.filter( + x => x?.event === dataLayerValueFormStepTwo.event + ), + ] - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - cy.enterDate(dateOfBirth.month, dateOfBirth.day, dateOfBirth.year) - pageObjects.fieldsetById(relationshipId).select(relationshipValue) - pageObjects.fieldsetById(maritalStatusId).select(maritalStatusValue) + // delete ev[2]['gtm.uniqueEventId'] + removeID(ev[2]) - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { - // get the last pushed event + expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) + + cy.fillDetailsAboutTheDeceased({ dateOfDeath }) + + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueFormStepTwo.event + x => x?.event === dataLayerValueFormCompletionModal.event ), ] - // delete ev[2]['gtm.uniqueEventId'] - removeID(ev[2]) + // delete ev[3]['gtm.uniqueEventId'] + removeID(ev[3]) + + expect(ev[3]).to.deep.equal(dataLayerValueFormCompletionModal) + + cy.clickButton('Review your selections').then(() => { + const ev = [ + ...window.dataLayer.filter( + x => x?.event === dataLayerValueVerifySecletions.event + ), + ] - expect(ev[2]).to.deep.equal(dataLayerValueFormStepTwo) + // delete ev[4]['gtm.uniqueEventId'] + removeID(ev[4]) - // Date of death - 30 days ago - const dateOfDeath = utils.getDateByOffset(-30) - cy.enterDate(dateOfDeath.month, dateOfDeath.day, dateOfDeath.year) + expect(ev[4]).to.deep.equal(dataLayerValueVerifySecletions) - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() - .then(() => { + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value).then(() => { const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueFormCompletionModal.event + x => + x?.event === dataLayerValueZeroResultsViewEligible.event ), ] + removeID(ev[5]) - // delete ev[3]['gtm.uniqueEventId'] - removeID(ev[3]) - - expect(ev[3]).to.deep.equal(dataLayerValueFormCompletionModal) + expect(ev[5]).to.deep.equal( + dataLayerValueZeroResultsViewEligible + ) pageObjects - .button() - .contains('Review your selections') + .seeAllBenefitsButton() .click() .then(() => { const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueVerifySecletions.event + x => + x?.event === + dataLayerValueZeroResultsViewNotEligible.event ), ] + removeID(ev[6]) - // delete ev[4]['gtm.uniqueEventId'] - removeID(ev[4]) - - expect(ev[4]).to.deep.equal( - dataLayerValueVerifySecletions + expect(ev[6]).to.deep.equal( + dataLayerValueZeroResultsViewNotEligible ) + }) + // confirm zero benefits event and view + // click see all benefits + pageObjects + .expandAll() + .click() + .then(() => { + // check last page change event + const ev = [ + ...window.dataLayer.filter( + x => + x?.event === dataLayerValueOpenAllAccordions.event + ), + ] + removeID(ev[0]) + expect(ev[0]).to.deep.equal( + dataLayerValueOpenAllAccordions + ) pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) + .expandAll() .click() .then(() => { + // check last page change event const ev = [ ...window.dataLayer.filter( x => x?.event === - dataLayerValueZeroResultsViewEligible.event + dataLayerValueOpenAllAccordions.event ), ] - removeID(ev[5]) - expect(ev[5]).to.deep.equal( - dataLayerValueZeroResultsViewEligible + // we ignore dedup here so there can be multiple fires + removeID(ev[1]) + + expect(ev[1].bfData.accordionsOpen).to.equal( + !dataLayerValueOpenAllAccordions.bfData + .accordionsOpen ) pageObjects - .seeAllBenefitsButton() + .accordionByTitle( + enResults.eligible.eligible_benefits[0] + ) .click() - .then(() => { - const ev = [ - ...window.dataLayer.filter( - x => - x?.event === - dataLayerValueZeroResultsViewNotEligible.event - ), - ] - removeID(ev[6]) + cy.wrap(window.dataLayer).should(dataLayer => { + const matchingEvents = dataLayer.filter( + x => + x?.event === dataLayerValueAccordionOpen.event + ) + assert.isNotEmpty( + matchingEvents, + 'bf_accordion_open event is triggered' + ) + }) + + // check last page change event + cy.wrap(window.dataLayer).then(dataLayer => { + const ev = dataLayer.filter( + x => + x?.event === dataLayerValueAccordionOpen.event + )[0] + + removeID(ev) + + expect(ev).to.deep.equal( + dataLayerValueAccordionOpen + ) + }) - expect(ev[6]).to.deep.equal( - dataLayerValueZeroResultsViewNotEligible - ) - }) - // confirm zero benefits event and view - // click see all benefits pageObjects - .expandAll() + .benefitsAccordionLink( + enResults.eligible.eligible_benefits[0] + ) + .invoke('removeAttr', 'href') .click() .then(() => { - // check last page change event const ev = [ ...window.dataLayer.filter( x => - x?.event === - dataLayerValueOpenAllAccordions.event + x?.event === dataLayerValueBenefitLink.event ), ] + // delete ev[0]['gtm.uniqueEventId'] removeID(ev[0]) - expect(ev[0]).to.deep.equal( - dataLayerValueOpenAllAccordions + dataLayerValueBenefitLink + ) + + // loop through the data layer and remove any events that are gtm + + const bfDataLayer = window.dataLayer.filter( + item => !item.event.includes('gtm') + ) + + const cleanBfDataLayer = bfDataLayer.map(item => { + removeID(item) + return item + }) + + expect(cleanBfDataLayer).to.deep.equal( + dataLayerValues ) - pageObjects - .expandAll() - .click() - .then(() => { - // check last page change event - const ev = [ - ...window.dataLayer.filter( - x => - x?.event === - dataLayerValueOpenAllAccordions.event - ), - ] - - // we ignore dedup here so there can be multiple fires - removeID(ev[1]) - - expect(ev[1].bfData.accordionsOpen).to.equal( - !dataLayerValueOpenAllAccordions.bfData - .accordionsOpen - ) - - pageObjects - .accordionByTitle( - enResults.eligible.eligible_benefits[0] - ) - .click() - cy.wrap(window.dataLayer).should( - dataLayer => { - const matchingEvents = dataLayer.filter( - x => - x?.event === - dataLayerValueAccordionOpen.event - ) - assert.isNotEmpty( - matchingEvents, - 'bf_accordion_open event is triggered' - ) - } - ) - - // check last page change event - cy.wrap(window.dataLayer).then(dataLayer => { - const ev = dataLayer.filter( - x => - x?.event === - dataLayerValueAccordionOpen.event - )[0] - - removeID(ev) - - expect(ev).to.deep.equal( - dataLayerValueAccordionOpen - ) - }) - - pageObjects - .benefitsAccordionLink( - enResults.eligible.eligible_benefits[0] - ) - .invoke('removeAttr', 'href') - .click() - .then(() => { - const ev = [ - ...window.dataLayer.filter( - x => - x?.event === - dataLayerValueBenefitLink.event - ), - ] - // delete ev[0]['gtm.uniqueEventId'] - removeID(ev[0]) - expect(ev[0]).to.deep.equal( - dataLayerValueBenefitLink - ) - - // loop through the data layer and remove any events that are gtm - - const bfDataLayer = - window.dataLayer.filter( - item => !item.event.includes('gtm') - ) - - const cleanBfDataLayer = bfDataLayer.map( - item => { - removeID(item) - return item - } - ) - - expect(cleanBfDataLayer).to.deep.equal( - dataLayerValues - ) - }) - }) }) }) }) }) + }) }) + }) }) }) }) diff --git a/benefit-finder/cypress/e2e/storybook/error-message-display.cy.js b/benefit-finder/cypress/e2e/storybook/error-message-display.cy.js index 75d79c236..7ae7df6da 100644 --- a/benefit-finder/cypress/e2e/storybook/error-message-display.cy.js +++ b/benefit-finder/cypress/e2e/storybook/error-message-display.cy.js @@ -6,11 +6,11 @@ import * as EN_DOLO_MOCK_DATA from '../../../../benefit-finder/src/shared/api/mo import * as EN_LOCALE_DATA from '../../../../benefit-finder/src/shared/locales/en/en.json' import 'cypress-plugin-tab' -const dob = utils.getDateByOffset(-(18 * 365.2425 - 1)) -const relation = +const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) +const relationship = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[1].fieldset.inputs[0].inputCriteria.values[1].value -const status = +const maritalStatus = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[2].fieldset.inputs[0].inputCriteria.values[1].value @@ -30,7 +30,7 @@ const alertDisplayState = { beforeEach(() => { cy.visit(utils.storybookUri) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() + cy.clickButton(EN_LOCALE_DATA.intro.button) }) describe('Validate correct error messages display for negative scenarios', () => { @@ -48,7 +48,7 @@ describe('Validate correct error messages display for negative scenarios', () => it('Should display error message when user attempts to move forward without completing required field', () => { // expect when a user selects continue the focus is made on the error notice at the top - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) cy.focused().should('have.class', 'usa-alert--error') // expect the error notice to be visible if errors are present @@ -63,7 +63,7 @@ describe('Validate correct error messages display for negative scenarios', () => }) it('Should have a list of errors', () => { - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) cy.focused().should('have.class', 'usa-alert--error').tab() pageObjects.bfAlertList().then(() => { pageObjects.bfAlertListItem().should('have.length.above', 0) @@ -71,7 +71,7 @@ describe('Validate correct error messages display for negative scenarios', () => }) it('Should have a list of errors that link to the invalid fields', () => { - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) cy.focused().should('have.class', 'usa-alert--error').tab() // expect the first tabbable item in the list to be the first error link pageObjects.bfAlertList().then(() => { @@ -88,7 +88,7 @@ describe('Validate correct error messages display for negative scenarios', () => it('Should allow tabbing to the next error message', () => { // expect when a user tabs from the focus error they can tab any other error notices in the form - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) cy.focused().should('have.class', 'usa-alert--error').tab() pageObjects.bfAlertList().then(() => { pageObjects.bfAlertListItem().then(errors => { @@ -101,7 +101,7 @@ describe('Validate correct error messages display for negative scenarios', () => it('Should hide the error message if field error is resolved', () => { // expect when a user tabs from the focus error they can tab any other error notices in the form - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) cy.focused().should('have.class', 'usa-alert--error').tab() pageObjects.bfAlertList().then(() => { pageObjects.bfAlertListItem().then(errors => { @@ -109,8 +109,11 @@ describe('Validate correct error messages display for negative scenarios', () => errorsArray.forEach(() => cy.focused().tab()) cy.focused().should('have.class', 'usa-input--error') // expect when a user has resolved all errors the top level error notices is not visible or accessible - utils.dataInputs({ dob, relation, status }) - + cy.fillDetailsAboutTheApplicant({ + dateOfBirth, + relationship, + maritalStatus, + }) // expect the error notice to be hidden if errors are present pageObjects.benefitSectionAlert().should('have.class', 'display-none') }) @@ -119,7 +122,7 @@ describe('Validate correct error messages display for negative scenarios', () => it('Should not allow moving forward by clicking continue when error banner is present', () => { // expect when a user tabs from the focus error they can tab any other error notices in the form - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) cy.focused().should('have.class', 'usa-alert--error').tab() pageObjects.bfAlertList().then(() => { pageObjects.bfAlertListItem().then(errors => { @@ -136,16 +139,15 @@ describe('Validate correct error messages display for negative scenarios', () => } // expect when a user has resolved all errors the top level error notices is not visible or accessible - utils.dataInputs({ relation }) + cy.fillDetailsAboutTheApplicant({ + relationship, + }) // expect the error notice to be visible if errors are present pageObjects .benefitSectionAlert() .should('not.have.class', 'display-none') - pageObjects - .button() - .contains(EN_LOCALE_DATA.buttonGroup[1].value) - .click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) cy.focused().should('have.class', 'usa-alert--error') // expect date DOM structure alert to be accessible for (const attr in alertDisplayState) { @@ -159,7 +161,7 @@ describe('Validate correct error messages display for negative scenarios', () => }) it('Should include error count in alert', () => { - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) pageObjects .bfAlertList() .find('li') @@ -171,7 +173,7 @@ describe('Validate correct error messages display for negative scenarios', () => }) it('Should include list of error links and clicking on a link navigates to a specific field', () => { - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) pageObjects .bfAlertList() @@ -195,7 +197,7 @@ describe('Validate correct error messages display for negative scenarios', () => }) it('Should validate error label content overrides', () => { - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) const relationErrorMessageOvveride = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0] diff --git a/benefit-finder/cypress/e2e/storybook/modal.js b/benefit-finder/cypress/e2e/storybook/modal.cy.js similarity index 77% rename from benefit-finder/cypress/e2e/storybook/modal.js rename to benefit-finder/cypress/e2e/storybook/modal.cy.js index 2023ccd0f..208b09abd 100644 --- a/benefit-finder/cypress/e2e/storybook/modal.js +++ b/benefit-finder/cypress/e2e/storybook/modal.cy.js @@ -1,30 +1,30 @@ -/// +/// import * as utils from '../../support/utils.js' import * as EN_LOCALE_DATA from '../../../src/shared/locales/en/en.json' import * as EN_DOLO_MOCK_DATA from '../../../src/shared/api/mock-data/current.json' import { pageObjects } from '../../support/pageObjects.js' -const dob = utils.getDateByOffset(-(18 * 365.2425 - 1)) -const dod = utils.getDateByOffset(-30) +const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) +const dateOfDeath = utils.getDateByOffset(-30) -const relation = +const relationship = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[1].fieldset.inputs[0].inputCriteria.values[1].value -const status = +const maritalStatus = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[2].fieldset.inputs[0].inputCriteria.values[1].value describe('Validate scrolling when modal is open', () => { it('Should disable body from scrolling when model is open', () => { cy.visit(utils.storybookUri) - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - utils.dataInputs({ dob, relation, status }) - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - utils.dataInputs({ dod }) - // open modal - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.navigateToModal({ + dateOfBirth, + relationship, + maritalStatus, + dateOfDeath, + }) // close when clicked off modal cy.get('.ReactModal__Overlay').click('topRight') @@ -35,7 +35,7 @@ describe('Validate scrolling when modal is open', () => { ) // these types run successfully but do not trigger movement in the window // open modal - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) // confirm type works for modal cy.get('#benefit-finder-modal').type( @@ -77,7 +77,7 @@ describe('Validate scrolling when modal is open', () => { expect($w.scrollY).to.be.greaterThan(scrollYPosition) }) - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() + cy.clickButton(EN_LOCALE_DATA.buttonGroup[1].value) // confirm we are back at the top cy.window().then($w => { diff --git a/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js b/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js index 60c4d1f3e..6325772b7 100644 --- a/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js +++ b/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js @@ -1,6 +1,5 @@ /// -import { pageObjects } from '../../support/pageObjects' import * as utils from '../../support/utils' import * as EN_DOLO_MOCK_DATA from '../../../../benefit-finder/src/shared/api/mock-data/current.json' import * as BENEFITS_ELIBILITY_DATA from '../../fixtures/benefits-eligibility.json' @@ -8,16 +7,17 @@ import content from '../../../../benefit-finder/src/shared/api/mock-data/current import * as EN_LOCALE_DATA from '../../../../benefit-finder/src/shared/locales/en/en.json' const { data } = JSON.parse(content) -const relationshipId = - EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section - .fieldsets[1].fieldset.inputs[0].inputCriteria.id -const relationshipValue = +// 18 years ago minus one day - applicant under 18 years old +// 1 day = 365.2425 (accounts for leap year) +const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) +// Date of death - 30 days ago +const dateOfDeath = utils.getDateByOffset(-30) + +const relationship = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[1].fieldset.inputs[0].inputCriteria.values[1].value -const maritalStatusId = - EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section - .fieldsets[2].fieldset.inputs[0].inputCriteria.id -const maritalStatusValue = + +const maritalStatus = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section .fieldsets[2].fieldset.inputs[0].inputCriteria.values[1].value const citizenshipStatusId = @@ -32,65 +32,27 @@ const publicSafetyOfficerId = describe('Validate correct eligibility benefits display based on selected criteria/options', () => { it('Should render Survivor Benefits for Child benefit accordion correctly based on selected cretiria options', () => { - // 18 years ago minus one day - applicant under 18 years old - // 1 day = 365.2425 (accounts for leap year) - const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) - cy.visit('/iframe.html?args=&id=app--primary&viewMode=story') - - pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() - cy.enterDate(dateOfBirth.month, dateOfBirth.day, dateOfBirth.year) - pageObjects.fieldsetById(relationshipId).select(relationshipValue) - pageObjects.fieldsetById(maritalStatusId).select(maritalStatusValue) - - pageObjects.fieldsetById(citizenshipStatusId).eq(0).click({ force: true }) - - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - - // Date of death - 30 days ago - const dateOfDeath = utils.getDateByOffset(-30) - cy.enterDate(dateOfDeath.month, dateOfDeath.day, dateOfDeath.year) - - pageObjects - .fieldsetById(paidIntoSocialSecurityId) - .eq(0) - .click({ force: true }) - - pageObjects.fieldsetById(publicSafetyOfficerId).eq(0).click({ force: true }) - - pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - - pageObjects - .modalButtonGroup() - .contains(EN_LOCALE_DATA.reviewSelectionModal.buttonGroup[1].value) - .click() - - pageObjects - .accordionByTitle(EN_DOLO_MOCK_DATA.data.benefits[23].benefit.title) - .click() - .parent() - .parent() - .parent() - .find('.bf-key-eligibility-criteria-list li') - .should( - 'contain', - EN_DOLO_MOCK_DATA.data.benefits[23].benefit.eligibility[0].label - ) - .and( - 'contain', - EN_DOLO_MOCK_DATA.data.benefits[23].benefit.eligibility[1].label - ) - .and( - 'contain', - EN_DOLO_MOCK_DATA.data.benefits[23].benefit.eligibility[2].label - ) - .and( - 'contain', - EN_DOLO_MOCK_DATA.data.benefits[23].benefit.eligibility[3].label - ) - .and( - 'contain', - EN_DOLO_MOCK_DATA.data.benefits[23].benefit.eligibility[4].label - ) + cy.visit(utils.storybookUri) + + cy.navigateToBenefitResultsPage({ + dateOfBirth, + relationship, + maritalStatus, + optionalApplicantFields: { + [citizenshipStatusId]: 0, // Select "Yes" for citizenship + }, + dateOfDeath, + optionalDeceasedFields: { + [paidIntoSocialSecurityId]: 0, // Select "Yes" for "Did deceased ever work and pay U.S. Social Security taxes?" + [publicSafetyOfficerId]: 0, // Select "Yes" for "Was the deceased a public safety officer who died in the line of duty" + }, + }) + + const accordionTitle = EN_DOLO_MOCK_DATA.data.benefits[23].benefit.title + const eligibilityLabels = + EN_DOLO_MOCK_DATA.data.benefits[23].benefit.eligibility.map(e => e.label) + + cy.validateAccordionContent(accordionTitle, eligibilityLabels) }) it('qa scenario 1 Covid EN - Verify correct benefit results for query values that includes covid in search parameter of URL', () => { @@ -103,55 +65,20 @@ describe('Validate correct eligibility benefits display based on selected criter cy.visit(`${utils.storybookUri}${scenario}`) - pageObjects - .accordionHeading() - .filter(':visible') - .should('have.length', enResults.eligible.length) - .and( - 'contain', - EN_LOCALE_DATA.resultsView.benefitAccordion.eligibleStatusLabels[0] - ) - .and('contain', enResults.eligible.eligible_benefits[0]) - .and('contain', enResults.eligible.eligible_benefits[1]) - .and('contain', enResults.eligible.eligible_benefits[2]) - - pageObjects - .benefitResultsView() - .invoke('attr', 'data-testid') - .should('eq', 'bf-result-view') - - pageObjects - .benefitResultsView() - .invoke('attr', 'data-test-results-view') - .should('eq', 'bf-eligible-view') - - pageObjects - .benefitResultsView() - .invoke('attr', 'data-test-results-view-criteria-values') - .should('eq', `${selectDataLength}`) - - pageObjects - .benefitResultsView() - .invoke('attr', 'data-test-results-view-benefits') - .should('eq', `${benefitsCount}`) - - pageObjects - .benefitResultsView() - .invoke('attr', 'data-test-results-view-eligible') - .should('eq', `${enResults.eligible.length}`) - - pageObjects - .benefitResultsView() - .invoke('attr', 'data-test-results-view-more-info') - .should('eq', `${enResults.moreInformationNeeded.length}`) - - pageObjects - .benefitResultsView() - .invoke('attr', 'data-test-results-view-not-eligible') - .should( - 'eq', - `${benefitsCount - enResults.eligible.length - enResults.moreInformationNeeded.length}` - ) + // Validate accordion headings + cy.validateAccordionHeadings( + enResults.eligible.length, + enResults.eligible.eligible_benefits, + EN_LOCALE_DATA.resultsView.benefitAccordion.eligibleStatusLabels[0] + ) + + // Validate results view attributes + cy.validateResultsViewAttributes( + selectDataLength, + benefitsCount, + enResults.eligible.length, + enResults.moreInformationNeeded.length + ) }) it('QA scenario 2 Veteran EN - Verify correct benefit results for query values that includes veteran in search parameter of URL', () => { @@ -161,15 +88,12 @@ describe('Validate correct eligibility benefits display based on selected criter cy.visit(`${utils.storybookUri}${scenario}`) - pageObjects - .accordionHeading() - .filter(':visible') - .should('have.length', enResults.eligible.length) - .and( - 'contain', - EN_LOCALE_DATA.resultsView.benefitAccordion.eligibleStatusLabels[0] - ) - .and('contain', enResults.eligible.eligible_benefits[0]) + // Validate accordion headings + cy.validateAccordionHeadings( + enResults.eligible.length, + enResults.eligible.eligible_benefits, + EN_LOCALE_DATA.resultsView.benefitAccordion.eligibleStatusLabels[0] + ) }) it('QA scenario 3 Coal Miner EN - Verify correct benefit results for query values that includes Coal Miner in search parameter of URL', () => { @@ -179,23 +103,18 @@ describe('Validate correct eligibility benefits display based on selected criter cy.visit(`${utils.storybookUri}${scenario}`) - pageObjects - .accordionHeading() - .filter(':visible') - .should('have.length', enResults.eligible.length) - .and( - 'contain', - EN_LOCALE_DATA.resultsView.benefitAccordion.eligibleStatusLabels[0] - ) - .and('contain', enResults.eligible.eligible_benefits[0]) + cy.validateAccordionHeadings( + enResults.eligible.length, + enResults.eligible.eligible_benefits, + EN_LOCALE_DATA.resultsView.benefitAccordion.eligibleStatusLabels[0] + ) }) it('Should display green check icons on eligible benefits', () => { const selectedData = BENEFITS_ELIBILITY_DATA.scenario_2_veteran.en.param const scenario = utils.encodeURIFromObject(selectedData) cy.visit(`${utils.storybookUri}${scenario}`) - pageObjects.expandAll().click() - pageObjects.iconGreenCheck().should('exist') + cy.validateGreenCheckIcons(selectedData) }) it('Should display Zero benefit view when no benefit are eligible', () => { @@ -204,17 +123,10 @@ describe('Validate correct eligibility benefits display based on selected criter const scenario = utils.encodeURIFromObject(selectedData) cy.visit(`${utils.storybookUri}${scenario}`) - pageObjects - .zeroBenefitsViewHeading() - .should('contain', EN_LOCALE_DATA.resultsView.zeroBenefits.heading) - - pageObjects - .accordionHeading() - .filter(':visible') - .should('have.length', enResults.eligible.length) - - pageObjects - .seeAllBenefitsButton() - .should('contain', EN_LOCALE_DATA.resultsView.zeroBenefits.cta) + cy.validateZeroBenefitsView( + enResults, + EN_LOCALE_DATA.resultsView.zeroBenefits.heading, + EN_LOCALE_DATA.resultsView.zeroBenefits.cta + ) }) -}) \ No newline at end of file +}) diff --git a/benefit-finder/cypress/support/commands.js b/benefit-finder/cypress/support/commands.js index 398334da6..e6f77cf0b 100644 --- a/benefit-finder/cypress/support/commands.js +++ b/benefit-finder/cypress/support/commands.js @@ -25,9 +25,250 @@ // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) import { pageObjects } from './pageObjects' +import * as EN_DOLO_MOCK_DATA from '../../../benefit-finder/src/shared/api/mock-data/current.json' +import * as EN_LOCALE_DATA from '../../../benefit-finder/src/shared/locales/en/en.json' + +const maritalStatusId = + EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section + .fieldsets[2].fieldset.inputs[0].inputCriteria.id +const relationshipId = + EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0].section + .fieldsets[1].fieldset.inputs[0].inputCriteria.id +const startFindingBenefitsButton = EN_LOCALE_DATA.intro.button +const nextButtonGroup = EN_LOCALE_DATA.buttonGroup[1].value +const getYourResultsButton = + EN_LOCALE_DATA.reviewSelectionModal.buttonGroup[1].value Cypress.Commands.add('enterDate', (month, day, year) => { pageObjects.benefitMemorableDateById('month').select(month) pageObjects.benefitMemorableDateById('day').type(day) pageObjects.benefitMemorableDateById('year').type(year) }) + +Cypress.Commands.add('clickButton', buttonText => { + pageObjects.button().contains(buttonText).click() +}) + +Cypress.Commands.add('fillDetailsAboutTheApplicant', data => { + const { dateOfBirth, relationship, maritalStatus, optionalFields = {} } = data + + // Fill mandatory fields if provided + if (dateOfBirth) { + cy.enterDate(dateOfBirth.month, dateOfBirth.day, dateOfBirth.year) + } + + if (relationship) { + cy.selectDropdownValue(relationshipId, relationship) + } + + if (maritalStatus) { + cy.selectDropdownValue(maritalStatusId, maritalStatus) + } + + // Fill optional fields dynamically + Object.entries(optionalFields).forEach(([fieldId, optionIndex]) => { + cy.selectRadioByIdAndIndex(fieldId, optionIndex) + }) +}) + +Cypress.Commands.add('fillDetailsAboutTheDeceased', data => { + const { dateOfDeath, optionalFields = {}, additionalFields = {} } = data + + // Fill mandatory fields if provided + if (dateOfDeath) { + cy.enterDate(dateOfDeath.month, dateOfDeath.day, dateOfDeath.year) + } + + // Fill optional "Yes/No" fields dynamically + Object.entries(optionalFields).forEach(([fieldId, optionIndex]) => { + cy.selectRadioByIdAndIndex(fieldId, optionIndex) + }) + + // Fill additional dropdown fields displayed on certain conditions + Object.entries(additionalFields).forEach(([fieldId, value]) => { + cy.selectDropdownValue(fieldId, value) + }) +}) + +Cypress.Commands.add('navigateToAboutTheApplicantPage', () => { + cy.clickButton(startFindingBenefitsButton) + pageObjects.benefitMemorableDateById('month').should('exist') +}) + +Cypress.Commands.add( + 'navigateToAboutTheDeceasedPage', + ({ dateOfBirth, relationship, maritalStatus, optionalFields = {} }) => { + cy.navigateToAboutTheApplicantPage() + cy.fillDetailsAboutTheApplicant({ + dateOfBirth, + relationship, + maritalStatus, + optionalFields, + }) + cy.clickButton(nextButtonGroup) // Navigate to the next step + } +) + +Cypress.Commands.add( + 'navigateToModal', + ({ + dateOfBirth, + relationship, + maritalStatus, + optionalApplicantFields = {}, + dateOfDeath, + optionalDeceasedFields = {}, + additionalDeceasedFields = {}, + }) => { + cy.navigateToAboutTheDeceasedPage({ + dateOfBirth, + relationship, + maritalStatus, + optionalFields: optionalApplicantFields, + }) + cy.fillDetailsAboutTheDeceased({ + dateOfDeath, + optionalFields: optionalDeceasedFields, + additionalFields: additionalDeceasedFields, + }) + cy.clickButton(nextButtonGroup) // Proceed to open modal + pageObjects + .button(EN_LOCALE_DATA.reviewSelectionModal.buttonGroup[0].value) + .should('exist') + } +) + +Cypress.Commands.add( + 'navigateToBenefitResultsPage', + ({ + dateOfBirth, + relationship, + maritalStatus, + optionalApplicantFields = {}, + dateOfDeath, + optionalDeceasedFields = {}, + additionalDeceasedFields = {}, + }) => { + cy.navigateToAboutTheDeceasedPage({ + dateOfBirth, + relationship, + maritalStatus, + optionalFields: optionalApplicantFields, + }) + cy.fillDetailsAboutTheDeceased({ + dateOfDeath, + optionalFields: optionalDeceasedFields, + additionalFields: additionalDeceasedFields, + }) + cy.clickButton(nextButtonGroup) // Open modal + cy.clickButton(getYourResultsButton) + } +) + +Cypress.Commands.add('selectDropdownValue', (fieldId, value) => { + pageObjects.fieldsetById(fieldId).select(value) +}) + +Cypress.Commands.add('selectRadioByIdAndIndex', (fieldId, optionIndex = 0) => { + pageObjects.fieldsetById(fieldId).eq(optionIndex).click({ force: true }) +}) + +Cypress.Commands.add('validateAccordionContent', (accordionTitle, labels) => { + pageObjects + .accordionByTitle(accordionTitle) + .click() + .parent() + .parent() + .parent() + .find('.bf-key-eligibility-criteria-list li') + .each(($li, index) => { + cy.wrap($li).should('contain', labels[index]) + }) +}) + +// Validate accordion headings +Cypress.Commands.add( + 'validateAccordionHeadings', + (visibleHeadingsLength, eligibleBenefits, eligibleLabel) => { + pageObjects + .accordionHeading() + .filter(':visible') + .should('have.length', visibleHeadingsLength) + .and('contain', eligibleLabel) + // Dynamically validate each eligible benefit + eligibleBenefits.forEach(benefit => { + pageObjects + .accordionHeading() + .filter(':visible') + .should('contain', benefit) + }) + } +) + +Cypress.Commands.add( + 'validateAriaInvalid', + (methodName, expectedValue, ...args) => { + // Dynamically call the pageObjects method and retrieve the element + pageObjects[methodName](...args) + .invoke('attr', 'aria-invalid') + .should('eq', expectedValue) + } +) + +// Validate benefit results view attributes +Cypress.Commands.add( + 'validateResultsViewAttributes', + (selectDataLength, benefitsCount, eligibleCount, moreInfoCount) => { + pageObjects + .benefitResultsView() + .should('exist') // Ensure the element exists + .then(resultsView => { + cy.wrap(resultsView) + .invoke('attr', 'data-testid') + .should('eq', 'bf-result-view') + + cy.wrap(resultsView) + .invoke('attr', 'data-test-results-view') + .should('eq', 'bf-eligible-view') + + cy.wrap(resultsView) + .invoke('attr', 'data-test-results-view-criteria-values') + .should('eq', `${selectDataLength}`) + + cy.wrap(resultsView) + .invoke('attr', 'data-test-results-view-benefits') + .should('eq', `${benefitsCount}`) + + cy.wrap(resultsView) + .invoke('attr', 'data-test-results-view-eligible') + .should('eq', `${eligibleCount}`) + + cy.wrap(resultsView) + .invoke('attr', 'data-test-results-view-more-info') + .should('eq', `${moreInfoCount}`) + + cy.wrap(resultsView) + .invoke('attr', 'data-test-results-view-not-eligible') + .should('eq', `${benefitsCount - eligibleCount - moreInfoCount}`) + }) + } +) + +Cypress.Commands.add('validateGreenCheckIcons', () => { + pageObjects.expandAll().click() + pageObjects.iconGreenCheck().should('exist') +}) + +Cypress.Commands.add( + 'validateZeroBenefitsView', + (enResults, zeroBenefitsHeading, zeroBenefitsCTA) => { + pageObjects.zeroBenefitsViewHeading().should('contain', zeroBenefitsHeading) + + pageObjects + .accordionHeading() + .filter(':visible') + .should('have.length', enResults.eligible.length) + + pageObjects.seeAllBenefitsButton().should('contain', zeroBenefitsCTA) + } +) diff --git a/benefit-finder/cypress/support/utils.js b/benefit-finder/cypress/support/utils.js index f85803edb..bd421e993 100644 --- a/benefit-finder/cypress/support/utils.js +++ b/benefit-finder/cypress/support/utils.js @@ -1,6 +1,3 @@ -import { pageObjects } from '../support/pageObjects' -import * as EN_DOLO_MOCK_DATA from '../../../benefit-finder/src/shared/api/mock-data/current.json' - export function getDateByOffset(offset) { const date = new Date(Date.now()) const n = Number(offset) @@ -30,26 +27,3 @@ export const encodeURIFromObject = obj => { // can be used by all the test that are visiting in storymode export const storybookUri = `/iframe.html?args=&id=app--primary&viewMode=story&` - -export const dataInputs = ({ dob, relation, status, dod }) => { - // input date of birth - dob && cy.enterDate(dob.month, dob.day, dob.year) - // input relation to deceased - relation && - pageObjects - .fieldsetById( - EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0] - .section.fieldsets[1].fieldset.inputs[0].inputCriteria.id - ) - .select(relation) - // input marital status - status && - pageObjects - .fieldsetById( - EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0] - .section.fieldsets[2].fieldset.inputs[0].inputCriteria.id - ) - .select(status) - // input date of death - dod && cy.enterDate(dod.month, dod.day, dod.year) -} From 65227e90be16c7fc162ba953e88def6655dbd4f1 Mon Sep 17 00:00:00 2001 From: Nehemiah Abuga <121119072+nehemiah-abuga@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:01:13 -0700 Subject: [PATCH 02/65] PXBF-1598-enhance-cypress-tests-custom-commands: fix config file remove unused page objects fix config file remove unused page objects --- benefit-finder/cypress.config.js | 2 +- benefit-finder/cypress/e2e/storybook/modal.cy.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/benefit-finder/cypress.config.js b/benefit-finder/cypress.config.js index 8e6a60e09..74db8b198 100644 --- a/benefit-finder/cypress.config.js +++ b/benefit-finder/cypress.config.js @@ -1,4 +1,4 @@ -const { defineConfig } = require('Cypress') +const { defineConfig } = require('cypress') module.exports = defineConfig({ experimentalWebKitSupport: true, diff --git a/benefit-finder/cypress/e2e/storybook/modal.cy.js b/benefit-finder/cypress/e2e/storybook/modal.cy.js index 208b09abd..6936b235a 100644 --- a/benefit-finder/cypress/e2e/storybook/modal.cy.js +++ b/benefit-finder/cypress/e2e/storybook/modal.cy.js @@ -3,7 +3,6 @@ import * as utils from '../../support/utils.js' import * as EN_LOCALE_DATA from '../../../src/shared/locales/en/en.json' import * as EN_DOLO_MOCK_DATA from '../../../src/shared/api/mock-data/current.json' -import { pageObjects } from '../../support/pageObjects.js' const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) const dateOfDeath = utils.getDateByOffset(-30) From e4d0535fa2e16e2691eaa61ef07995ad4752cd74 Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 11:07:30 -0500 Subject: [PATCH 03/65] Redo work after release --- .github/workflows/build-and-deploy.yml | 3 +-- scripts/drush-post-deploy.sh | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index c947aada7..20f8ed1fa 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -222,6 +222,5 @@ jobs: cf add-network-policy ${PROJECT}-waf-${BRANCH} ${PROJECT}-cms-${BRANCH} -s ${PROJECT}-${BRANCH} -o ${CF_ORG} --protocol tcp --port 61443 cf map-route benefit-finder-cms-${BRANCH} apps.internal --hostname benefit-finder-cms-${BRANCH} --app-protocol http1 cd .. - ## sed -i "s#TU_PASS#${TEST_USER_PASS}#g" ./scripts/drush-post-deploy.sh - ## cat ./scripts/drush-post-deploy.sh + sed -i "s#TU_PASS#${TEST_USER_PASS}#g" ./scripts/drush-post-deploy.sh source ./scripts/pipeline/cloud-gov-post-deploy.sh diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index 3e1c41892..60a074161 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -10,4 +10,11 @@ drush updatedb --no-cache-clear -y drush cim --partial --source=modules/custom/usagov_benefit_finder/configuration -y drush cr drush state:set system.maintenance_mode 0 -y +drush user:create test_test --password="TU_PASS" +drush upwd --password="TU_PASS" gene_chi +drush upwd --password="TU_PASS" scott_queen +drush upwd --password="TU_PASS" nehemia_abuga +drush upwd --password="TU_PASS" diego_cob +drush upwd --password="TU_PASS" cindy_fong +drush upwd --password="TU_PASS" ernie_deeb echo "Post deploy finished!" From 9a9c71e74861ad36283abb1c99ed53f64222b76d Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 11:19:01 -0500 Subject: [PATCH 04/65] Add another test user to see if it gets to end of script --- scripts/drush-post-deploy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index 60a074161..9bac1f87b 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -17,4 +17,5 @@ drush upwd --password="TU_PASS" nehemia_abuga drush upwd --password="TU_PASS" diego_cob drush upwd --password="TU_PASS" cindy_fong drush upwd --password="TU_PASS" ernie_deeb +drush user:create xtest_test --password="TU_PASS" echo "Post deploy finished!" From b0eea7402510a9814743cce3f36a35a23e1224db Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 11:41:31 -0500 Subject: [PATCH 05/65] Check all command make order changes --- scripts/drush-post-deploy.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index 9bac1f87b..80b6b010e 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -9,13 +9,13 @@ drush cr drush updatedb --no-cache-clear -y drush cim --partial --source=modules/custom/usagov_benefit_finder/configuration -y drush cr +drush user:password gene_chi "TU_PASS" +drush user:password scott_queen "TU_PASS" +drush user:password nehemia_abuga "TU_PASS" +drush user:password diego_cob "TU_PASS" +drush user:password cindy_fong "TU_PASS" +drush user:password ernie_deeb "TU_PASS" drush state:set system.maintenance_mode 0 -y -drush user:create test_test --password="TU_PASS" -drush upwd --password="TU_PASS" gene_chi -drush upwd --password="TU_PASS" scott_queen -drush upwd --password="TU_PASS" nehemia_abuga -drush upwd --password="TU_PASS" diego_cob -drush upwd --password="TU_PASS" cindy_fong -drush upwd --password="TU_PASS" ernie_deeb -drush user:create xtest_test --password="TU_PASS" +drush user:create test_test --password="TU_PASS" || true +drush user:create xtest_test --password="TU_PASS" || true echo "Post deploy finished!" From df1ca9220f5ccf4e412e44f1d630571e0e2e6cb4 Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 12:01:37 -0500 Subject: [PATCH 06/65] Make sure script ends in new line --- scripts/drush-post-deploy.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index 80b6b010e..86e6767e3 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -19,3 +19,5 @@ drush state:set system.maintenance_mode 0 -y drush user:create test_test --password="TU_PASS" || true drush user:create xtest_test --password="TU_PASS" || true echo "Post deploy finished!" + + From d2b34f093525177a7994a34ddb42971e6d35ccee Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 13:25:41 -0500 Subject: [PATCH 07/65] Add set x's to add verbosity --- scripts/drush-post-deploy.sh | 2 +- scripts/pipeline/cloud-gov-post-deploy.sh | 2 ++ scripts/pipeline/cloud-gov-remote-command.sh | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index 86e6767e3..0b7b020af 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash - +set -x ## Make sure the last line has a new line or the pipeline script won't read it. ## It reads lines based on new lines. diff --git a/scripts/pipeline/cloud-gov-post-deploy.sh b/scripts/pipeline/cloud-gov-post-deploy.sh index 27203c6ed..c478420f3 100755 --- a/scripts/pipeline/cloud-gov-post-deploy.sh +++ b/scripts/pipeline/cloud-gov-post-deploy.sh @@ -1,4 +1,6 @@ #!/bin/bash +set -x + ## Set the root directory in the pipeline ROOT_DIR=$(git rev-parse --show-toplevel) diff --git a/scripts/pipeline/cloud-gov-remote-command.sh b/scripts/pipeline/cloud-gov-remote-command.sh index f07cc18d6..f81b4b778 100755 --- a/scripts/pipeline/cloud-gov-remote-command.sh +++ b/scripts/pipeline/cloud-gov-remote-command.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x + APP_NAME=$1 command=$2 show_output=$3 @@ -28,7 +30,7 @@ if [ -z "${show_output}" ]; then echo "Running command: '$(echo "${command}" | cut -d' ' -f1,2)'..." { sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" - } #>/dev/null 2>&1 + } >#/dev/null 2>&1 else sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" fi From 0fad89789f5ca11c84530f342cc67b136f2cafed Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 13:32:14 -0500 Subject: [PATCH 08/65] Fix typo in remote command comment out --- scripts/pipeline/cloud-gov-remote-command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pipeline/cloud-gov-remote-command.sh b/scripts/pipeline/cloud-gov-remote-command.sh index f81b4b778..c250c08a8 100755 --- a/scripts/pipeline/cloud-gov-remote-command.sh +++ b/scripts/pipeline/cloud-gov-remote-command.sh @@ -30,7 +30,7 @@ if [ -z "${show_output}" ]; then echo "Running command: '$(echo "${command}" | cut -d' ' -f1,2)'..." { sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" - } >#/dev/null 2>&1 + } #> /dev/null 2>&1 else sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" fi From 6181d66d2c089c5e9d72a0a0c11c3386febc663a Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 13:40:03 -0500 Subject: [PATCH 09/65] Remove the set x --- scripts/drush-post-deploy.sh | 2 +- scripts/pipeline/cloud-gov-post-deploy.sh | 2 +- scripts/pipeline/cloud-gov-remote-command.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index 0b7b020af..86e6767e3 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -x + ## Make sure the last line has a new line or the pipeline script won't read it. ## It reads lines based on new lines. diff --git a/scripts/pipeline/cloud-gov-post-deploy.sh b/scripts/pipeline/cloud-gov-post-deploy.sh index c478420f3..22fbbb918 100755 --- a/scripts/pipeline/cloud-gov-post-deploy.sh +++ b/scripts/pipeline/cloud-gov-post-deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -x + ## Set the root directory in the pipeline diff --git a/scripts/pipeline/cloud-gov-remote-command.sh b/scripts/pipeline/cloud-gov-remote-command.sh index c250c08a8..224ebca11 100755 --- a/scripts/pipeline/cloud-gov-remote-command.sh +++ b/scripts/pipeline/cloud-gov-remote-command.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -x + APP_NAME=$1 command=$2 From 0f5e05f9fc3fa8c8f79bd3787f71a448c43f222f Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 13:49:50 -0500 Subject: [PATCH 10/65] Change up post deploy script --- scripts/pipeline/cloud-gov-post-deploy.sh | 41 +++++++++++++++++++---- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/scripts/pipeline/cloud-gov-post-deploy.sh b/scripts/pipeline/cloud-gov-post-deploy.sh index 22fbbb918..d5b45cced 100755 --- a/scripts/pipeline/cloud-gov-post-deploy.sh +++ b/scripts/pipeline/cloud-gov-post-deploy.sh @@ -1,13 +1,42 @@ #!/bin/bash +# Set the root directory in the pipeline +ROOT_DIR=$(git rev-parse --show-toplevel) + +# Read the drush-post-deploy.sh file line by line +while IFS= read -r command || [[ -n "$command" ]]; do + # Debugging: Print the current command being processed + echo "Processing command: ${command}" + + # Skip comments, empty lines, or echo commands + if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then + echo "Running command: ${command}" + + # Call the cloud-gov-remote-command script with the project and branch + bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null + + # Check for errors and exit if a command fails + if [[ $? -ne 0 ]]; then + echo "Error: Command '${command}' failed!" + exit 1 + fi + fi +done < <(cat "${ROOT_DIR}/scripts/drush-post-deploy.sh") + +# Indicate script completion +echo "All commands processed successfully!" + + +##!/bin/bash + ## Set the root directory in the pipeline -ROOT_DIR=$(git rev-parse --show-toplevel) +#ROOT_DIR=$(git rev-parse --show-toplevel) -while read -r command; do +#while read -r command; do ## Don't send comments, empty lines, or echos. - if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then - bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" #< /dev/null - fi -done < "${ROOT_DIR}/scripts/drush-post-deploy.sh" +## if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then +## bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" #< /dev/null +## fi +## done < "${ROOT_DIR}/scripts/drush-post-deploy.sh" From ea986acb83c65f38dc0d81824d9672ea00ea826d Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 15:59:32 -0500 Subject: [PATCH 11/65] Mute the deploy script, rebuild the drush script with names from secrets --- .github/workflows/build-and-deploy.yml | 19 ++++++++++++++++++- scripts/drush-post-deploy.sh | 16 ++++++++++------ scripts/pipeline/cloud-gov-post-deploy.sh | 13 +++++++------ scripts/pipeline/cloud-gov-remote-command.sh | 2 +- 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 20f8ed1fa..8a668870c 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -212,7 +212,6 @@ jobs: CR_PAT: "${{ secrets.CR_PAT }}" CR_USERNAME: "${{ secrets.CR_USERNAME }}" PROJECT: "${{ secrets.PROJECT }}" - TEST_USER_PASS: "${{ secrets.TEST_USER_PASS }}" run: | source ./scripts/pipeline/cloud-gov-login.sh cd usagov-2021 @@ -222,5 +221,23 @@ jobs: cf add-network-policy ${PROJECT}-waf-${BRANCH} ${PROJECT}-cms-${BRANCH} -s ${PROJECT}-${BRANCH} -o ${CF_ORG} --protocol tcp --port 61443 cf map-route benefit-finder-cms-${BRANCH} apps.internal --hostname benefit-finder-cms-${BRANCH} --app-protocol http1 cd .. + - name: Run post-deploy drush commands and create test users + env: + TEST_USER_PASS: "${{ secrets.TEST_USER_PASS }}" + TEST_USER_NAMES: "$ {{ secrets.TEST_USER_NAMES}}" + run: | + # Split the USERS_LIST into an array + IFS=',' read -ra users <<< "$USERS_LIST" + # Generate the password reset commands + password_reset_commands="" + for user in "${users[@]}"; do + password_reset_commands+="drush user:password $user \"TU_PASS\"\n" + done + # Make replacement in the drush post deploy with user change password commands + sed -i "s|### USER_PASSWORD_RESET_PLACEHOLDER ###|$password_reset_commands|" ./scripts/drush-post-deploy.sh + # Set the test user's passwords to the value of the github secret value for TEST_USER_PASS. sed -i "s#TU_PASS#${TEST_USER_PASS}#g" ./scripts/drush-post-deploy.sh + # For debugging print the contents of the drush post deploy script + cat ./scripts/drush-post-deploy.sh + # Execute the drush command script source ./scripts/pipeline/cloud-gov-post-deploy.sh diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index 86e6767e3..e0bc48a2b 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -9,12 +9,16 @@ drush cr drush updatedb --no-cache-clear -y drush cim --partial --source=modules/custom/usagov_benefit_finder/configuration -y drush cr -drush user:password gene_chi "TU_PASS" -drush user:password scott_queen "TU_PASS" -drush user:password nehemia_abuga "TU_PASS" -drush user:password diego_cob "TU_PASS" -drush user:password cindy_fong "TU_PASS" -drush user:password ernie_deeb "TU_PASS" + +# Placeholder for user password reset commands +### USER_PASSWORD_RESET_PLACEHOLDER ### + +# drush user:password gene_chi "TU_PASS" +# drush user:password scott_queen "TU_PASS" +# drush user:password nehemia_abuga "TU_PASS" +# drush user:password diego_cob "TU_PASS" +# drush user:password cindy_fong "TU_PASS" +# drush user:password ernie_deeb "TU_PASS" drush state:set system.maintenance_mode 0 -y drush user:create test_test --password="TU_PASS" || true drush user:create xtest_test --password="TU_PASS" || true diff --git a/scripts/pipeline/cloud-gov-post-deploy.sh b/scripts/pipeline/cloud-gov-post-deploy.sh index d5b45cced..c56107f1a 100755 --- a/scripts/pipeline/cloud-gov-post-deploy.sh +++ b/scripts/pipeline/cloud-gov-post-deploy.sh @@ -6,27 +6,28 @@ ROOT_DIR=$(git rev-parse --show-toplevel) # Read the drush-post-deploy.sh file line by line while IFS= read -r command || [[ -n "$command" ]]; do # Debugging: Print the current command being processed - echo "Processing command: ${command}" + # echo "Processing command: ${command}" # Skip comments, empty lines, or echo commands if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then - echo "Running command: ${command}" + # echo "Running command: ${command}" # Call the cloud-gov-remote-command script with the project and branch - bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null + bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null >/dev/null 2>&1 # Check for errors and exit if a command fails if [[ $? -ne 0 ]]; then - echo "Error: Command '${command}' failed!" + echo "Error: Command '${command}' failed!" >&2 exit 1 fi fi done < <(cat "${ROOT_DIR}/scripts/drush-post-deploy.sh") # Indicate script completion -echo "All commands processed successfully!" - +# echo "All commands processed successfully!" +exit 0 +#Casey's Original Script ##!/bin/bash diff --git a/scripts/pipeline/cloud-gov-remote-command.sh b/scripts/pipeline/cloud-gov-remote-command.sh index 224ebca11..de49ac845 100755 --- a/scripts/pipeline/cloud-gov-remote-command.sh +++ b/scripts/pipeline/cloud-gov-remote-command.sh @@ -30,7 +30,7 @@ if [ -z "${show_output}" ]; then echo "Running command: '$(echo "${command}" | cut -d' ' -f1,2)'..." { sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" - } #> /dev/null 2>&1 + } > /dev/null 2>&1 else sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" fi From 71e536eaf8d2ea70b50a935488cfe425917be603 Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 16:05:55 -0500 Subject: [PATCH 12/65] Mute the deploy script, rebuild the drush script with names from secrets 2 --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 8a668870c..49dfa75df 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -227,7 +227,7 @@ jobs: TEST_USER_NAMES: "$ {{ secrets.TEST_USER_NAMES}}" run: | # Split the USERS_LIST into an array - IFS=',' read -ra users <<< "$USERS_LIST" + IFS=',' read -ra users <<< "$TEST_USER_NAMES" # Generate the password reset commands password_reset_commands="" for user in "${users[@]}"; do From faa64350da4f77a71ac89b95c21890806e7e70fd Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 16:15:44 -0500 Subject: [PATCH 13/65] Mute the deploy script, rebuild the drush script with names from secrets 3 --- .github/workflows/build-and-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 49dfa75df..a392bbae9 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -224,10 +224,10 @@ jobs: - name: Run post-deploy drush commands and create test users env: TEST_USER_PASS: "${{ secrets.TEST_USER_PASS }}" - TEST_USER_NAMES: "$ {{ secrets.TEST_USER_NAMES}}" + TEST_USER_NAMES: "${{ secrets.TEST_USER_NAMES }}" run: | # Split the USERS_LIST into an array - IFS=',' read -ra users <<< "$TEST_USER_NAMES" + IFS=',' read -ra users <<< "${TEST_USER_NAMES}" # Generate the password reset commands password_reset_commands="" for user in "${users[@]}"; do From 0e78c478708c6149d351502946184ea30d5d45f4 Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 16:22:56 -0500 Subject: [PATCH 14/65] Mute the deploy script, rebuild the drush script with names from secrets 4 --- scripts/pipeline/cloud-gov-post-deploy.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/pipeline/cloud-gov-post-deploy.sh b/scripts/pipeline/cloud-gov-post-deploy.sh index c56107f1a..358ac7930 100755 --- a/scripts/pipeline/cloud-gov-post-deploy.sh +++ b/scripts/pipeline/cloud-gov-post-deploy.sh @@ -6,25 +6,25 @@ ROOT_DIR=$(git rev-parse --show-toplevel) # Read the drush-post-deploy.sh file line by line while IFS= read -r command || [[ -n "$command" ]]; do # Debugging: Print the current command being processed - # echo "Processing command: ${command}" + echo "Processing command: ${command}" # Skip comments, empty lines, or echo commands if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then - # echo "Running command: ${command}" + echo "Running command: ${command}" # Call the cloud-gov-remote-command script with the project and branch - bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null >/dev/null 2>&1 + bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null #>/dev/null 2>&1 # Check for errors and exit if a command fails if [[ $? -ne 0 ]]; then - echo "Error: Command '${command}' failed!" >&2 + echo "Error: Command '${command}' failed!" #>&2 exit 1 fi fi done < <(cat "${ROOT_DIR}/scripts/drush-post-deploy.sh") # Indicate script completion -# echo "All commands processed successfully!" +echo "All commands processed successfully!" exit 0 #Casey's Original Script From 0ff749f0f6d50c2d72db702044768514bbcbc459 Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 16:36:07 -0500 Subject: [PATCH 15/65] Mute the deploy script, rebuild the drush script with names from secrets 5 --- scripts/drush-post-deploy.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index e0bc48a2b..a960e24d2 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -9,16 +9,7 @@ drush cr drush updatedb --no-cache-clear -y drush cim --partial --source=modules/custom/usagov_benefit_finder/configuration -y drush cr - -# Placeholder for user password reset commands ### USER_PASSWORD_RESET_PLACEHOLDER ### - -# drush user:password gene_chi "TU_PASS" -# drush user:password scott_queen "TU_PASS" -# drush user:password nehemia_abuga "TU_PASS" -# drush user:password diego_cob "TU_PASS" -# drush user:password cindy_fong "TU_PASS" -# drush user:password ernie_deeb "TU_PASS" drush state:set system.maintenance_mode 0 -y drush user:create test_test --password="TU_PASS" || true drush user:create xtest_test --password="TU_PASS" || true From 8b646f72d18013053d03c9fbac6742c2863eeefb Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 16:47:12 -0500 Subject: [PATCH 16/65] Combine step --- .github/workflows/build-and-deploy.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index a392bbae9..212812f85 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -212,6 +212,8 @@ jobs: CR_PAT: "${{ secrets.CR_PAT }}" CR_USERNAME: "${{ secrets.CR_USERNAME }}" PROJECT: "${{ secrets.PROJECT }}" + TEST_USER_PASS: "${{ secrets.TEST_USER_PASS }}" + TEST_USER_NAMES: "${{ secrets.TEST_USER_NAMES }}" run: | source ./scripts/pipeline/cloud-gov-login.sh cd usagov-2021 @@ -221,11 +223,6 @@ jobs: cf add-network-policy ${PROJECT}-waf-${BRANCH} ${PROJECT}-cms-${BRANCH} -s ${PROJECT}-${BRANCH} -o ${CF_ORG} --protocol tcp --port 61443 cf map-route benefit-finder-cms-${BRANCH} apps.internal --hostname benefit-finder-cms-${BRANCH} --app-protocol http1 cd .. - - name: Run post-deploy drush commands and create test users - env: - TEST_USER_PASS: "${{ secrets.TEST_USER_PASS }}" - TEST_USER_NAMES: "${{ secrets.TEST_USER_NAMES }}" - run: | # Split the USERS_LIST into an array IFS=',' read -ra users <<< "${TEST_USER_NAMES}" # Generate the password reset commands From 159507b8487eb3ade4fd0487fcec107ff2adfbcd Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 17:14:38 -0500 Subject: [PATCH 17/65] Mute scripts again --- scripts/drush-post-deploy.sh | 3 +-- scripts/pipeline/cloud-gov-post-deploy.sh | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index a960e24d2..618ff6312 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -11,8 +11,7 @@ drush cim --partial --source=modules/custom/usagov_benefit_finder/configuration drush cr ### USER_PASSWORD_RESET_PLACEHOLDER ### drush state:set system.maintenance_mode 0 -y -drush user:create test_test --password="TU_PASS" || true -drush user:create xtest_test --password="TU_PASS" || true +drush user:create test_test --password="TU_PASS" echo "Post deploy finished!" diff --git a/scripts/pipeline/cloud-gov-post-deploy.sh b/scripts/pipeline/cloud-gov-post-deploy.sh index 358ac7930..4dbb09c52 100755 --- a/scripts/pipeline/cloud-gov-post-deploy.sh +++ b/scripts/pipeline/cloud-gov-post-deploy.sh @@ -6,25 +6,25 @@ ROOT_DIR=$(git rev-parse --show-toplevel) # Read the drush-post-deploy.sh file line by line while IFS= read -r command || [[ -n "$command" ]]; do # Debugging: Print the current command being processed - echo "Processing command: ${command}" + # echo "Processing command: ${command}" # Skip comments, empty lines, or echo commands if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then - echo "Running command: ${command}" + # echo "Running command: ${command}" # Call the cloud-gov-remote-command script with the project and branch - bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null #>/dev/null 2>&1 + bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null >/dev/null 2>&1 # Check for errors and exit if a command fails if [[ $? -ne 0 ]]; then - echo "Error: Command '${command}' failed!" #>&2 + # echo "Error: Command '${command}' failed!" >&2 exit 1 fi fi done < <(cat "${ROOT_DIR}/scripts/drush-post-deploy.sh") # Indicate script completion -echo "All commands processed successfully!" +# echo "All commands processed successfully!" exit 0 #Casey's Original Script From efe7298a31a3329ee1ce7e83028d7693d552280e Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 17:38:48 -0500 Subject: [PATCH 18/65] Remove cat and remove muting --- .github/workflows/build-and-deploy.yml | 2 -- scripts/pipeline/cloud-gov-post-deploy.sh | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 212812f85..aeddf66b1 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -234,7 +234,5 @@ jobs: sed -i "s|### USER_PASSWORD_RESET_PLACEHOLDER ###|$password_reset_commands|" ./scripts/drush-post-deploy.sh # Set the test user's passwords to the value of the github secret value for TEST_USER_PASS. sed -i "s#TU_PASS#${TEST_USER_PASS}#g" ./scripts/drush-post-deploy.sh - # For debugging print the contents of the drush post deploy script - cat ./scripts/drush-post-deploy.sh # Execute the drush command script source ./scripts/pipeline/cloud-gov-post-deploy.sh diff --git a/scripts/pipeline/cloud-gov-post-deploy.sh b/scripts/pipeline/cloud-gov-post-deploy.sh index 4dbb09c52..358ac7930 100755 --- a/scripts/pipeline/cloud-gov-post-deploy.sh +++ b/scripts/pipeline/cloud-gov-post-deploy.sh @@ -6,25 +6,25 @@ ROOT_DIR=$(git rev-parse --show-toplevel) # Read the drush-post-deploy.sh file line by line while IFS= read -r command || [[ -n "$command" ]]; do # Debugging: Print the current command being processed - # echo "Processing command: ${command}" + echo "Processing command: ${command}" # Skip comments, empty lines, or echo commands if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then - # echo "Running command: ${command}" + echo "Running command: ${command}" # Call the cloud-gov-remote-command script with the project and branch - bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null >/dev/null 2>&1 + bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null #>/dev/null 2>&1 # Check for errors and exit if a command fails if [[ $? -ne 0 ]]; then - # echo "Error: Command '${command}' failed!" >&2 + echo "Error: Command '${command}' failed!" #>&2 exit 1 fi fi done < <(cat "${ROOT_DIR}/scripts/drush-post-deploy.sh") # Indicate script completion -# echo "All commands processed successfully!" +echo "All commands processed successfully!" exit 0 #Casey's Original Script From b1d8f5bdeca5c4993aa3df24250d5259d57abd04 Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 17:51:02 -0500 Subject: [PATCH 19/65] Remove cat and remove muting 2 --- scripts/drush-post-deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index 618ff6312..b71c5ddd1 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -11,7 +11,8 @@ drush cim --partial --source=modules/custom/usagov_benefit_finder/configuration drush cr ### USER_PASSWORD_RESET_PLACEHOLDER ### drush state:set system.maintenance_mode 0 -y -drush user:create test_test --password="TU_PASS" +drush user:create test_test --password="TU_PASS" || true +drush user:password test_test "TU_PASS" echo "Post deploy finished!" From d7f41b67410d9e29738f8152b3c16986576654d5 Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Thu, 12 Dec 2024 18:12:12 -0500 Subject: [PATCH 20/65] Mute again --- scripts/pipeline/cloud-gov-post-deploy.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/pipeline/cloud-gov-post-deploy.sh b/scripts/pipeline/cloud-gov-post-deploy.sh index 358ac7930..45335121e 100755 --- a/scripts/pipeline/cloud-gov-post-deploy.sh +++ b/scripts/pipeline/cloud-gov-post-deploy.sh @@ -6,25 +6,25 @@ ROOT_DIR=$(git rev-parse --show-toplevel) # Read the drush-post-deploy.sh file line by line while IFS= read -r command || [[ -n "$command" ]]; do # Debugging: Print the current command being processed - echo "Processing command: ${command}" + # echo "Processing command: ${command}" # Skip comments, empty lines, or echo commands if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then - echo "Running command: ${command}" + # echo "Running command: ${command}" # Call the cloud-gov-remote-command script with the project and branch - bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null #>/dev/null 2>&1 + bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null >/dev/null 2>&1 # Check for errors and exit if a command fails if [[ $? -ne 0 ]]; then - echo "Error: Command '${command}' failed!" #>&2 + # echo "Error: Command '${command}' failed!" #>&2 exit 1 fi fi done < <(cat "${ROOT_DIR}/scripts/drush-post-deploy.sh") # Indicate script completion -echo "All commands processed successfully!" +# echo "All commands processed successfully!" exit 0 #Casey's Original Script From 23443a0db76264bdf0d683a864a22021e1a06a65 Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Fri, 13 Dec 2024 09:42:59 -0500 Subject: [PATCH 21/65] Database Restore Pipe Add test user steps 1 --- .github/workflows/database-restore.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/database-restore.yml b/.github/workflows/database-restore.yml index 8df9b15ea..2cf84e8a2 100644 --- a/.github/workflows/database-restore.yml +++ b/.github/workflows/database-restore.yml @@ -47,11 +47,25 @@ jobs: CF_ORG: "${{ secrets.CF_ORG }}" PROJECT: "${{ secrets.PROJECT }}" DATABASE_BACKUP_BASTION_NAME: "${{ secrets.DATABASE_BACKUP_BASTION_NAME }}" - TEST_USER_PASS: "{{ secrets.TEST_USER_PASS }}" + TEST_USER_PASS: "${{ secrets.TEST_USER_PASS }}" + TEST_USER_NAMES: "${{ secrets.TEST_USER_NAMES }}" run: | export S3_FILE_PATH=${{ github.event.inputs.database_file_override }} source ./scripts/pipeline/s3-backup-download.sh source ./scripts/pipeline/database-restore.sh + # Split the USERS_LIST into an array + IFS=',' read -ra users <<< "${TEST_USER_NAMES}" + # Generate the password reset commands + password_reset_commands="" + for user in "${users[@]}"; do + password_reset_commands+="drush user:password $user \"TU_PASS\"\n" + done + # Make replacement in the drush post deploy with user change password commands + sed -i "s|### USER_PASSWORD_RESET_PLACEHOLDER ###|$password_reset_commands|" ./scripts/drush-post-deploy.sh + # Set the test user's passwords to the value of the github secret value for TEST_USER_PASS. + sed -i "s#TU_PASS#${TEST_USER_PASS}#g" ./scripts/drush-post-deploy.sh + # Execute the drush command script + source ./scripts/pipeline/cloud-gov-post-deploy.sh source ./scripts/pipeline/cloud-gov-post-deploy.sh source ./scripts/pipeline/s3-backup-post-restore.sh stopBastion: From 677370f6241c1eb7a4c61496938a5e978352becb Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Fri, 13 Dec 2024 13:07:49 -0500 Subject: [PATCH 22/65] PXBF-1983-spell-checker-updates: new cspell config --- benefit-finder/.cspell.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 benefit-finder/.cspell.json diff --git a/benefit-finder/.cspell.json b/benefit-finder/.cspell.json new file mode 100644 index 000000000..3c907ab7d --- /dev/null +++ b/benefit-finder/.cspell.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", + "version": "0.2", + "ignorePaths": [ + "node_modules", + "themes", + "storybook-static", + "dist", + "coverage", + "build", + "src/shared/locales/es/es.json" + ], + "language": "en", + "dictionaryDefinitions": [ + { "name": "content", "path": "./cspell-dictionary/content.txt" }, + { "name": "dev", "path": "./cspell-dictionary/dev.txt" }, + { "name": "es", "path": "./cspell-dictionary/es.txt" }, + { "name": "project", "path": "./cspell-dictionary/project.txt" } + ], + "dictionaries": [ + "html", + "bash", + "css", + "node", + "content", + "dev", + "es", + "project" + ] +} From 6f0d47242dac691f0468df2817555c6696417e81 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Fri, 13 Dec 2024 13:08:03 -0500 Subject: [PATCH 23/65] PXBF-1983-spell-checker-updates: include cspell with dev packages --- benefit-finder/package-lock.json | 1299 +++++++++++++++++++++++++++--- benefit-finder/package.json | 2 + 2 files changed, 1199 insertions(+), 102 deletions(-) diff --git a/benefit-finder/package-lock.json b/benefit-finder/package-lock.json index 8e3a31a29..d159fc905 100644 --- a/benefit-finder/package-lock.json +++ b/benefit-finder/package-lock.json @@ -35,6 +35,7 @@ "autoprefixer": "^10.4.20", "concurrently": "^9.0.1", "cross-env": "^7.0.3", + "cspell": "^8.16.1", "cypress": "^13.14.1", "cypress-axe": "^1.5.0", "cypress-plugin-tab": "^1.0.5", @@ -1753,6 +1754,573 @@ "node": ">=0.1.90" } }, + "node_modules/@cspell/cspell-bundled-dicts": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.16.1.tgz", + "integrity": "sha512-EkbtoYpmiN9YPfcOoPcMnIrJBZh13mun64jPyyaYhrPPToiU5+CisZ7ZKUBGnqNaatuciMUxwIudhanQJ7Yhnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/dict-ada": "^4.0.5", + "@cspell/dict-al": "^1.0.3", + "@cspell/dict-aws": "^4.0.7", + "@cspell/dict-bash": "^4.1.8", + "@cspell/dict-companies": "^3.1.7", + "@cspell/dict-cpp": "^6.0.2", + "@cspell/dict-cryptocurrencies": "^5.0.3", + "@cspell/dict-csharp": "^4.0.5", + "@cspell/dict-css": "^4.0.16", + "@cspell/dict-dart": "^2.2.4", + "@cspell/dict-django": "^4.1.3", + "@cspell/dict-docker": "^1.1.11", + "@cspell/dict-dotnet": "^5.0.8", + "@cspell/dict-elixir": "^4.0.6", + "@cspell/dict-en_us": "^4.3.28", + "@cspell/dict-en-common-misspellings": "^2.0.7", + "@cspell/dict-en-gb": "1.1.33", + "@cspell/dict-filetypes": "^3.0.8", + "@cspell/dict-flutter": "^1.0.3", + "@cspell/dict-fonts": "^4.0.3", + "@cspell/dict-fsharp": "^1.0.4", + "@cspell/dict-fullstack": "^3.2.3", + "@cspell/dict-gaming-terms": "^1.0.8", + "@cspell/dict-git": "^3.0.3", + "@cspell/dict-golang": "^6.0.17", + "@cspell/dict-google": "^1.0.4", + "@cspell/dict-haskell": "^4.0.4", + "@cspell/dict-html": "^4.0.10", + "@cspell/dict-html-symbol-entities": "^4.0.3", + "@cspell/dict-java": "^5.0.10", + "@cspell/dict-julia": "^1.0.4", + "@cspell/dict-k8s": "^1.0.9", + "@cspell/dict-latex": "^4.0.3", + "@cspell/dict-lorem-ipsum": "^4.0.3", + "@cspell/dict-lua": "^4.0.6", + "@cspell/dict-makefile": "^1.0.3", + "@cspell/dict-markdown": "^2.0.7", + "@cspell/dict-monkeyc": "^1.0.9", + "@cspell/dict-node": "^5.0.5", + "@cspell/dict-npm": "^5.1.14", + "@cspell/dict-php": "^4.0.13", + "@cspell/dict-powershell": "^5.0.13", + "@cspell/dict-public-licenses": "^2.0.11", + "@cspell/dict-python": "^4.2.12", + "@cspell/dict-r": "^2.0.4", + "@cspell/dict-ruby": "^5.0.7", + "@cspell/dict-rust": "^4.0.10", + "@cspell/dict-scala": "^5.0.6", + "@cspell/dict-software-terms": "^4.1.17", + "@cspell/dict-sql": "^2.1.8", + "@cspell/dict-svelte": "^1.0.5", + "@cspell/dict-swift": "^2.0.4", + "@cspell/dict-terraform": "^1.0.6", + "@cspell/dict-typescript": "^3.1.11", + "@cspell/dict-vue": "^3.0.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@cspell/cspell-json-reporter": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-8.16.1.tgz", + "integrity": "sha512-ue1paJ2OE2BjIBQHXFMHnFqJL5xMrE/TLveOntDSCKJw7edCGP4XJA6Q0ZfUgR/ZAP3SYKNPkajEWbDTMfG+XA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/cspell-types": "8.16.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@cspell/cspell-pipe": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.16.1.tgz", + "integrity": "sha512-6N+QZ3y65JRgGrQhZHmaBHESR+nC0J8nySGaYKclit8yk3jLZ/ORw9aoSGIj+dMPzImkNEDh+C1B1zdV4X8W6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@cspell/cspell-resolver": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.16.1.tgz", + "integrity": "sha512-CfVI2JFMwh9/n1QuU9niEONbYCX1XGKqmyCcHQUzAapSqGzbAmFrRFnvyKwNL+mmy1bxli9EZV8f5vBco26f9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "global-directory": "^4.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@cspell/cspell-service-bus": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.16.1.tgz", + "integrity": "sha512-URaralJKcdHZH/Lr25L28GJo2Ub07adHPPhOL83BvmPyGkboehmz5arjNrgQFwS+IvGjHLdp5uzEJd0xyeHGdw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@cspell/cspell-types": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.16.1.tgz", + "integrity": "sha512-B8bHlBaDSMDMEq++H8qO9osKUkzWUrP4CgWQyRqlXZ9EOdnJ469Tp1wghcQ7DezII3aXYrHiVKsUYY9VvjkhIg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@cspell/dict-ada": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-ada/-/dict-ada-4.0.5.tgz", + "integrity": "sha512-6/RtZ/a+lhFVmrx/B7bfP7rzC4yjEYe8o74EybXcvu4Oue6J4Ey2WSYj96iuodloj1LWrkNCQyX5h4Pmcj0Iag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-al": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-al/-/dict-al-1.0.3.tgz", + "integrity": "sha512-V1HClwlfU/qwSq2Kt+MkqRAsonNu3mxjSCDyGRecdLGIHmh7yeEeaxqRiO/VZ4KP+eVSiSIlbwrb5YNFfxYZbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-aws": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.7.tgz", + "integrity": "sha512-PoaPpa2NXtSkhGIMIKhsJUXB6UbtTt6Ao3x9JdU9kn7fRZkwD4RjHDGqulucIOz7KeEX/dNRafap6oK9xHe4RA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-bash": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.1.8.tgz", + "integrity": "sha512-I2CM2pTNthQwW069lKcrVxchJGMVQBzru2ygsHCwgidXRnJL/NTjAPOFTxN58Jc1bf7THWghfEDyKX/oyfc0yg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-companies": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.1.7.tgz", + "integrity": "sha512-ncVs/efuAkP1/tLDhWbXukBjgZ5xOUfe03neHMWsE8zvXXc5+Lw6TX5jaJXZLOoES/f4j4AhRE20jsPCF5pm+A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-cpp": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.2.tgz", + "integrity": "sha512-yw5eejWvY4bAnc6LUA44m4WsFwlmgPt2uMSnO7QViGMBDuoeopMma4z9XYvs4lSjTi8fIJs/A1YDfM9AVzb8eg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-cryptocurrencies": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-5.0.3.tgz", + "integrity": "sha512-bl5q+Mk+T3xOZ12+FG37dB30GDxStza49Rmoax95n37MTLksk9wBo1ICOlPJ6PnDUSyeuv4SIVKgRKMKkJJglA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-csharp": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-csharp/-/dict-csharp-4.0.5.tgz", + "integrity": "sha512-c/sFnNgtRwRJxtC3JHKkyOm+U3/sUrltFeNwml9VsxKBHVmvlg4tk4ar58PdpW9/zTlGUkWi2i85//DN1EsUCA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-css": { + "version": "4.0.16", + "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.16.tgz", + "integrity": "sha512-70qu7L9z/JR6QLyJPk38fNTKitlIHnfunx0wjpWQUQ8/jGADIhMCrz6hInBjqPNdtGpYm8d1dNFyF8taEkOgrQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-dart": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-dart/-/dict-dart-2.2.4.tgz", + "integrity": "sha512-of/cVuUIZZK/+iqefGln8G3bVpfyN6ZtH+LyLkHMoR5tEj+2vtilGNk9ngwyR8L4lEqbKuzSkOxgfVjsXf5PsQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-data-science": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.5.tgz", + "integrity": "sha512-nNSILXmhSJox9/QoXICPQgm8q5PbiSQP4afpbkBqPi/u/b3K9MbNH5HvOOa6230gxcGdbZ9Argl2hY/U8siBlg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-django": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-4.1.3.tgz", + "integrity": "sha512-yBspeL3roJlO0a1vKKNaWABURuHdHZ9b1L8d3AukX0AsBy9snSggc8xCavPmSzNfeMDXbH+1lgQiYBd3IW03fg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-docker": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-docker/-/dict-docker-1.1.11.tgz", + "integrity": "sha512-s0Yhb16/R+UT1y727ekbR/itWQF3Qz275DR1ahOa66wYtPjHUXmhM3B/LT3aPaX+hD6AWmK23v57SuyfYHUjsw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-dotnet": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-5.0.8.tgz", + "integrity": "sha512-MD8CmMgMEdJAIPl2Py3iqrx3B708MbCIXAuOeZ0Mzzb8YmLmiisY7QEYSZPg08D7xuwARycP0Ki+bb0GAkFSqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-elixir": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-elixir/-/dict-elixir-4.0.6.tgz", + "integrity": "sha512-TfqSTxMHZ2jhiqnXlVKM0bUADtCvwKQv2XZL/DI0rx3doG8mEMS8SGPOmiyyGkHpR/pGOq18AFH3BEm4lViHIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-en_us": { + "version": "4.3.28", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.28.tgz", + "integrity": "sha512-BN1PME7cOl7DXRQJ92pEd1f0Xk5sqjcDfThDGkKcsgwbSOY7KnTc/czBW6Pr3WXIchIm6cT12KEfjNqx7U7Rrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-en-common-misspellings": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.0.7.tgz", + "integrity": "sha512-qNFo3G4wyabcwnM+hDrMYKN9vNVg/k9QkhqSlSst6pULjdvPyPs1mqz1689xO/v9t8e6sR4IKc3CgUXDMTYOpA==", + "dev": true, + "license": "CC BY-SA 4.0" + }, + "node_modules/@cspell/dict-en-gb": { + "version": "1.1.33", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz", + "integrity": "sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-filetypes": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.9.tgz", + "integrity": "sha512-U7ycC1cE32A5aEgwzp/iE0TVabonUFnVt+Ygbf6NsIWqEuFWZgZChC7gfztA4T1fpuj602nFdp7eOnTWKORsnQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-flutter": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-flutter/-/dict-flutter-1.0.3.tgz", + "integrity": "sha512-52C9aUEU22ptpgYh6gQyIdA4MP6NPwzbEqndfgPh3Sra191/kgs7CVqXiO1qbtZa9gnYHUoVApkoxRE7mrXHfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-fonts": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-fonts/-/dict-fonts-4.0.3.tgz", + "integrity": "sha512-sPd17kV5qgYXLteuHFPn5mbp/oCHKgitNfsZLFC3W2fWEgZlhg4hK+UGig3KzrYhhvQ8wBnmZrAQm0TFKCKzsA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-fsharp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-fsharp/-/dict-fsharp-1.0.4.tgz", + "integrity": "sha512-G5wk0o1qyHUNi9nVgdE1h5wl5ylq7pcBjX8vhjHcO4XBq20D5eMoXjwqMo/+szKAqzJ+WV3BgAL50akLKrT9Rw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-fullstack": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-fullstack/-/dict-fullstack-3.2.3.tgz", + "integrity": "sha512-62PbndIyQPH11mAv0PyiyT0vbwD0AXEocPpHlCHzfb5v9SspzCCbzQ/LIBiFmyRa+q5LMW35CnSVu6OXdT+LKg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-gaming-terms": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-gaming-terms/-/dict-gaming-terms-1.0.8.tgz", + "integrity": "sha512-7OL0zTl93WFWhhtpXFrtm9uZXItC3ncAs8d0iQDMMFVNU1rBr6raBNxJskxE5wx2Ant12fgI66ZGVagXfN+yfA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-git": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-3.0.3.tgz", + "integrity": "sha512-LSxB+psZ0qoj83GkyjeEH/ZViyVsGEF/A6BAo8Nqc0w0HjD2qX/QR4sfA6JHUgQ3Yi/ccxdK7xNIo67L2ScW5A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-golang": { + "version": "6.0.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.17.tgz", + "integrity": "sha512-uDDLEJ/cHdLiqPw4+5BnmIo2i/TSR+uDvYd6JlBjTmjBKpOCyvUgYRztH7nv5e7virsN5WDiUWah4/ATQGz4Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-google": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-google/-/dict-google-1.0.4.tgz", + "integrity": "sha512-JThUT9eiguCja1mHHLwYESgxkhk17Gv7P3b1S7ZJzXw86QyVHPrbpVoMpozHk0C9o+Ym764B7gZGKmw9uMGduQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-haskell": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-haskell/-/dict-haskell-4.0.4.tgz", + "integrity": "sha512-EwQsedEEnND/vY6tqRfg9y7tsnZdxNqOxLXSXTsFA6JRhUlr8Qs88iUUAfsUzWc4nNmmzQH2UbtT25ooG9x4nA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-html": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.10.tgz", + "integrity": "sha512-I9uRAcdtHbh0wEtYZlgF0TTcgH0xaw1B54G2CW+tx4vHUwlde/+JBOfIzird4+WcMv4smZOfw+qHf7puFUbI5g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-html-symbol-entities": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-4.0.3.tgz", + "integrity": "sha512-aABXX7dMLNFdSE8aY844X4+hvfK7977sOWgZXo4MTGAmOzR8524fjbJPswIBK7GaD3+SgFZ2yP2o0CFvXDGF+A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-java": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@cspell/dict-java/-/dict-java-5.0.10.tgz", + "integrity": "sha512-pVNcOnmoGiNL8GSVq4WbX/Vs2FGS0Nej+1aEeGuUY9CU14X8yAVCG+oih5ZoLt1jaR8YfR8byUF8wdp4qG4XIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-julia": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-julia/-/dict-julia-1.0.4.tgz", + "integrity": "sha512-bFVgNX35MD3kZRbXbJVzdnN7OuEqmQXGpdOi9jzB40TSgBTlJWA4nxeAKV4CPCZxNRUGnLH0p05T/AD7Aom9/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-k8s": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.9.tgz", + "integrity": "sha512-Q7GELSQIzo+BERl2ya/nBEnZeQC+zJP19SN1pI6gqDYraM51uYJacbbcWLYYO2Y+5joDjNt/sd/lJtLaQwoSlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-latex": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-latex/-/dict-latex-4.0.3.tgz", + "integrity": "sha512-2KXBt9fSpymYHxHfvhUpjUFyzrmN4c4P8mwIzweLyvqntBT3k0YGZJSriOdjfUjwSygrfEwiuPI1EMrvgrOMJw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-lorem-ipsum": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-lorem-ipsum/-/dict-lorem-ipsum-4.0.3.tgz", + "integrity": "sha512-WFpDi/PDYHXft6p0eCXuYnn7mzMEQLVeqpO+wHSUd+kz5ADusZ4cpslAA4wUZJstF1/1kMCQCZM6HLZic9bT8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-lua": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.6.tgz", + "integrity": "sha512-Jwvh1jmAd9b+SP9e1GkS2ACbqKKRo9E1f9GdjF/ijmooZuHU0hPyqvnhZzUAxO1egbnNjxS/J2T6iUtjAUK2KQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-makefile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-makefile/-/dict-makefile-1.0.3.tgz", + "integrity": "sha512-R3U0DSpvTs6qdqfyBATnePj9Q/pypkje0Nj26mQJ8TOBQutCRAJbr2ZFAeDjgRx5EAJU/+8txiyVF97fbVRViw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-markdown": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.7.tgz", + "integrity": "sha512-F9SGsSOokFn976DV4u/1eL4FtKQDSgJHSZ3+haPRU5ki6OEqojxKa8hhj4AUrtNFpmBaJx/WJ4YaEzWqG7hgqg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@cspell/dict-css": "^4.0.16", + "@cspell/dict-html": "^4.0.10", + "@cspell/dict-html-symbol-entities": "^4.0.3", + "@cspell/dict-typescript": "^3.1.11" + } + }, + "node_modules/@cspell/dict-monkeyc": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-monkeyc/-/dict-monkeyc-1.0.9.tgz", + "integrity": "sha512-Jvf6g5xlB4+za3ThvenYKREXTEgzx5gMUSzrAxIiPleVG4hmRb/GBSoSjtkGaibN3XxGx5x809gSTYCA/IHCpA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-node": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-5.0.5.tgz", + "integrity": "sha512-7NbCS2E8ZZRZwlLrh2sA0vAk9n1kcTUiRp/Nia8YvKaItGXLfxYqD2rMQ3HpB1kEutal6hQLVic3N2Yi1X7AaA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-npm": { + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.1.16.tgz", + "integrity": "sha512-9z0YLQIu88pC6BOMbHUYksXoSyhzwWvZa9XVvN/1rGMov1kTgStr2QDvsBpECk3AIamzZnahKIyUvJrr+rOkYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-php": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.13.tgz", + "integrity": "sha512-P6sREMZkhElzz/HhXAjahnICYIqB/HSGp1EhZh+Y6IhvC15AzgtDP8B8VYCIsQof6rPF1SQrFwunxOv8H1e2eg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-powershell": { + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-5.0.13.tgz", + "integrity": "sha512-0qdj0XZIPmb77nRTynKidRJKTU0Fl+10jyLbAhFTuBWKMypVY06EaYFnwhsgsws/7nNX8MTEQuewbl9bWFAbsg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-public-licenses": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.11.tgz", + "integrity": "sha512-rR5KjRUSnVKdfs5G+gJ4oIvQvm8+NJ6cHWY2N+GE69/FSGWDOPHxulCzeGnQU/c6WWZMSimG9o49i9r//lUQyA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-python": { + "version": "4.2.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.13.tgz", + "integrity": "sha512-mZIcmo9qif8LkJ6N/lqTZawcOk2kVTcuWIUOSbMcjyomO0XZ7iWz15TfONyr03Ea/l7o5ULV+MZ4vx76bAUb7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/dict-data-science": "^2.0.5" + } + }, + "node_modules/@cspell/dict-r": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-r/-/dict-r-2.0.4.tgz", + "integrity": "sha512-cBpRsE/U0d9BRhiNRMLMH1PpWgw+N+1A2jumgt1if9nBGmQw4MUpg2u9I0xlFVhstTIdzXiLXMxP45cABuiUeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-ruby": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.7.tgz", + "integrity": "sha512-4/d0hcoPzi5Alk0FmcyqlzFW9lQnZh9j07MJzPcyVO62nYJJAGKaPZL2o4qHeCS/od/ctJC5AHRdoUm0ktsw6Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-rust": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.10.tgz", + "integrity": "sha512-6o5C8566VGTTctgcwfF3Iy7314W0oMlFFSQOadQ0OEdJ9Z9ERX/PDimrzP3LGuOrvhtEFoK8pj+BLnunNwRNrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-scala": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-5.0.6.tgz", + "integrity": "sha512-tl0YWAfjUVb4LyyE4JIMVE8DlLzb1ecHRmIWc4eT6nkyDqQgHKzdHsnusxFEFMVLIQomgSg0Zz6hJ5S1E4W4ww==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-software-terms": { + "version": "4.1.18", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-4.1.18.tgz", + "integrity": "sha512-QhOQ3qVFr2Y+uDw2SH15klVNU2S07ecFhG+2gpTO/K4Kuaui3INbVrzHOKW41ofP3ghv9y2TkUUtOP5KfddP8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-sql": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.1.8.tgz", + "integrity": "sha512-dJRE4JV1qmXTbbGm6WIcg1knmR6K5RXnQxF4XHs5HA3LAjc/zf77F95i5LC+guOGppVF6Hdl66S2UyxT+SAF3A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-svelte": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-svelte/-/dict-svelte-1.0.5.tgz", + "integrity": "sha512-sseHlcXOqWE4Ner9sg8KsjxwSJ2yssoJNqFHR9liWVbDV+m7kBiUtn2EB690TihzVsEmDr/0Yxrbb5Bniz70mA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-swift": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-swift/-/dict-swift-2.0.4.tgz", + "integrity": "sha512-CsFF0IFAbRtYNg0yZcdaYbADF5F3DsM8C4wHnZefQy8YcHP/qjAF/GdGfBFBLx+XSthYuBlo2b2XQVdz3cJZBw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-terraform": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.0.6.tgz", + "integrity": "sha512-Sqm5vGbXuI9hCFcr4w6xWf4Y25J9SdleE/IqfM6RySPnk8lISEmVdax4k6+Kinv9qaxyvnIbUUN4WFLWcBPQAg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-typescript": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.1.11.tgz", + "integrity": "sha512-FwvK5sKbwrVpdw0e9+1lVTl8FPoHYvfHRuQRQz2Ql5XkC0gwPPkpoyD1zYImjIyZRoYXk3yp9j8ss4iz7A7zoQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dict-vue": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-vue/-/dict-vue-3.0.3.tgz", + "integrity": "sha512-akmYbrgAGumqk1xXALtDJcEcOMYBYMnkjpmGzH13Ozhq1mkPF4VgllFQlm1xYde+BUKNnzMgPEzxrL2qZllgYA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspell/dynamic-import": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.16.1.tgz", + "integrity": "sha512-mEfdeS1kFKpJoDsQ8wW6PxO3+ncYuZCWCASR0trbzZDduzO2RcogMUgzP99obHtYbgXadw94qcQWXB8OYTPSwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "import-meta-resolve": "^4.1.0" + }, + "engines": { + "node": ">=18.0" + } + }, + "node_modules/@cspell/filetypes": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-8.16.1.tgz", + "integrity": "sha512-zpbNg3n26muR1jdMbylw5YsaVGyS9LU5Lfy20gU7RygAk6kFyx3Yz4C84EihBGQHy2gVEsEeyCCxk+R8RXuPZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@cspell/strong-weak-map": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.16.1.tgz", + "integrity": "sha512-jJQS05wg2iUkLKnPR8NEq3LqvqHWKnvUDFoPwaJzYw6ol/O4yi/lv+Me9+XCPrgjpnAz+8APhWkhrR/O71R1Bw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@cspell/url": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-8.16.1.tgz", + "integrity": "sha512-kGlr7Wdo4xJpXKal/Gqo3Ll5Is7ptlIlLZOB/hzR6R53Fw4N6SdipTDIeHHqC15p2AXTEG6TSNdhk9dA50LY6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0" + } + }, "node_modules/@csstools/css-parser-algorithms": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", @@ -4818,6 +5386,13 @@ "node": ">=0.10.0" } }, + "node_modules/array-timsort": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", + "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", + "dev": true, + "license": "MIT" + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -5537,12 +6112,41 @@ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk-template": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-1.1.0.tgz", + "integrity": "sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/chalk/chalk-template?sponsor=1" + } + }, + "node_modules/chalk-template/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -5671,6 +6275,46 @@ "node": ">=6" } }, + "node_modules/clear-module": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/clear-module/-/clear-module-4.1.2.tgz", + "integrity": "sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^2.0.0", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clear-module/node_modules/parent-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", + "integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/clear-module/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -5829,6 +6473,30 @@ "node": ">= 6" } }, + "node_modules/comment-json": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.5.tgz", + "integrity": "sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-timsort": "^1.0.3", + "core-util-is": "^1.0.3", + "esprima": "^4.0.1", + "has-own-prop": "^2.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/comment-json/node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, "node_modules/common-tags": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", @@ -5846,157 +6514,439 @@ "dev": true, "license": "MIT" }, - "node_modules/concurrently": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.1.0.tgz", - "integrity": "sha512-VxkzwMAn4LP7WyMnJNbHN5mKV9L2IbyDjpzemKr99sXNR3GqRNMMHdm7prV1ws9wg7ETj6WUkNOigZVsptwbgg==", + "node_modules/concurrently": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.1.0.tgz", + "integrity": "sha512-VxkzwMAn4LP7WyMnJNbHN5mKV9L2IbyDjpzemKr99sXNR3GqRNMMHdm7prV1ws9wg7ETj6WUkNOigZVsptwbgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "lodash": "^4.17.21", + "rxjs": "^7.8.1", + "shell-quote": "^1.8.1", + "supports-color": "^8.1.1", + "tree-kill": "^1.2.2", + "yargs": "^17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/constant-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", + "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case": "^2.0.2" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-js-compat": { + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", + "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.24.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/corser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", + "integrity": "sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cspell": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-8.16.1.tgz", + "integrity": "sha512-ILuCjnY3JPY2oO62PodTQD6n3DGTKTwB+IU1tE9EC6EP2Xw6z3Ir+hO2DO6QlRUmZlGrkGMek5U06nNmztt4eA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/cspell-json-reporter": "8.16.1", + "@cspell/cspell-pipe": "8.16.1", + "@cspell/cspell-types": "8.16.1", + "@cspell/dynamic-import": "8.16.1", + "@cspell/url": "8.16.1", + "chalk": "^5.3.0", + "chalk-template": "^1.1.0", + "commander": "^12.1.0", + "cspell-dictionary": "8.16.1", + "cspell-gitignore": "8.16.1", + "cspell-glob": "8.16.1", + "cspell-io": "8.16.1", + "cspell-lib": "8.16.1", + "fast-json-stable-stringify": "^2.1.0", + "file-entry-cache": "^9.1.0", + "get-stdin": "^9.0.0", + "semver": "^7.6.3", + "tinyglobby": "^0.2.10" + }, + "bin": { + "cspell": "bin.mjs", + "cspell-esm": "bin.mjs" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/streetsidesoftware/cspell?sponsor=1" + } + }, + "node_modules/cspell-config-lib": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.16.1.tgz", + "integrity": "sha512-ohbSi9sI14rMdFc2g17ogObGGkd/x6zUVOzCH1nEOefC9yJYYfsvaMHqdhk0rOjvmF95j5OK4dm5oid+DKQcpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/cspell-types": "8.16.1", + "comment-json": "^4.2.5", + "yaml": "^2.6.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/cspell-config-lib/node_modules/yaml": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/cspell-dictionary": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.16.1.tgz", + "integrity": "sha512-NL/vwf5SjtkWWaEUh+0dogKdEU4UuepJaNh36FX8W1CFtQXj7yEs45x4K7/Fp+pn/4AT7Qe7WpSSWi9z5GcqKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/cspell-pipe": "8.16.1", + "@cspell/cspell-types": "8.16.1", + "cspell-trie-lib": "8.16.1", + "fast-equals": "^5.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/cspell-gitignore": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-8.16.1.tgz", + "integrity": "sha512-Gg8qvFc8wr1D7TvB+GSfT1jyrUoUmPiG3WdOnQnxOSYKJesOiVvNxLv7YXRFkcUKG1VU6XDUkpb/uzKh3k2rKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/url": "8.16.1", + "cspell-glob": "8.16.1", + "cspell-io": "8.16.1", + "find-up-simple": "^1.0.0" + }, + "bin": { + "cspell-gitignore": "bin.mjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/cspell-glob": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.16.1.tgz", + "integrity": "sha512-EukaXFaUrgrY9G4bB2PguzpkAoOq6ai9acLl6gWD+6DgVEwkLqPmCWjsFJA0MaqVp9QvPsIfCy4KCnx35csG/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/url": "8.16.1", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/cspell-grammar": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.16.1.tgz", + "integrity": "sha512-7IRYa0O1xfK2HVbhGSpOPPt5HlP2ZHRHtdLU2iOvMSCkh0cSPERu++kdprvcaOf7E7koo0P+bxHSprcYbU/agg==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.1.2", - "lodash": "^4.17.21", - "rxjs": "^7.8.1", - "shell-quote": "^1.8.1", - "supports-color": "^8.1.1", - "tree-kill": "^1.2.2", - "yargs": "^17.7.2" + "@cspell/cspell-pipe": "8.16.1", + "@cspell/cspell-types": "8.16.1" }, "bin": { - "conc": "dist/bin/concurrently.js", - "concurrently": "dist/bin/concurrently.js" + "cspell-grammar": "bin.mjs" }, "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, - "node_modules/concurrently/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/cspell-io": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.16.1.tgz", + "integrity": "sha512-25MOQfy7EhdVeoNUW/+jyb5ArDYSLbaFwVToakHtLGuYk9cW8q8MAHq1W9GzW06wXswT2sQsRvaozmIOTDIOnw==", "dev": true, "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "@cspell/cspell-service-bus": "8.16.1", + "@cspell/url": "8.16.1" }, "engines": { - "node": ">=10" + "node": ">=18" + } + }, + "node_modules/cspell-lib": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.16.1.tgz", + "integrity": "sha512-Gn1vJcyhYe78iB+9dms8rnfgDEfJgYocXapFPTOcZV3EUWKcV4wyCiHdbK3j2ElLXmPuSPg4eZSlxxk8ITD0Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/cspell-bundled-dicts": "8.16.1", + "@cspell/cspell-pipe": "8.16.1", + "@cspell/cspell-resolver": "8.16.1", + "@cspell/cspell-types": "8.16.1", + "@cspell/dynamic-import": "8.16.1", + "@cspell/filetypes": "8.16.1", + "@cspell/strong-weak-map": "8.16.1", + "@cspell/url": "8.16.1", + "clear-module": "^4.1.2", + "comment-json": "^4.2.5", + "cspell-config-lib": "8.16.1", + "cspell-dictionary": "8.16.1", + "cspell-glob": "8.16.1", + "cspell-grammar": "8.16.1", + "cspell-io": "8.16.1", + "cspell-trie-lib": "8.16.1", + "env-paths": "^3.0.0", + "fast-equals": "^5.0.1", + "gensequence": "^7.0.0", + "import-fresh": "^3.3.0", + "resolve-from": "^5.0.0", + "vscode-languageserver-textdocument": "^1.0.12", + "vscode-uri": "^3.0.8", + "xdg-basedir": "^5.1.0" }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "engines": { + "node": ">=18" } }, - "node_modules/constant-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", - "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", + "node_modules/cspell-lib/node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", "dev": true, "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case": "^2.0.2" + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "node_modules/cspell-lib/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "node_modules/core-js-compat": { - "version": "3.39.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", - "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", + "node_modules/cspell-trie-lib": { + "version": "8.16.1", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.16.1.tgz", + "integrity": "sha512-T86nszsjQjyZ35dOWk7qN17Hem0cVeXJ4D1v/gIG+Y0Umo7dBW7AwmTvUy8iMFAra29cSdgRH+yk6q1qdpA+ZA==", "dev": true, "license": "MIT", "dependencies": { - "browserslist": "^4.24.2" + "@cspell/cspell-pipe": "8.16.1", + "@cspell/cspell-types": "8.16.1", + "gensequence": "^7.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "engines": { + "node": ">=18" } }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "node_modules/cspell/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } }, - "node_modules/corser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", - "integrity": "sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==", + "node_modules/cspell/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4.0" + "node": ">=18" } }, - "node_modules/cosmiconfig": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "node_modules/cspell/node_modules/file-entry-cache": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz", + "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==", "dev": true, "license": "MIT", "dependencies": { - "env-paths": "^2.2.1", - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0" + "flat-cache": "^5.0.0" }, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=18" } }, - "node_modules/cross-env": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", - "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "node_modules/cspell/node_modules/flat-cache": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", + "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", "dev": true, "license": "MIT", "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" + "flatted": "^3.3.1", + "keyv": "^4.5.4" }, "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" + "node": ">=18" } }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "node_modules/cspell/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">= 8" + "node": ">=10" } }, "node_modules/css-functions-list": { @@ -7472,6 +8422,16 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-equals": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", + "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", @@ -7553,6 +8513,21 @@ "pend": "~1.2.0" } }, + "node_modules/fdir": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", + "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -7622,6 +8597,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-up-simple": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", + "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/findup-sync": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz", @@ -7886,6 +8874,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gensequence": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-7.0.0.tgz", + "integrity": "sha512-47Frx13aZh01afHJTB3zTtKIlFI6vWY+MYCN9Qpew6i52rfKjnhCF/l1YlC8UmEMvvntZZ6z4PiCcmyuedR2aQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -7942,6 +8940,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-stdin": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -8031,6 +9042,32 @@ "node": ">=10.13.0" } }, + "node_modules/global-directory": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", + "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "4.1.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/global-directory/node_modules/ini": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/global-dirs": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", @@ -8245,6 +9282,16 @@ "node": ">=8" } }, + "node_modules/has-own-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz", + "integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -8547,6 +9594,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-meta-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -16680,6 +17738,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, "node_modules/request-progress": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", @@ -18613,6 +19681,20 @@ "dev": true, "license": "MIT" }, + "node_modules/tinyglobby": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz", + "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/tinypool": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", @@ -20456,6 +21538,19 @@ } } }, + "node_modules/xdg-basedir": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", + "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/xml-name-validator": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", diff --git a/benefit-finder/package.json b/benefit-finder/package.json index a6e603bf5..fa86276f5 100644 --- a/benefit-finder/package.json +++ b/benefit-finder/package.json @@ -19,6 +19,7 @@ "lint:scss:fix": "stylelint 'src/**/*.scss' --fix", "lint:js": "eslint . --ext .js,.jsx,.json", "lint:js:fix": "npm run lint:js -- --fix", + "lint:cspell:dev": "cspell lint '**'", "lint-staged": "lint-staged", "generate:component": "plop", "prebuild:storybook": "npm run mv:uswds:usagov && npm run build", @@ -60,6 +61,7 @@ "autoprefixer": "^10.4.20", "concurrently": "^9.0.1", "cross-env": "^7.0.3", + "cspell": "^8.16.1", "cypress": "^13.14.1", "cypress-axe": "^1.5.0", "cypress-plugin-tab": "^1.0.5", From 1a7777eda967344aa9a4aa8fd2004829b5ed5abe Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Fri, 13 Dec 2024 13:08:22 -0500 Subject: [PATCH 24/65] PXBF-1983-spell-checker-updates: new dictionary for cspell words to ignore --- benefit-finder/cspell-dictionary/content.txt | 4 ++ benefit-finder/cspell-dictionary/dev.txt | 40 ++++++++++++++++++++ benefit-finder/cspell-dictionary/es.txt | 16 ++++++++ benefit-finder/cspell-dictionary/project.txt | 2 + 4 files changed, 62 insertions(+) create mode 100644 benefit-finder/cspell-dictionary/content.txt create mode 100644 benefit-finder/cspell-dictionary/dev.txt create mode 100644 benefit-finder/cspell-dictionary/es.txt create mode 100644 benefit-finder/cspell-dictionary/project.txt diff --git a/benefit-finder/cspell-dictionary/content.txt b/benefit-finder/cspell-dictionary/content.txt new file mode 100644 index 000000000..fd39e8fde --- /dev/null +++ b/benefit-finder/cspell-dictionary/content.txt @@ -0,0 +1,4 @@ +DOLO +FEMA +FASS +CHAMPVA diff --git a/benefit-finder/cspell-dictionary/dev.txt b/benefit-finder/cspell-dictionary/dev.txt new file mode 100644 index 000000000..3d86d6d0f --- /dev/null +++ b/benefit-finder/cspell-dictionary/dev.txt @@ -0,0 +1,40 @@ +autodocs +camelcase +esbenp +fieldgroup +fieldset +fieldsets +firstname +lastname +stylelint +backcta +spacebar +pageup +pagedown +icongallery +skipnav +Vitest +labelledby +tabindex +stylesheet +hreflang +evenodd +checkmark +inputmode +datetype +describedby +noreferrer +noopener +lede +nbsp +httpstat +prestart +pagesurvey +Pagesub +ALLOWALL +cflinuxfs +buildpack +buildpacks +webfonts +hkshshslhshjksh +kjgljjlhkhgljgjh diff --git a/benefit-finder/cspell-dictionary/es.txt b/benefit-finder/cspell-dictionary/es.txt new file mode 100644 index 000000000..f4652b8f7 --- /dev/null +++ b/benefit-finder/cspell-dictionary/es.txt @@ -0,0 +1,16 @@ +inglés +enero +Aplicar +beneficio +beneficios +buscador +discapacidad +jubilacion +suma +muerte +elegible +resultados +selecciónes +revisar +casada +Hija diff --git a/benefit-finder/cspell-dictionary/project.txt b/benefit-finder/cspell-dictionary/project.txt new file mode 100644 index 000000000..2d2ad49f1 --- /dev/null +++ b/benefit-finder/cspell-dictionary/project.txt @@ -0,0 +1,2 @@ +usagov +uswds From 8c6b7e339b3b73c7f9f060f68c11779ff5c0d589 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Fri, 13 Dec 2024 13:08:36 -0500 Subject: [PATCH 25/65] PXBF-1983-spell-checker-updates: update with correct spelling --- benefit-finder/README.md | 2 +- .../cypress/e2e/storybook/axe-a11y.cy.js | 4 +-- .../e2e/storybook/benefitAccordionGroup.cy.js | 4 +-- .../cypress/e2e/storybook/dataLayer.cy.js | 30 +++++++++---------- .../e2e/storybook/error-message-display.cy.js | 12 ++++---- .../e2e/storybook/openAllAccordions.cy.js | 4 +-- ...lected-criteria-eligibility-benefits.cy.js | 24 +++++++-------- .../e2e/usagov-public-site/links.cy.js | 22 +++++++------- benefit-finder/cypress/support/utils.js | 2 +- benefit-finder/index.html | 2 +- benefit-finder/src/App/_index.scss | 2 +- benefit-finder/src/App/index.jsx | 10 +++---- benefit-finder/src/Routes/Intro/index.jsx | 4 +-- .../__snapshots__/index.spec.jsx.snap | 4 +-- .../src/Routes/LifeEventSection/index.jsx | 12 ++++---- .../__snapshots__/index.spec.jsx.snap | 12 ++++---- .../ResultsView/__tests__/index.spec.jsx | 2 +- .../ResultsView/components/Results/index.jsx | 6 ++-- .../src/Routes/ResultsView/index.jsx | 6 ++-- .../src/Routes/VerifySelectionsView/index.jsx | 4 +-- .../apiCallsGetElegibilityByCriteria.spec.js | 4 +-- .../api/__tests__/apiCallsPutData.spec.js | 4 +-- .../apiCallsUtilsDateEligibility.spec.js | 4 +-- benefit-finder/src/shared/api/apiCalls.js | 18 +++++------ .../src/shared/api/mock-data/current.js | 4 +-- .../src/shared/api/mock-data/current.json | 4 +-- .../src/shared/components/Accordion/index.jsx | 2 +- .../BenefitAccordionGroup/index.jsx | 12 ++++---- .../shared/components/ButtonGroup/index.jsx | 2 +- .../src/shared/components/Date/index.jsx | 2 +- .../src/shared/components/Fieldset/index.jsx | 2 +- .../src/shared/components/Heading/index.jsx | 2 +- .../__snapshots__/index.spec.jsx.snap | 2 +- .../__tests__/index.spec.jsx | 6 ++-- .../_index.scss | 0 .../index.jsx | 10 +++---- .../index.stories.jsx | 4 +-- .../src/shared/components/Label/index.jsx | 2 +- .../src/shared/components/Modal/index.jsx | 14 ++++----- .../shared/components/Modal/index.stories.jsx | 2 +- .../components/Paragraph/index.stories.jsx | 2 +- .../shared/components/ShareTrigger/index.jsx | 2 +- .../components/StepBackButton/index.jsx | 2 +- .../shared/components/StepIndicator/index.jsx | 6 ++-- .../src/shared/components/TextInput/index.jsx | 2 +- benefit-finder/src/shared/components/index.js | 4 +-- .../shared/hooks/useCrazyEggUpdate/index.js | 21 ------------- .../src/shared/hooks/useHandleUnload/index.js | 2 +- .../src/shared/hooks/useResetElement/index.js | 4 +-- .../utils/dataLayerUtils/dataLayerPush.js | 6 ++-- .../shared/utils/dateInputValidation/index.js | 2 +- .../src/shared/utils/errorHandling/index.js | 6 ++-- benefit-finder/vite.config.mjs | 4 +-- 53 files changed, 155 insertions(+), 176 deletions(-) rename benefit-finder/src/shared/components/{KeyElegibilityCrieriaList => KeyEligibilityCriteriaList}/__tests__/__snapshots__/index.spec.jsx.snap (65%) rename benefit-finder/src/shared/components/{KeyElegibilityCrieriaList => KeyEligibilityCriteriaList}/__tests__/index.spec.jsx (57%) rename benefit-finder/src/shared/components/{KeyElegibilityCrieriaList => KeyEligibilityCriteriaList}/_index.scss (100%) rename benefit-finder/src/shared/components/{KeyElegibilityCrieriaList => KeyEligibilityCriteriaList}/index.jsx (90%) rename benefit-finder/src/shared/components/{KeyElegibilityCrieriaList => KeyEligibilityCriteriaList}/index.stories.jsx (83%) delete mode 100644 benefit-finder/src/shared/hooks/useCrazyEggUpdate/index.js diff --git a/benefit-finder/README.md b/benefit-finder/README.md index d73e3f17b..06613a032 100644 --- a/benefit-finder/README.md +++ b/benefit-finder/README.md @@ -240,7 +240,7 @@ We take a utility first approach. We do not have full control over our styles si 1. we establish uswds components with `usa-` classes. 2. this inherits global `uswds` `css` and `js` -3. IF we need to overide, we clone the uswds class `usa-` and prepend `bf-`. +3. IF we need to override, we clone the uswds class `usa-` and prepend `bf-`. ```css .bf-usa- .usa- diff --git a/benefit-finder/cypress/e2e/storybook/axe-a11y.cy.js b/benefit-finder/cypress/e2e/storybook/axe-a11y.cy.js index de5e85d66..d3934824d 100644 --- a/benefit-finder/cypress/e2e/storybook/axe-a11y.cy.js +++ b/benefit-finder/cypress/e2e/storybook/axe-a11y.cy.js @@ -1,7 +1,7 @@ /// import * as utils from '../../support/utils.js' -import * as BENEFITS_ELIBILITY_DATA from '../../fixtures/benefits-eligibility.json' +import * as BENEFITS_ELIGIBILITY_DATA from '../../fixtures/benefits-eligibility.json' import * as EN_LOCALE_DATA from '../../../../benefit-finder/src/shared/locales/en/en.json' import * as EN_DOLO_MOCK_DATA from '../../../../benefit-finder/src/shared/api/mock-data/current.json' import { pageObjects } from '../../support/pageObjects' @@ -108,7 +108,7 @@ describe(`Validate code passes axe scanning`, () => { }) it('Has no detectable a11y violations on see benefits', () => { - const selectedData = BENEFITS_ELIBILITY_DATA.scenario_1_covid.en.param + const selectedData = BENEFITS_ELIGIBILITY_DATA.scenario_1_covid.en.param const scenario = utils.encodeURIFromObject(selectedData) delete selectedData.shared // We don't want to include the "shared" param diff --git a/benefit-finder/cypress/e2e/storybook/benefitAccordionGroup.cy.js b/benefit-finder/cypress/e2e/storybook/benefitAccordionGroup.cy.js index c80cb37b3..d1f9054fe 100644 --- a/benefit-finder/cypress/e2e/storybook/benefitAccordionGroup.cy.js +++ b/benefit-finder/cypress/e2e/storybook/benefitAccordionGroup.cy.js @@ -1,9 +1,9 @@ import * as utils from '../../support/utils' -import * as BENEFITS_ELIBILITY_DATA from '../../fixtures/benefits-eligibility.json' +import * as BENEFITS_ELIGIBILITY_DATA from '../../fixtures/benefits-eligibility.json' import { pageObjects } from '../../support/pageObjects' beforeEach(() => { - const selectedData = BENEFITS_ELIBILITY_DATA.scenario_1_covid.en.param + const selectedData = BENEFITS_ELIGIBILITY_DATA.scenario_1_covid.en.param const scenario = utils.encodeURIFromObject(selectedData) cy.visit(`${utils.storybookUri}${scenario}`) pageObjects.accordionHeading().should('exist') diff --git a/benefit-finder/cypress/e2e/storybook/dataLayer.cy.js b/benefit-finder/cypress/e2e/storybook/dataLayer.cy.js index 34e0b6ae6..a637dcae3 100644 --- a/benefit-finder/cypress/e2e/storybook/dataLayer.cy.js +++ b/benefit-finder/cypress/e2e/storybook/dataLayer.cy.js @@ -4,7 +4,7 @@ import * as utils from '../../support/utils.js' import { dataLayerUtils } from '../../../src/shared/utils' import { pageObjects } from '../../support/pageObjects' import * as EN_LOCALE_DATA from '../../../../benefit-finder/src/shared/locales/en/en.json' -import * as BENEFITS_ELIBILITY_DATA from '../../fixtures/benefits-eligibility.json' +import * as BENEFITS_ELIGIBILITY_DATA from '../../fixtures/benefits-eligibility.json' import content from '../../../src/shared/api/mock-data/current.json' import * as EN_DOLO_MOCK_DATA from '../../../../benefit-finder/src/shared/api/mock-data/current.json' @@ -17,12 +17,12 @@ const { openAllBenefitAccordions, } = dataLayerUtils.dataLayerStructure const { lifeEventForm } = content.data -const selectedData = BENEFITS_ELIBILITY_DATA.scenario_1_covid.en.param -const enResults = BENEFITS_ELIBILITY_DATA.scenario_1_covid.en.results -const zero_benefit_view = BENEFITS_ELIBILITY_DATA.zero_benefit_view.en.results +const selectedData = BENEFITS_ELIGIBILITY_DATA.scenario_1_covid.en.param +const enResults = BENEFITS_ELIGIBILITY_DATA.scenario_1_covid.en.results +const zero_benefit_view = BENEFITS_ELIGIBILITY_DATA.zero_benefit_view.en.results const scenario = utils.encodeURIFromObject(selectedData) -// calculate out elibibility counts we expect for our event values +// calculate out eligibility counts we expect for our event values const eligibilityCount = { eligibleBenefitCount: { number: enResults.eligible.length, @@ -146,7 +146,7 @@ const dataLayerValueFormCompletionModal = { }, } -const dataLayerValueVerifySecletions = { +const dataLayerValueVerifySelections = { event: 'bf_page_change', bfData: { pageView: 'bf-verify-selections', @@ -181,7 +181,7 @@ const dataLayerValues = [ dataLayerValueFormStepTwo, dataLayerValueFormCompletionModal, dataLayerValueFormSubmitSuccess, - dataLayerValueVerifySecletions, + dataLayerValueVerifySelections, dataLayerValueZeroResultsViewEligible, dataLayerValueZeroResultsViewNotEligible, dataLayerValueOpenAllAccordions, @@ -275,7 +275,7 @@ describe('Calls to Google Analytics Object', function () { }) }) - it('second form step bf_page_change event, asserts incrmenting values', function () { + it('second form step bf_page_change event, asserts incrementing values', function () { cy.visit(utils.storybookUri) pageObjects.button().contains(EN_LOCALE_DATA.intro.button).click() @@ -646,13 +646,13 @@ describe('Calls to Google Analytics Object', function () { // get all the events in our layer that matches the event value const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueVerifySecletions.event + x => x?.event === dataLayerValueVerifySelections.event ), ] removeID(ev[4]) expect(ev[4]).to.deep.equal( - dataLayerValueVerifySecletions + dataLayerValueVerifySelections ) }) }) @@ -768,13 +768,13 @@ describe('Calls to Google Analytics Object', function () { // get all the events in our layer that matches the event value const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueVerifySecletions.event + x => x?.event === dataLayerValueVerifySelections.event ), ] removeID(ev[4]) expect(ev[4]).to.deep.equal( - dataLayerValueVerifySecletions + dataLayerValueVerifySelections ) pageObjects @@ -893,7 +893,7 @@ describe('Calls to Google Analytics Object', function () { .then(() => { const ev = [ ...window.dataLayer.filter( - x => x?.event === dataLayerValueVerifySecletions.event + x => x?.event === dataLayerValueVerifySelections.event ), ] @@ -901,7 +901,7 @@ describe('Calls to Google Analytics Object', function () { removeID(ev[4]) expect(ev[4]).to.deep.equal( - dataLayerValueVerifySecletions + dataLayerValueVerifySelections ) pageObjects @@ -971,7 +971,7 @@ describe('Calls to Google Analytics Object', function () { ), ] - // we ignore dedup here so there can be multiple fires + // we ignore dedupe here so there can be multiple fires removeID(ev[1]) expect(ev[1].bfData.accordionsOpen).to.equal( diff --git a/benefit-finder/cypress/e2e/storybook/error-message-display.cy.js b/benefit-finder/cypress/e2e/storybook/error-message-display.cy.js index 75d79c236..e4f4b4792 100644 --- a/benefit-finder/cypress/e2e/storybook/error-message-display.cy.js +++ b/benefit-finder/cypress/e2e/storybook/error-message-display.cy.js @@ -197,27 +197,27 @@ describe('Validate correct error messages display for negative scenarios', () => it('Should validate error label content overrides', () => { pageObjects.button().contains(EN_LOCALE_DATA.buttonGroup[1].value).click() - const relationErrorMessageOvveride = + const relationErrorMessageOverride = EN_DOLO_MOCK_DATA.data.lifeEventForm.sectionsEligibilityCriteria[0] .section.fieldsets[1].fieldset.errorMessage pageObjects .errorDescription() .eq(1) .should('be.visible') - .and('contain.text', relationErrorMessageOvveride) + .and('contain.text', relationErrorMessageOverride) pageObjects .errorDescription() .eq(0) - .should('not.contain.text', relationErrorMessageOvveride) + .should('not.contain.text', relationErrorMessageOverride) pageObjects .dateOfBirthMonthError() - .should('not.contain.text', relationErrorMessageOvveride) + .should('not.contain.text', relationErrorMessageOverride) pageObjects .dateOfBirthDayError() - .should('not.contain.text', relationErrorMessageOvveride) + .should('not.contain.text', relationErrorMessageOverride) pageObjects .dateOfBirthYearError() - .should('not.contain.text', relationErrorMessageOvveride) + .should('not.contain.text', relationErrorMessageOverride) }) }) diff --git a/benefit-finder/cypress/e2e/storybook/openAllAccordions.cy.js b/benefit-finder/cypress/e2e/storybook/openAllAccordions.cy.js index 411c2b425..90ffee49c 100644 --- a/benefit-finder/cypress/e2e/storybook/openAllAccordions.cy.js +++ b/benefit-finder/cypress/e2e/storybook/openAllAccordions.cy.js @@ -1,9 +1,9 @@ import * as utils from '../../support/utils' import { pageObjects } from '../../support/pageObjects' -import * as BENEFITS_ELIBILITY_DATA from '../../fixtures/benefits-eligibility.json' +import * as BENEFITS_ELIGIBILITY_DATA from '../../fixtures/benefits-eligibility.json' beforeEach(() => { - const selectedData = BENEFITS_ELIBILITY_DATA.scenario_1_covid.en.param + const selectedData = BENEFITS_ELIGIBILITY_DATA.scenario_1_covid.en.param const scenario = utils.encodeURIFromObject(selectedData) cy.visit(`${utils.storybookUri}${scenario}`) pageObjects.accordionHeading().should('exist') diff --git a/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js b/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js index 60c4d1f3e..e4a9cc534 100644 --- a/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js +++ b/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js @@ -3,7 +3,7 @@ import { pageObjects } from '../../support/pageObjects' import * as utils from '../../support/utils' import * as EN_DOLO_MOCK_DATA from '../../../../benefit-finder/src/shared/api/mock-data/current.json' -import * as BENEFITS_ELIBILITY_DATA from '../../fixtures/benefits-eligibility.json' +import * as BENEFITS_ELIGIBILITY_DATA from '../../fixtures/benefits-eligibility.json' import content from '../../../../benefit-finder/src/shared/api/mock-data/current.js' import * as EN_LOCALE_DATA from '../../../../benefit-finder/src/shared/locales/en/en.json' const { data } = JSON.parse(content) @@ -31,7 +31,7 @@ const publicSafetyOfficerId = .fieldsets[3].fieldset.inputs[0].inputCriteria.id describe('Validate correct eligibility benefits display based on selected criteria/options', () => { - it('Should render Survivor Benefits for Child benefit accordion correctly based on selected cretiria options', () => { + it('Should render Survivor Benefits for Child benefit accordion correctly based on selected criteria options', () => { // 18 years ago minus one day - applicant under 18 years old // 1 day = 365.2425 (accounts for leap year) const dateOfBirth = utils.getDateByOffset(-(18 * 365.2425 - 1)) @@ -94,8 +94,8 @@ describe('Validate correct eligibility benefits display based on selected criter }) it('qa scenario 1 Covid EN - Verify correct benefit results for query values that includes covid in search parameter of URL', () => { - const selectedData = BENEFITS_ELIBILITY_DATA.scenario_1_covid.en.param - const enResults = BENEFITS_ELIBILITY_DATA.scenario_1_covid.en.results + const selectedData = BENEFITS_ELIGIBILITY_DATA.scenario_1_covid.en.param + const enResults = BENEFITS_ELIGIBILITY_DATA.scenario_1_covid.en.results const scenario = utils.encodeURIFromObject(selectedData) delete selectedData.shared // We don't want to include the "shared" param const selectDataLength = Object.keys(selectedData).length @@ -155,8 +155,8 @@ describe('Validate correct eligibility benefits display based on selected criter }) it('QA scenario 2 Veteran EN - Verify correct benefit results for query values that includes veteran in search parameter of URL', () => { - const selectedData = BENEFITS_ELIBILITY_DATA.scenario_2_veteran.en.param - const enResults = BENEFITS_ELIBILITY_DATA.scenario_2_veteran.en.results + const selectedData = BENEFITS_ELIGIBILITY_DATA.scenario_2_veteran.en.param + const enResults = BENEFITS_ELIGIBILITY_DATA.scenario_2_veteran.en.results const scenario = utils.encodeURIFromObject(selectedData) cy.visit(`${utils.storybookUri}${scenario}`) @@ -173,8 +173,8 @@ describe('Validate correct eligibility benefits display based on selected criter }) it('QA scenario 3 Coal Miner EN - Verify correct benefit results for query values that includes Coal Miner in search parameter of URL', () => { - const selectedData = BENEFITS_ELIBILITY_DATA.scenario_3_coal_miner.en.param - const enResults = BENEFITS_ELIBILITY_DATA.scenario_3_coal_miner.en.results + const selectedData = BENEFITS_ELIGIBILITY_DATA.scenario_3_coal_miner.en.param + const enResults = BENEFITS_ELIGIBILITY_DATA.scenario_3_coal_miner.en.results const scenario = utils.encodeURIFromObject(selectedData) cy.visit(`${utils.storybookUri}${scenario}`) @@ -191,7 +191,7 @@ describe('Validate correct eligibility benefits display based on selected criter }) it('Should display green check icons on eligible benefits', () => { - const selectedData = BENEFITS_ELIBILITY_DATA.scenario_2_veteran.en.param + const selectedData = BENEFITS_ELIGIBILITY_DATA.scenario_2_veteran.en.param const scenario = utils.encodeURIFromObject(selectedData) cy.visit(`${utils.storybookUri}${scenario}`) pageObjects.expandAll().click() @@ -199,8 +199,8 @@ describe('Validate correct eligibility benefits display based on selected criter }) it('Should display Zero benefit view when no benefit are eligible', () => { - const selectedData = BENEFITS_ELIBILITY_DATA.zero_benefit_view.en.param - const enResults = BENEFITS_ELIBILITY_DATA.zero_benefit_view.en.results + const selectedData = BENEFITS_ELIGIBILITY_DATA.zero_benefit_view.en.param + const enResults = BENEFITS_ELIGIBILITY_DATA.zero_benefit_view.en.results const scenario = utils.encodeURIFromObject(selectedData) cy.visit(`${utils.storybookUri}${scenario}`) @@ -217,4 +217,4 @@ describe('Validate correct eligibility benefits display based on selected criter .seeAllBenefitsButton() .should('contain', EN_LOCALE_DATA.resultsView.zeroBenefits.cta) }) -}) \ No newline at end of file +}) diff --git a/benefit-finder/cypress/e2e/usagov-public-site/links.cy.js b/benefit-finder/cypress/e2e/usagov-public-site/links.cy.js index 3593e94b2..ec7225aa3 100644 --- a/benefit-finder/cypress/e2e/usagov-public-site/links.cy.js +++ b/benefit-finder/cypress/e2e/usagov-public-site/links.cy.js @@ -1,5 +1,5 @@ import * as utils from '../../support/utils' -import * as BENEFITS_ELIBILITY_DATA from '../../fixtures/benefits-eligibility.json' +import * as BENEFITS_ELIGIBILITY_DATA from '../../fixtures/benefits-eligibility.json' const localePaths = { en: [ @@ -14,7 +14,7 @@ const localePaths = { ], } -const handlerequest = ({ testLink, link }) => { +const handleRequest = ({ testLink, link }) => { const url = testLink || link.prop('href') return cy .request({ @@ -39,7 +39,7 @@ const handlerequest = ({ testLink, link }) => { const validateErrorCodes = () => { // we verify site is alive and fail on 404 || 503 cy.get('#benefit-finder a[href]').each(link => { - handlerequest({ link }) + handleRequest({ link }) }) } @@ -58,7 +58,7 @@ describe('Verify correct status code handling', () => { // negate validation on our functional code Cypress.on('fail', error => { if (JSON.stringify(error).includes('httpstat')) { - + expect(error).to.not.be.undefined } else { throw error @@ -66,23 +66,23 @@ describe('Verify correct status code handling', () => { }) it(`handles 404 with an error`, () => { - handlerequest({ testLink: 'https://httpstat.us/404' }) + handleRequest({ testLink: 'https://httpstat.us/404' }) }) it(`handles 503 with an error`, () => { - handlerequest({ testLink: 'https://httpstat.us/503' }) + handleRequest({ testLink: 'https://httpstat.us/503' }) }) it(`handles 200 successfully`, () => { - handlerequest({ testLink: 'https://httpstat.us/200' }) + handleRequest({ testLink: 'https://httpstat.us/200' }) }) it(`handles any 403 successfully`, () => { - handlerequest({ testLink: 'https://httpstat.us/403' }) + handleRequest({ testLink: 'https://httpstat.us/403' }) }) it(`handles any other request successfully`, () => { - handlerequest({ testLink: 'https://httpstat.us/201' }) + handleRequest({ testLink: 'https://httpstat.us/201' }) }) }) @@ -90,7 +90,7 @@ describe('Verify correct status code when user navigates links in each locales', localePaths.en.forEach(location => { it(`Verify success status code response for links in ${location.key} en page`, () => { validateLinks({ - selectedData: BENEFITS_ELIBILITY_DATA[`${location.key}`].en.param, + selectedData: BENEFITS_ELIGIBILITY_DATA[`${location.key}`].en.param, path: `benefit-finder/${location.path}`, }) }) @@ -99,7 +99,7 @@ describe('Verify correct status code when user navigates links in each locales', localePaths.es.forEach(location => { it(`Verify success status code response for links in ${location.key} es page`, () => { validateLinks({ - selectedData: BENEFITS_ELIBILITY_DATA[`${location.key}`].en.param, + selectedData: BENEFITS_ELIGIBILITY_DATA[`${location.key}`].en.param, path: `es/buscador-beneficios/${location.path}`, }) }) diff --git a/benefit-finder/cypress/support/utils.js b/benefit-finder/cypress/support/utils.js index f85803edb..cf7213339 100644 --- a/benefit-finder/cypress/support/utils.js +++ b/benefit-finder/cypress/support/utils.js @@ -28,7 +28,7 @@ export const encodeURIFromObject = obj => { .join('&') } -// can be used by all the test that are visiting in storymode +// can be used by all the test that are visiting in story mode export const storybookUri = `/iframe.html?args=&id=app--primary&viewMode=story&` export const dataInputs = ({ dob, relation, status, dod }) => { diff --git a/benefit-finder/index.html b/benefit-finder/index.html index f7a5bf4ca..4bc6b86fe 100644 --- a/benefit-finder/index.html +++ b/benefit-finder/index.html @@ -56,7 +56,7 @@

pagesurvey-qual-container

This HTML file is a template. If you open it directly in the browser, you will see an empty page. - You can add webfonts, meta tags, or analytics to this file. + You can add web fonts, meta tags, or analytics to this file. The build step will place the bundled scripts into the tag. To begin the development, run `npm start` or `yarn start`. diff --git a/benefit-finder/src/App/_index.scss b/benefit-finder/src/App/_index.scss index 69251a7dc..77deaa909 100644 --- a/benefit-finder/src/App/_index.scss +++ b/benefit-finder/src/App/_index.scss @@ -6,7 +6,7 @@ html { min-height: 100vh; } -// try some usa-gov overides +// try some usa-gov overrides .main-content { padding-bottom: 0 !important; } diff --git a/benefit-finder/src/App/index.jsx b/benefit-finder/src/App/index.jsx index 475a9f0d7..055af2497 100644 --- a/benefit-finder/src/App/index.jsx +++ b/benefit-finder/src/App/index.jsx @@ -65,7 +65,7 @@ function App({ testAppContent, testQuery }) { // set data state const [stepDataArray, setStepDataArray] = useState() - const [benfitsArray, setBenefitsArray] = useState() + const [benefitsArray, setBenefitsArray] = useState() useEffect(() => { content && setBenefitsArray([...content.benefits]) @@ -74,9 +74,9 @@ function App({ testAppContent, testQuery }) { }, [content]) // state - const [t] = useState(language === 'es' ? es : en) // tranlations + const [t] = useState(language === 'es' ? es : en) // translations - // update data basd on passed query paramaters + // update data based on passed query parameters useEffect(() => { if (hasQueryParams) { stepDataArray && @@ -84,7 +84,7 @@ function App({ testAppContent, testQuery }) { windowQuery, stepDataArray, setBenefitsArray, - benfitsArray, + benefitsArray, sharedToken ) } @@ -170,7 +170,7 @@ function App({ testAppContent, testQuery }) { relevantBenefits={ content?.lifeEventForm?.relevantBenefits } - data={benfitsArray} + data={benefitsArray} setBenefitsArray={() => setBenefitsArray()} ui={t.resultsView} notEligibleView={i !== 0} diff --git a/benefit-finder/src/Routes/Intro/index.jsx b/benefit-finder/src/Routes/Intro/index.jsx index f0e5d7340..799c92a54 100644 --- a/benefit-finder/src/Routes/Intro/index.jsx +++ b/benefit-finder/src/Routes/Intro/index.jsx @@ -16,7 +16,7 @@ import { import './_index.scss' /** - * a compound component that renders the introductional start of the form process + * a compound component that renders the introduction start of the form process * @component * @param {object} content - inherited life event content * @param {object} ui - life event form ui translations @@ -36,7 +36,7 @@ const Intro = ({ content, ui, hasQueryParams }) => { resetElement.current.focus() } - // if we have query paramters direct user to the results page + // if we have query parameters direct user to the results page useEffect(() => { hasQueryParams && navigate( diff --git a/benefit-finder/src/Routes/LifeEventSection/__tests__/__snapshots__/index.spec.jsx.snap b/benefit-finder/src/Routes/LifeEventSection/__tests__/__snapshots__/index.spec.jsx.snap index fc2999746..4228392ff 100644 --- a/benefit-finder/src/Routes/LifeEventSection/__tests__/__snapshots__/index.spec.jsx.snap +++ b/benefit-finder/src/Routes/LifeEventSection/__tests__/__snapshots__/index.spec.jsx.snap @@ -307,7 +307,7 @@ exports[`LifeEventSection > renders a match to the previous snapshot 1`] = ` >
renders a match to the previous snapshot 1`] = ` aria-errormessage="error-description-applicant_relationship_to_the_deceased_0" aria-invalid="false" class="bf-usa-select usa-select " - data-errormessage="Test overide error label" + data-errormessage="Test override error label" data-testid="applicant_relationship_to_the_deceased_0" id="applicant_relationship_to_the_deceased_0" name="applicant_relationship_to_the_deceased_0" diff --git a/benefit-finder/src/Routes/LifeEventSection/index.jsx b/benefit-finder/src/Routes/LifeEventSection/index.jsx index b3a14d14f..3b732fb4c 100644 --- a/benefit-finder/src/Routes/LifeEventSection/index.jsx +++ b/benefit-finder/src/Routes/LifeEventSection/index.jsx @@ -28,7 +28,7 @@ import './_index.scss' /** * a compound component that renders the main conditional view of the form * @component - * @param {object} data - inherieted life event step data + * @param {object} data - inherited life event step data * @param {func} handleData - inherited state manager * @param {object} ui - inherited ui translations * @return {html} returns a semantic html component that displays a form step @@ -46,7 +46,7 @@ const LifeEventSection = ({ data, handleData, ui }) => { const [submissionCount, setSubmissionCount] = useState(0) const { lifeEventSection } = dataLayerUtils.dataLayerStructure const { buttonGroup, reviewSelectionModal, requiredLabel, sectionHeadings } = - ui // desctructure data + ui // destructure data useHandleUnload(hasData) // alert the user if they try to go back in browser const resetElement = useResetElement() const ROUTES = useContext(RouteContext) @@ -125,7 +125,7 @@ const LifeEventSection = ({ data, handleData, ui }) => { * @function * @return {func} either success or alert handler */ - const handleCheckRequriedFields = () => { + const handleCheckRequiredFields = () => { // collect all the required fields in the current step return errorHandling .handleCheckForRequiredValues(requiredFieldsets, setHasError) @@ -146,7 +146,7 @@ const LifeEventSection = ({ data, handleData, ui }) => { * @return {null} only executes inherited functions */ const handleForwardUpdate = updateIndex => { - handleCheckRequriedFields().then(valid => { + handleCheckRequiredFields().then(valid => { if (valid === true) { // handle dataLayer const { errors } = dataLayerUtils.dataLayerStructure @@ -520,7 +520,7 @@ const LifeEventSection = ({ data, handleData, ui }) => { child => child.fieldsets.length && child.fieldsets.map((childItem, childItemIndex) => { - // if a parent determines the children inputs are hidden, we expect that the seleted values in child items are de-selected + // if a parent determines the children inputs are hidden, we expect that the selected values in child items are de-selected const selectedValue = childItem && apiCalls.GET.SelectedValue(childItem) @@ -587,7 +587,7 @@ const LifeEventSection = ({ data, handleData, ui }) => { ) } triggerLabel={buttonGroup[1].value} - handleCheckRequriedFields={handleCheckRequriedFields} + handleCheckRequiredFields={handleCheckRequiredFields} completed={currentData.completed} /> )} diff --git a/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap b/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap index 9f3f00aee..6a1bd88f0 100644 --- a/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap +++ b/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap @@ -457,7 +457,7 @@ exports[`loads view 1`] = ` class="bf-usa-detail-summary" >

- Compensation to surviving spouses of coal minerstotally disabled by or whose deaths are attributable to pneumoconiosis. + Compensation to surviving spouses of coal miners totally disabled by or whose deaths are attributable to pneumoconiosis.

More benefits @@ -6796,7 +6796,7 @@ exports[`scenario 1 loads in view with the correct amount of likely eligible ite class="bf-usa-detail-summary" >

- Compensation to surviving spouses of coal minerstotally disabled by or whose deaths are attributable to pneumoconiosis. + Compensation to surviving spouses of coal miners totally disabled by or whose deaths are attributable to pneumoconiosis.

More benefits diff --git a/benefit-finder/src/Routes/ResultsView/__tests__/index.spec.jsx b/benefit-finder/src/Routes/ResultsView/__tests__/index.spec.jsx index a128bf303..10b6fa63c 100644 --- a/benefit-finder/src/Routes/ResultsView/__tests__/index.spec.jsx +++ b/benefit-finder/src/Routes/ResultsView/__tests__/index.spec.jsx @@ -127,7 +127,7 @@ test('scenario 1 loads in view with the correct amount of likely eligible items' await screen.findByTestId('bf-result-view') await screen.findByTestId('bf-share-trigger') - const eligibility = apiCalls.GET.ElegibilityByCriteria( + const eligibility = apiCalls.GET.EligibilityByCriteria( stepDataArray, benefitsArray ) diff --git a/benefit-finder/src/Routes/ResultsView/components/Results/index.jsx b/benefit-finder/src/Routes/ResultsView/components/Results/index.jsx index b1ca73a02..ddf9c8cf2 100644 --- a/benefit-finder/src/Routes/ResultsView/components/Results/index.jsx +++ b/benefit-finder/src/Routes/ResultsView/components/Results/index.jsx @@ -138,9 +138,9 @@ const Results = ({ const RelevantBenefits = ({ relevantBenefits, ui }) => { const { resultsRelativeBenefits } = ui return ( -
+
{resultsRelativeBenefits?.heading} @@ -163,7 +163,7 @@ const Results = ({ { const resetElement = useResetElement() /** - * afunctional component that renders markup when no value has been given + * a functional component that renders markup when no value has been given * @component * @param {object} item - fieldset object with no selected value * @param {number} index - current index of mapped array diff --git a/benefit-finder/src/shared/api/__tests__/apiCallsGetElegibilityByCriteria.spec.js b/benefit-finder/src/shared/api/__tests__/apiCallsGetElegibilityByCriteria.spec.js index e1cf6f135..364d9b984 100644 --- a/benefit-finder/src/shared/api/__tests__/apiCallsGetElegibilityByCriteria.spec.js +++ b/benefit-finder/src/shared/api/__tests__/apiCallsGetElegibilityByCriteria.spec.js @@ -2,7 +2,7 @@ import * as apiCalls from '../apiCalls' import content from '../mock-data/current' const { data } = JSON.parse(content) -// Our method ElegibilityByCriteria is a function that updates the data determined by eligibility of benefits from selected values +// Our method EligibilityByCriteria is a function that updates the data determined by eligibility of benefits from selected values // Write a spec that takes in the following parameters @@ -102,7 +102,7 @@ test('correctly returns eligibility state based on selected values', async () => expect(selectedValues[1].values).toHaveProperty('value', selectedValue) expect(selectedValues[1].values).toHaveProperty('selected', true) - const eligibility = apiCalls.GET.ElegibilityByCriteria( + const eligibility = apiCalls.GET.EligibilityByCriteria( selectedValues, benefits ) diff --git a/benefit-finder/src/shared/api/__tests__/apiCallsPutData.spec.js b/benefit-finder/src/shared/api/__tests__/apiCallsPutData.spec.js index abe2c2d03..258582b9e 100644 --- a/benefit-finder/src/shared/api/__tests__/apiCallsPutData.spec.js +++ b/benefit-finder/src/shared/api/__tests__/apiCallsPutData.spec.js @@ -78,7 +78,7 @@ test('correctly update data after updated selected state', async () => { }) }) -test('does not update data if values dont match', async () => { +test('does not update data if values do not match', async () => { delete expectedUpdate[0].selected expect(expectedUpdate[0].selected).toBe(undefined) eventTargetValue = badString @@ -93,7 +93,7 @@ test('does not update data if values dont match', async () => { }) }) -test('does not update data if keys dont match', async () => { +test('does not update data if keys do not match', async () => { expect(expectedUpdate[0].selected).toBe(undefined) eventTargetValue = goodString criteriaKey = badCriteriaKey diff --git a/benefit-finder/src/shared/api/__tests__/apiCallsUtilsDateEligibility.spec.js b/benefit-finder/src/shared/api/__tests__/apiCallsUtilsDateEligibility.spec.js index 8645db5b7..af2b2f179 100644 --- a/benefit-finder/src/shared/api/__tests__/apiCallsUtilsDateEligibility.spec.js +++ b/benefit-finder/src/shared/api/__tests__/apiCallsUtilsDateEligibility.spec.js @@ -37,7 +37,7 @@ const sameDate = { year: 2023, month: 0, day: 1 } const closerDate = { year: 2023, month: 0, day: 2 } // younger const furtherDate = { year: 2022, month: 11, day: 30 } // older -// dynamicly generate to -18 years from todays date +// dynamically generate to -18 years from todays date const age18 = new window.Date( new Date().getFullYear() - 18, new Date().getMonth(), @@ -280,7 +280,7 @@ test('correctly accepts and evaluates a date object compared to a length of time ) }) -test('other correctly accepts and evaluates a date object compared to a length of time of the conditional where the conditional time values are diffr', () => { +test('other correctly accepts and evaluates a date object compared to a length of time of the conditional where the conditional time values are different', () => { conditionalsOthers.forEach(conditional => expect( apiCalls.UTILS.DateEligibility({ diff --git a/benefit-finder/src/shared/api/apiCalls.js b/benefit-finder/src/shared/api/apiCalls.js index eadfbd5ae..e306b43a0 100644 --- a/benefit-finder/src/shared/api/apiCalls.js +++ b/benefit-finder/src/shared/api/apiCalls.js @@ -172,7 +172,7 @@ export function GetQueryParams(url) { */ /** - * a function that determines our langage state based on the prefix of our URL + * a function that determines our language state based on the prefix of our URL * based on a string match in the pathname of the window object * @function */ @@ -223,7 +223,7 @@ export const Routes = (w, language, stepDataArray) => { }) /** - * Determine the path for the verify selcttions page based on the language. + * Determine the path for the verify selections page based on the language. */ const verifySelectionsPath = language === 'es' ? 'revisar-selecciónes' : 'verify-selections' @@ -263,7 +263,7 @@ export const Routes = (w, language, stepDataArray) => { * an async fetch to get life-event data. * @function * @param {string} lifeEvent - The inherited class from - * @return {JSON} returns JSON data if succesfull + * @return {JSON} returns JSON data if successful */ export async function LifeEvent(lifeEvent) { let language, params, mode @@ -371,7 +371,7 @@ export const SelectedValueAll = data => * @param {array} data - array of benefits * @return {array} returns the selected values */ -export const ElegibilityByCriteria = (selectedCriteria, data) => { +export const EligibilityByCriteria = (selectedCriteria, data) => { // console.log(data) // return all eligible items const eligibleItems = @@ -384,7 +384,7 @@ export const ElegibilityByCriteria = (selectedCriteria, data) => { criteria => criteria.criteriaKey === selected.criteriaKey ) - // determine it's eligiblity + // determine it's eligibility if (criteriaEligibility !== undefined) { // look for eligible matches const isEligible = () => { @@ -429,7 +429,7 @@ export const ElegibilityByCriteria = (selectedCriteria, data) => { * @param {object} currentData * @param {function} setCurrentData * @param {string} eventTargetValue - * @return {JSON || String} returns JSON data if succesfull + * @return {JSON || String} returns JSON data if successful */ export async function Data( criteriaKey, @@ -470,7 +470,7 @@ export async function Data( * @param {function} setCurrentData * @param {string} eventTargetValue * @param {string} eventTargetID - * @return {JSON || String} returns JSON data if succesfull + * @return {JSON || String} returns JSON data if successful */ export async function DataDate( criteriaKey, @@ -598,7 +598,7 @@ export const DataFromParams = ( * Updates the benefits array based on the updated step data array. */ setBenefitsArray( - GET.ElegibilityByCriteria( + GET.EligibilityByCriteria( GET.SelectedValueAll(stepDataArray), benefitsArray ) @@ -674,7 +674,7 @@ export const BenefitsEligibilityCounts = async (data, eligibleStatusLabels) => { export const GET = { BenefitsEligibilityCounts, Children, - ElegibilityByCriteria, + EligibilityByCriteria, LifeEvent, Language, Routes, diff --git a/benefit-finder/src/shared/api/mock-data/current.js b/benefit-finder/src/shared/api/mock-data/current.js index ca9a7dea4..ca3e91261 100644 --- a/benefit-finder/src/shared/api/mock-data/current.js +++ b/benefit-finder/src/shared/api/mock-data/current.js @@ -65,7 +65,7 @@ const content = `{ "legend": "Relationship to the deceased", "required": true, "hint": "", - "errorMessage": "Test overide error label", + "errorMessage": "Test override error label", "inputs": [ { "inputCriteria": { @@ -675,7 +675,7 @@ const content = `{ { "benefit": { "title": "Coal mine workers' compensation (black lung benefits) for surviving spouse", - "summary": "

Compensation to surviving spouses of coal minerstotally disabled by or whose deaths are attributable to pneumoconiosis.

", + "summary": "

Compensation to surviving spouses of coal miners totally disabled by or whose deaths are attributable to pneumoconiosis.

", "SourceLink": "https://www.dol.gov/agencies/owcp/dcmwc/filing_guide_survivor", "SourceIsEnglish": true, "agency": { diff --git a/benefit-finder/src/shared/api/mock-data/current.json b/benefit-finder/src/shared/api/mock-data/current.json index c1d9509df..10a1d3b69 100644 --- a/benefit-finder/src/shared/api/mock-data/current.json +++ b/benefit-finder/src/shared/api/mock-data/current.json @@ -65,7 +65,7 @@ "legend": "Relationship to the deceased", "required": true, "hint": "", - "errorMessage": "Test overide error label", + "errorMessage": "Test override error label", "inputs": [ { "inputCriteria": { @@ -663,7 +663,7 @@ { "benefit": { "title": "Coal mine workers' compensation (black lung benefits) for surviving spouse", - "summary": "

Compensation to surviving spouses of coal minerstotally disabled by or whose deaths are attributable to pneumoconiosis.

", + "summary": "

Compensation to surviving spouses of coal miners totally disabled by or whose deaths are attributable to pneumoconiosis.

", "SourceLink": "https://www.dol.gov/agencies/owcp/dcmwc/filing_guide_survivor", "SourceIsEnglish": true, "agency": { diff --git a/benefit-finder/src/shared/components/Accordion/index.jsx b/benefit-finder/src/shared/components/Accordion/index.jsx index d6859e279..5d6324e8b 100644 --- a/benefit-finder/src/shared/components/Accordion/index.jsx +++ b/benefit-finder/src/shared/components/Accordion/index.jsx @@ -33,7 +33,7 @@ const Accordion = ({ } }) /** - * a hook that hanldes our open state of the accordion + * a hook that handles our open state of the accordion * @function * @return {boolean} returns true or false */ diff --git a/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx b/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx index 071fd08cc..9cc7c11f3 100644 --- a/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx +++ b/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx @@ -4,7 +4,7 @@ import { Accordion, Button, Heading, - KeyElegibilityCrieriaList, + KeyEligibilityCriteriaList, StepBackButton, ObfuscatedLink, } from '@components' @@ -15,10 +15,10 @@ import './_index.scss' * @component * @param {array} data - our benefits data * @param {string} entryKey - which key in the array to target - * @param {bool} expandAll - determnines if we include ExpandAll component + * @param {bool} expandAll - determines if we include ExpandAll component * @param {bool} isExpandAll - determines if all the accordions in the group are expanded * @param {function} setExpandAll - inherited useState function - * @param {function} notEligibleView - inherited bolean state + * @param {function} notEligibleView - inherited boolean state * @param {object} returnToForm - inherited object for more info cta * @param {object} ui - inherited ui content * @return {html} returns html @@ -112,7 +112,7 @@ const BenefitAccordionGroup = ({ * a functional component that list unmet criteria * @component * @param {array} item - an array of unmet criteria - * @return {html} returns an unorderd list + * @return {html} returns an unordered list */ const NotEligibleList = ({ items }) => { return ( @@ -139,7 +139,7 @@ const BenefitAccordionGroup = ({ * a functional component that list unmet criteria * @component * @param {array} item - an array of unmet criteria - * @return {html} returns an unorderd list + * @return {html} returns an unordered list */ const MoreInfoList = ({ items }) => { return ( @@ -233,7 +233,7 @@ const BenefitAccordionGroup = ({ className="bf-usa-detail-summary" dangerouslySetInnerHTML={createMarkup(summary)} /> - { return ( diff --git a/benefit-finder/src/shared/components/Date/index.jsx b/benefit-finder/src/shared/components/Date/index.jsx index d3eb7b989..68a0d4fa6 100644 --- a/benefit-finder/src/shared/components/Date/index.jsx +++ b/benefit-finder/src/shared/components/Date/index.jsx @@ -12,7 +12,7 @@ import './_index.scss' * @param {string} id - inherited string value for id specificity * @param {array} invalid - inherited boolean value to manage error state - * @return {Date} returns a tandard format Date ie 1995-12-17T03:24:00 + * @return {Date} returns a standard format Date ie 1995-12-17T03:24:00 */ const Date = ({ onChange, diff --git a/benefit-finder/src/shared/components/Fieldset/index.jsx b/benefit-finder/src/shared/components/Fieldset/index.jsx index 18b633794..6fe674f0c 100644 --- a/benefit-finder/src/shared/components/Fieldset/index.jsx +++ b/benefit-finder/src/shared/components/Fieldset/index.jsx @@ -58,7 +58,7 @@ const Fieldset = ({ ) - // determine if we need to include a reqired hint + // determine if we need to include a required hint const handleRequired = required === false ? {legend} : RequiredFlag() diff --git a/benefit-finder/src/shared/components/Heading/index.jsx b/benefit-finder/src/shared/components/Heading/index.jsx index b3365da31..00611c35d 100644 --- a/benefit-finder/src/shared/components/Heading/index.jsx +++ b/benefit-finder/src/shared/components/Heading/index.jsx @@ -14,7 +14,7 @@ const Heading = ({ children, className, headingLevel, ...props }) => { // pass our default classes const defaultClasses = [''] - // return html as a tring for heading element values + // return html as a string for heading element values const Tag = `h${headingLevel}` return ( renders a match to the previous snapshot 1`] = ` +exports[`KeyEligibilityCriteriaList > renders a match to the previous snapshot 1`] = `
{ +describe('KeyEligibilityCriteriaList', () => { it('renders a match to the previous snapshot', () => { const { asFragment } = render( - + ) expect(asFragment()).toMatchSnapshot() }) diff --git a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/_index.scss b/benefit-finder/src/shared/components/KeyEligibilityCriteriaList/_index.scss similarity index 100% rename from benefit-finder/src/shared/components/KeyElegibilityCrieriaList/_index.scss rename to benefit-finder/src/shared/components/KeyEligibilityCriteriaList/_index.scss diff --git a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx b/benefit-finder/src/shared/components/KeyEligibilityCriteriaList/index.jsx similarity index 90% rename from benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx rename to benefit-finder/src/shared/components/KeyEligibilityCriteriaList/index.jsx index c604150f3..72df0ea1f 100644 --- a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx +++ b/benefit-finder/src/shared/components/KeyEligibilityCriteriaList/index.jsx @@ -4,14 +4,14 @@ import { useHandleClassName } from '@hooks' import './_index.scss' /** - * a functional component that renders a list of criteria related to eligiblity + * a functional component that renders a list of criteria related to eligibility * @component * @param {string} className - inherited class names * @param {array} data - contains our criteria * @param {string} initialEligibilityLength - location - * @return {html} returns a group with a heading and an unorderd list + * @return {html} returns a group with a heading and an unordered list */ -const KeyElegibilityCrieriaList = ({ +const KeyEligibilityCriteriaList = ({ className, data, initialEligibilityLength, @@ -59,10 +59,10 @@ const KeyElegibilityCrieriaList = ({ ) } -KeyElegibilityCrieriaList.propTypes = { +KeyEligibilityCriteriaList.propTypes = { className: PropTypes.string, data: PropTypes.array, initialEligibilityLength: PropTypes.number, } -export default KeyElegibilityCrieriaList +export default KeyEligibilityCriteriaList diff --git a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.stories.jsx b/benefit-finder/src/shared/components/KeyEligibilityCriteriaList/index.stories.jsx similarity index 83% rename from benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.stories.jsx rename to benefit-finder/src/shared/components/KeyEligibilityCriteriaList/index.stories.jsx index 4b080fc1a..db397d1de 100644 --- a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.stories.jsx +++ b/benefit-finder/src/shared/components/KeyEligibilityCriteriaList/index.stories.jsx @@ -1,4 +1,4 @@ -import KeyElegibilityCrieriaList from './index.jsx' +import KeyEligibilityCriteriaList from './index.jsx' import content from '@api/mock-data/current.js' import * as en from '@locales/en/en.json' @@ -10,7 +10,7 @@ const b = benefits[0].benefit.eligibility const initialEligibilityLength = benefits[0].benefit.initialEligibilityLength export default { - component: KeyElegibilityCrieriaList, + component: KeyEligibilityCriteriaList, tags: ['autodocs'], args: { data: b, diff --git a/benefit-finder/src/shared/components/Label/index.jsx b/benefit-finder/src/shared/components/Label/index.jsx index 178415185..5f7316ca1 100644 --- a/benefit-finder/src/shared/components/Label/index.jsx +++ b/benefit-finder/src/shared/components/Label/index.jsx @@ -6,7 +6,7 @@ import './_index.scss' /** * a functional component to create a label for inputs. * @function - * @param {string} label - The inherited lable value + * @param {string} label - The inherited label value * @param {string} htmlFor - The inherited component id that the label is related to * @return {html} returns a semantic html label */ diff --git a/benefit-finder/src/shared/components/Modal/index.jsx b/benefit-finder/src/shared/components/Modal/index.jsx index 81b531f92..e3cf5765f 100644 --- a/benefit-finder/src/shared/components/Modal/index.jsx +++ b/benefit-finder/src/shared/components/Modal/index.jsx @@ -46,8 +46,8 @@ const customStyles = { * @param {string} modalHeading - heading value * @param {string} navItemOneLabel - passed to button for nav item in modal * @param {string} navItemTwoLabel - passed to button for nav item in modal - * @param {function} handleCheckRequriedFields - inherited async function to check validity of fields - * @return {html} returns html for seting up a usa-modal component + * @param {function} handleCheckRequiredFields - inherited async function to check validity of fields + * @return {html} returns html for setting up a usa-modal component */ const Modal = ({ id, @@ -58,7 +58,7 @@ const Modal = ({ navItemOneFunction, navItemTwoLabel, navItemTwoFunction, - handleCheckRequriedFields, + handleCheckRequiredFields, dataLayerValue, }) => { // state @@ -71,7 +71,7 @@ const Modal = ({ * @function */ const handleOpenModal = () => { - handleCheckRequriedFields().then(valid => valid && setModalOpen(valid)) + handleCheckRequiredFields().then(valid => valid && setModalOpen(valid)) window.scrollTo(0, 0) } @@ -142,7 +142,7 @@ const Modal = ({ * @component * @param {string} id - matches to modal control * @param {string} triggerLabel - passed to button for triggering modal - * @return {html} returns an obfustacted anchor element + * @return {html} returns an obfuscated anchor element */ const Trigger = ({ triggerLabel, onKeyDown, onClick }) => { return ( @@ -167,7 +167,7 @@ const Modal = ({ * @param {func} navItemOneFunction - passed to button for nav item in modal * @param {string} navItemOneLabel - passed to button for nav item in modal * @param {func} navItemTwoFunction - passed to button for nav item in modal - * @return {html} returns an obfustacted anchor element + * @return {html} returns an obfuscated anchor element */ // similar to ButtonGroup but we need links for uswds to close modal, this item is default and conditional const GroupNavigation = ({ @@ -276,7 +276,7 @@ Modal.propTypes = { navItemOneFunction: PropTypes.func, navItemTwoLabel: PropTypes.string, navItemTwoFunction: PropTypes.func, - handleCheckRequriedFields: PropTypes.func, + handleCheckRequiredFields: PropTypes.func, } export default Modal diff --git a/benefit-finder/src/shared/components/Modal/index.stories.jsx b/benefit-finder/src/shared/components/Modal/index.stories.jsx index d3d2f653a..ee722e3c0 100644 --- a/benefit-finder/src/shared/components/Modal/index.stories.jsx +++ b/benefit-finder/src/shared/components/Modal/index.stories.jsx @@ -21,7 +21,7 @@ export default { navItemTwoLabel: 'View Results', navItemOneFunction: () => setModalOpen(!modalOpen), navItemTwoFunction: () => setModalOpen(!modalOpen), - handleCheckRequriedFields: () => true, + handleCheckRequiredFields: () => true, completed: true, }, } diff --git a/benefit-finder/src/shared/components/Paragraph/index.stories.jsx b/benefit-finder/src/shared/components/Paragraph/index.stories.jsx index 228c091ad..6b5d365c1 100644 --- a/benefit-finder/src/shared/components/Paragraph/index.stories.jsx +++ b/benefit-finder/src/shared/components/Paragraph/index.stories.jsx @@ -14,7 +14,7 @@ export default { }, args: { children: - 'Lorem ipsum dolor sit amet consectetur. Consectetur felis fermentum eu nunc elit imperdiet. Aenean porta sem sed nulla rutrum orci morbi non. Sollicitudin proin lorem magna ultrices gravida sem donec.', + 'As we embarked on developing the Benefit Finder platform, our goal was to provide an intuitive and efficient way for users to explore their benefits options. Through meticulous planning, design, and development, we were able to create a user-friendly interface that not only meets but exceeds the expectations of our users.', }, } diff --git a/benefit-finder/src/shared/components/ShareTrigger/index.jsx b/benefit-finder/src/shared/components/ShareTrigger/index.jsx index 03dc78865..08aa2f559 100644 --- a/benefit-finder/src/shared/components/ShareTrigger/index.jsx +++ b/benefit-finder/src/shared/components/ShareTrigger/index.jsx @@ -3,7 +3,7 @@ import { RouteContext } from '@/App' import { buildURIParameter } from '@utils' /** - * a functional component that renders a button with copy-to-cipboard functionality + * a functional component that renders a button with copy-to-clipboard functionality * @component * @return {html} returns a semantic html button element with a custom function onClick event */ diff --git a/benefit-finder/src/shared/components/StepBackButton/index.jsx b/benefit-finder/src/shared/components/StepBackButton/index.jsx index b7148f4da..6c33e4679 100644 --- a/benefit-finder/src/shared/components/StepBackButton/index.jsx +++ b/benefit-finder/src/shared/components/StepBackButton/index.jsx @@ -7,7 +7,7 @@ import './_index.scss' /** * a functional component that supports backwards navigation in the step indicator component * @component - * @param {React.ReactNode} children - inhertied child react nodes for label + * @param {React.ReactNode} children - inherited child react nodes for label * @param {function} onClick - inherited click function * @return {html} returns markup for a usa unstyled button */ diff --git a/benefit-finder/src/shared/components/StepIndicator/index.jsx b/benefit-finder/src/shared/components/StepIndicator/index.jsx index 98717d68a..0c45d0dac 100644 --- a/benefit-finder/src/shared/components/StepIndicator/index.jsx +++ b/benefit-finder/src/shared/components/StepIndicator/index.jsx @@ -8,7 +8,7 @@ import './_index.scss' * @param {array} data - an array of sections * @param {boolean} noHeadings - determinate to render headings or not * @param {number} current - inherited state, indicates index value - * @param {boolean} setCurrent - inherited function to mangae index value + * @param {boolean} setCurrent - inherited function to manage index value * @param {func} handleCheckRequiredFields - inherited handler * @return {html} returns markup for a usa step indicator */ @@ -17,7 +17,7 @@ const StepIndicator = ({ noHeadings, current, setCurrent, - handleCheckRequriedFields, + handleCheckRequiredFields, }) => { /** * a functional component that supports a11y for completed steps @@ -92,7 +92,7 @@ const StepIndicator = ({ current={current} setCurrent={setCurrent} completed={isCompleted} - handleCheckRequriedFields={handleCheckRequriedFields} + handleCheckRequiredFields={handleCheckRequiredFields} /> ) })} diff --git a/benefit-finder/src/shared/components/TextInput/index.jsx b/benefit-finder/src/shared/components/TextInput/index.jsx index 2b298e988..0aa922bdf 100644 --- a/benefit-finder/src/shared/components/TextInput/index.jsx +++ b/benefit-finder/src/shared/components/TextInput/index.jsx @@ -6,7 +6,7 @@ import './_index.scss' /** * a functional component that renders a field for text input * @component - * @param {string} id - unique identifire + * @param {string} id - unique Identifier * @param {string} className - inherited classes * @param {string} label - string value for input label * @param {boolean} textarea - conditional to render textarea as return diff --git a/benefit-finder/src/shared/components/index.js b/benefit-finder/src/shared/components/index.js index 4c7a605b0..8529a2661 100644 --- a/benefit-finder/src/shared/components/index.js +++ b/benefit-finder/src/shared/components/index.js @@ -12,7 +12,7 @@ import Form from './Form' import Heading from './Heading' import Hint from './Hint' import Icon from './Icon' -import KeyElegibilityCrieriaList from './KeyElegibilityCrieriaList' +import KeyEligibilityCriteriaList from './KeyEligibilityCriteriaList' import Legend from './Legend' import Label from './Label' import Modal from './Modal' @@ -47,7 +47,7 @@ export { Heading, Hint, Icon, - KeyElegibilityCrieriaList, + KeyEligibilityCriteriaList, Legend, Label, Modal, diff --git a/benefit-finder/src/shared/hooks/useCrazyEggUpdate/index.js b/benefit-finder/src/shared/hooks/useCrazyEggUpdate/index.js deleted file mode 100644 index 555642bd7..000000000 --- a/benefit-finder/src/shared/hooks/useCrazyEggUpdate/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import { useEffect } from 'react' -import { windowSize } from '@utils' - -const useCrazyEggUpdate = ({ pageView, notEligibleView }) => { - const isDesktop = windowSize(window).desktop - // handle dataLayer - useEffect(() => { - // crazyegg - const crazyeggEl = document.getElementById('bf-track-by-name') - const lifeEventId = document.querySelector('[data-testid="app"]') - - const device = isDesktop ? 'desktop' : 'mobile' - const newContent = `var CE_SNAPSHOT_NAME = "${pageView}-${lifeEventId?.id}-${device}";` - - if (crazyeggEl !== null) { - crazyeggEl.innerHTML = newContent - } - }, [isDesktop, notEligibleView]) -} - -export default useCrazyEggUpdate diff --git a/benefit-finder/src/shared/hooks/useHandleUnload/index.js b/benefit-finder/src/shared/hooks/useHandleUnload/index.js index 97767499d..61fae0118 100644 --- a/benefit-finder/src/shared/hooks/useHandleUnload/index.js +++ b/benefit-finder/src/shared/hooks/useHandleUnload/index.js @@ -10,7 +10,7 @@ const useHandleUnload = hasData => { * a state function to manage a native alert to user if data has values * @function * @param {boolean} hasData - state of data - * @return {effect} returns eventhandler + * @return {effect} returns event handler */ // Sets up prompt that if user hits browser back/refresh button and has imputed any data will alert that data will be lost diff --git a/benefit-finder/src/shared/hooks/useResetElement/index.js b/benefit-finder/src/shared/hooks/useResetElement/index.js index f2c0d94cf..949a5f202 100644 --- a/benefit-finder/src/shared/hooks/useResetElement/index.js +++ b/benefit-finder/src/shared/hooks/useResetElement/index.js @@ -7,12 +7,12 @@ const useResetElement = () => { * @return {React.ref} returns ref element */ - // example useage + // example use // assign hook to const // const resetElement = useResetElement() - // foucus element as needed in an effect or synthetic event + // focus element as needed in an effect or synthetic event // useEffect(() => { // resetElement.current?.focus() diff --git a/benefit-finder/src/shared/utils/dataLayerUtils/dataLayerPush.js b/benefit-finder/src/shared/utils/dataLayerUtils/dataLayerPush.js index 3454901a5..3595f182d 100644 --- a/benefit-finder/src/shared/utils/dataLayerUtils/dataLayerPush.js +++ b/benefit-finder/src/shared/utils/dataLayerUtils/dataLayerPush.js @@ -1,4 +1,4 @@ -const dataLayerPush = (w, dataLayerObj, dedup = true) => { +const dataLayerPush = (w, dataLayerObj, dedupe = true) => { const isObject = object => { return object != null && typeof object === 'object' } @@ -34,8 +34,8 @@ const dataLayerPush = (w, dataLayerObj, dedup = true) => { delete lastItem['gtm.uniqueEventId'] delete lastItem.eventCallback - if (dedup === true) { - // to prevent pushing duplicate objects unecessarily, as long as our last item doesn't match our current data obj, we push + if (dedupe === true) { + // to prevent pushing duplicate objects unnecessarily, as long as our last item doesn't match our current data obj, we push isDeepEqual(lastItem, dataLayerObj) === false && w.dataLayer.push(dataLayerObj) } else { diff --git a/benefit-finder/src/shared/utils/dateInputValidation/index.js b/benefit-finder/src/shared/utils/dateInputValidation/index.js index 7b77f36a3..830e5ce4d 100644 --- a/benefit-finder/src/shared/utils/dateInputValidation/index.js +++ b/benefit-finder/src/shared/utils/dateInputValidation/index.js @@ -11,7 +11,7 @@ const dateInputValidation = event => { const currentYear = new Date().getFullYear().toString() const yearLimit = currentYear.substring(currentYear.length - 1) if (event.target.value.length === 4) { - // 1900 - currentyear + // 1900 - current year const range = new RegExp( `^(19[0-9][0-9]|20[0-1][0-9]|20[0-2][0-${yearLimit}])$` ) diff --git a/benefit-finder/src/shared/utils/errorHandling/index.js b/benefit-finder/src/shared/utils/errorHandling/index.js index a41636aa5..3cbdf5c42 100644 --- a/benefit-finder/src/shared/utils/errorHandling/index.js +++ b/benefit-finder/src/shared/utils/errorHandling/index.js @@ -90,7 +90,7 @@ export const handleCheckForRequiredValues = async ( }) .flat() - // handle radios/checks seperately + // handle radios/checks separately const invalidRadioFieldSets = requiredFieldsets .map(fieldset => { if ( @@ -135,11 +135,11 @@ export const handleInvalid = ({ }) .includes(true) - const hanldeFilter = hasError.filter(errorItem => { + const handleFilter = hasError.filter(errorItem => { return errorItem.id !== undefined && errorItem.id.includes(fieldSetId) }) - return useFilter === true ? hanldeFilter : handleMap + return useFilter === true ? handleFilter : handleMap } export default { diff --git a/benefit-finder/vite.config.mjs b/benefit-finder/vite.config.mjs index 7978387f9..5332b69d5 100644 --- a/benefit-finder/vite.config.mjs +++ b/benefit-finder/vite.config.mjs @@ -33,7 +33,7 @@ const copyConfig = test hook: 'writeBundle', } -const poscssConfig = { +const postcssConfig = { plugins: [ transformers.prependID({ id: 'benefit-finder', @@ -74,7 +74,7 @@ export default defineConfig({ include: ['jsdoc-type-pratt-parser'], }, css: { - postcss: poscssConfig, + postcss: postcssConfig, preprocessorOptions: { scss: { api: 'modern-compiler', From 91bd8301a5b301f78a6fcf279150a2493014eab5 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Fri, 13 Dec 2024 13:13:23 -0500 Subject: [PATCH 26/65] PXBF-1983-spell-checker-updates: update lint-stage to check for spelling errors --- benefit-finder/.lintstagedrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/benefit-finder/.lintstagedrc b/benefit-finder/.lintstagedrc index cb3fd40f8..569c868ad 100644 --- a/benefit-finder/.lintstagedrc +++ b/benefit-finder/.lintstagedrc @@ -9,5 +9,8 @@ ], "src/**/*.scss": [ "stylelint --fix" + ], + "**": [ + "cspell lint" ] } From 1eac82eaf1e6b434c3dd0c71fba8083bc5142f70 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 16 Dec 2024 14:12:56 -0500 Subject: [PATCH 27/65] PXBF-1996-bug-fix-button-group: lifting component to parent render process to avoid unecessary re-renders --- .../src/shared/components/Modal/index.jsx | 37 +++++-------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/benefit-finder/src/shared/components/Modal/index.jsx b/benefit-finder/src/shared/components/Modal/index.jsx index e3cf5765f..3006810db 100644 --- a/benefit-finder/src/shared/components/Modal/index.jsx +++ b/benefit-finder/src/shared/components/Modal/index.jsx @@ -137,29 +137,6 @@ const Modal = ({ }) }, [modalOpen]) - /** - * a functional component that renders a link as a button for launching our dialog - * @component - * @param {string} id - matches to modal control - * @param {string} triggerLabel - passed to button for triggering modal - * @return {html} returns an obfuscated anchor element - */ - const Trigger = ({ triggerLabel, onKeyDown, onClick }) => { - return ( - - {triggerLabel} - - ) - } - /** * a functional component that renders a two links as a buttons for navigating out of the dialog * @component @@ -225,11 +202,17 @@ const Modal = ({ return (
- handleKeyValidation(e) && handleOpenModal()} + handleOpenModal()} - > + onKeyDown={e => handleKeyValidation(e) && handleOpenModal()} + noCarrot + tabIndex="0" + triggerRef={triggerRef} + aria-label="Continue" + role="button" + > + {triggerLabel} + Date: Mon, 16 Dec 2024 14:44:52 -0500 Subject: [PATCH 28/65] Add login module uninstall --- scripts/drush-post-deploy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/drush-post-deploy.sh b/scripts/drush-post-deploy.sh index b71c5ddd1..ef506e7e0 100755 --- a/scripts/drush-post-deploy.sh +++ b/scripts/drush-post-deploy.sh @@ -13,6 +13,7 @@ drush cr drush state:set system.maintenance_mode 0 -y drush user:create test_test --password="TU_PASS" || true drush user:password test_test "TU_PASS" +drush pm:uninstall usagov_login echo "Post deploy finished!" From 0bb777557c7c5c04f7f508b88147894876016e20 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 16 Dec 2024 14:51:37 -0500 Subject: [PATCH 29/65] PXBF-1987-update-router-v7: opt into future browser route api features --- benefit-finder/src/App/index.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/benefit-finder/src/App/index.jsx b/benefit-finder/src/App/index.jsx index 055af2497..24b9fb97f 100644 --- a/benefit-finder/src/App/index.jsx +++ b/benefit-finder/src/App/index.jsx @@ -114,7 +114,13 @@ function App({ testAppContent, testQuery }) { data-testid="app" data-version={version} > - + Date: Mon, 16 Dec 2024 14:58:14 -0500 Subject: [PATCH 30/65] PXBF-1987-update-router-v7: update router to v7 --- benefit-finder/package-lock.json | 75 +++++++++++-------- benefit-finder/package.json | 3 +- benefit-finder/src/App/index.jsx | 10 +-- .../src/Routes/Intro/__tests__/index.spec.jsx | 2 +- benefit-finder/src/Routes/Intro/index.jsx | 2 +- .../LifeEventSection/__tests__/index.spec.jsx | 2 +- .../src/Routes/LifeEventSection/index.jsx | 2 +- .../ResultsView/__tests__/index.spec.jsx | 2 +- .../Results/__tests__/index.spec.jsx | 2 +- .../ResultsView/components/Results/index.jsx | 2 +- .../__tests__/index.spec.jsx | 2 +- .../blocks/ZeroBenefitsHeading/index.jsx | 2 +- .../__tests__/index.spec.jsx | 2 +- .../StepIndicator/__tests__/index.spec.jsx | 2 +- 14 files changed, 56 insertions(+), 54 deletions(-) diff --git a/benefit-finder/package-lock.json b/benefit-finder/package-lock.json index d159fc905..134d3315c 100644 --- a/benefit-finder/package-lock.json +++ b/benefit-finder/package-lock.json @@ -11,8 +11,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-modal": "^3.16.1", - "react-router": "^6.26.2", - "react-router-dom": "^6.26.2" + "react-router": "^7.0.2" }, "devDependencies": { "@babel/preset-env": "^7.25.3", @@ -3420,15 +3419,6 @@ "node": ">=14" } }, - "node_modules/@remix-run/router": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.21.0.tgz", - "integrity": "sha512-xfSkCAchbdG5PnbrKqFWwia4Bi61nH+wm8wLEqfHDyp7Y3dZzgqS2itV8i4gAq9pC2HsTpwyBC6Ds8VHZ96JlA==", - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rollup/pluginutils": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", @@ -4545,6 +4535,12 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "license": "MIT" + }, "node_modules/@types/debug": { "version": "4.1.12", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", @@ -6575,6 +6571,15 @@ "dev": true, "license": "MIT" }, + "node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/core-js-compat": { "version": "3.39.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", @@ -17427,35 +17432,27 @@ } }, "node_modules/react-router": { - "version": "6.28.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz", - "integrity": "sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.2.tgz", + "integrity": "sha512-m5AcPfTRUcjwmhBzOJGEl6Y7+Crqyju0+TgTQxoS4SO+BkWbhOrcfZNq6wSWdl2BBbJbsAoBUb8ZacOFT+/JlA==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.21.0" + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "react": ">=16.8" - } - }, - "node_modules/react-router-dom": { - "version": "6.28.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz", - "integrity": "sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg==", - "license": "MIT", - "dependencies": { - "@remix-run/router": "1.21.0", - "react-router": "6.28.0" - }, - "engines": { - "node": ">=14.0.0" + "react": ">=18", + "react-dom": ">=18" }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } } }, "node_modules/readable-stream": { @@ -18623,6 +18620,12 @@ "upper-case-first": "^2.0.2" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -19883,6 +19886,12 @@ "node": "*" } }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==", + "license": "ISC" + }, "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", diff --git a/benefit-finder/package.json b/benefit-finder/package.json index fa86276f5..6aa8732b2 100644 --- a/benefit-finder/package.json +++ b/benefit-finder/package.json @@ -37,8 +37,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-modal": "^3.16.1", - "react-router": "^6.26.2", - "react-router-dom": "^6.26.2" + "react-router": "^7.0.2" }, "devDependencies": { "@babel/preset-env": "^7.25.3", diff --git a/benefit-finder/src/App/index.jsx b/benefit-finder/src/App/index.jsx index 24b9fb97f..6d0db9b2f 100644 --- a/benefit-finder/src/App/index.jsx +++ b/benefit-finder/src/App/index.jsx @@ -1,5 +1,5 @@ import { useState, createContext, useEffect, useMemo } from 'react' -import { BrowserRouter, Routes, Route } from 'react-router-dom' +import { BrowserRouter, Routes, Route } from 'react-router' import { version } from '../../package.json' import { useResetElement } from '@hooks' import * as apiCalls from '@api/apiCalls' @@ -114,13 +114,7 @@ function App({ testAppContent, testQuery }) { data-testid="app" data-version={version} > - + Date: Mon, 16 Dec 2024 14:59:46 -0500 Subject: [PATCH 31/65] PXBF-1987-update-router-v7: remove console log from spec --- .../components/RelativeBenefitList/__tests__/index.spec.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx index 910b3b248..47f63729d 100644 --- a/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx @@ -32,7 +32,6 @@ describe('RelativeBenefitList', () => { expect(links[0].href).toContain(relativeBenefits[0].lifeEvent.lifeEventId) expect(links[1].href).toContain(relativeBenefits[1].lifeEvent.lifeEventId) // ensure the icons that contain values from the lifeEventId are in the dom - console.log(relativeBenefits[0].lifeEvent.lifeEventId) expect( screen.getByTestId( `benefit-finder-icon--${relativeBenefits[0].lifeEvent.lifeEventId}` From 1d410903a160185aca05ad955aaa207539ea68c2 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 16 Dec 2024 16:23:55 -0500 Subject: [PATCH 32/65] PXBF-update-prettier-eslint: recommend prettier, set format on save with vscode --- .vscode/extensions.json | 4 +--- .vscode/settings.json | 15 +++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index e52209d2b..5c514880e 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,3 @@ { - "recommendations": [ - "rvest.vs-code-prettier-eslint" - ], + "recommendations": ["github.vscode-github-actions", "esbenp.prettier-vscode"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index e67357140..6317784f6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,9 @@ { - "debug.javascript.autoAttachFilter": "onlyWithFlag", - "editor.renderWhitespace": "none", - "diffEditor.ignoreTrimWhitespace": false, - "editor.defaultFormatter": "rvest.vs-code-prettier-eslint", - "editor.formatOnType": false, - "editor.formatOnSave": true, - "editor.formatOnSaveMode": "file", - "vs-code-prettier-eslint.prettierLast": true, + "debug.javascript.autoAttachFilter": "onlyWithFlag", + "editor.renderWhitespace": "none", + "diffEditor.ignoreTrimWhitespace": false, + "editor.formatOnType": false, + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "file", + "editor.defaultFormatter": "esbenp.prettier-vscode" } From 99e4e9a19156801a238f9f3dd42b5b1935c75406 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 16 Dec 2024 16:24:08 -0500 Subject: [PATCH 33/65] PXBF-update-prettier-eslint: include prettier eslint plugin --- benefit-finder/package-lock.json | 82 ++++++++++++++++++++++++++++++++ benefit-finder/package.json | 1 + 2 files changed, 83 insertions(+) diff --git a/benefit-finder/package-lock.json b/benefit-finder/package-lock.json index d159fc905..eb350c990 100644 --- a/benefit-finder/package-lock.json +++ b/benefit-finder/package-lock.json @@ -44,6 +44,7 @@ "eslint-plugin-cypress": "^3.6.0", "eslint-plugin-json": "^4.0.1", "eslint-plugin-jsx-a11y": "^6.10.2", + "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.37.2", "eslint-plugin-storybook": "^0.10.0", "http-server": "^14.1.1", @@ -3420,6 +3421,19 @@ "node": ">=14" } }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/@remix-run/router": { "version": "1.21.0", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.21.0.tgz", @@ -8085,6 +8099,37 @@ "node": ">= 0.4" } }, + "node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, "node_modules/eslint-plugin-react": { "version": "7.37.2", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz", @@ -8422,6 +8467,13 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/fast-equals": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", @@ -17181,6 +17233,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -19515,6 +19580,23 @@ "node": ">=16.0.0" } }, + "node_modules/synckit": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/table": { "version": "6.9.0", "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", diff --git a/benefit-finder/package.json b/benefit-finder/package.json index fa86276f5..15c0bdfa7 100644 --- a/benefit-finder/package.json +++ b/benefit-finder/package.json @@ -70,6 +70,7 @@ "eslint-plugin-cypress": "^3.6.0", "eslint-plugin-json": "^4.0.1", "eslint-plugin-jsx-a11y": "^6.10.2", + "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.37.2", "eslint-plugin-storybook": "^0.10.0", "http-server": "^14.1.1", From fd98cbad3c1877b0fd49406ef99e3df872b761f5 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 16 Dec 2024 16:24:22 -0500 Subject: [PATCH 34/65] PXBF-update-prettier-eslint: config eslint prettier recomended --- benefit-finder/eslint.config.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/benefit-finder/eslint.config.mjs b/benefit-finder/eslint.config.mjs index fdece7391..02464df13 100644 --- a/benefit-finder/eslint.config.mjs +++ b/benefit-finder/eslint.config.mjs @@ -5,6 +5,7 @@ import pluginCypress from 'eslint-plugin-cypress/flat' import storybook from 'eslint-plugin-storybook' import reactPlugin from 'eslint-plugin-react' import eslintConfigPrettier from 'eslint-config-prettier' +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' import jsxA11y from 'eslint-plugin-jsx-a11y' // error when starting dev server: @@ -19,6 +20,7 @@ export default [ js.configs.recommended, json.configs.recommended, eslintConfigPrettier, + eslintPluginPrettierRecommended, ...storybook.configs['flat/recommended'], pluginCypress.configs.recommended, reactPlugin.configs.flat.all, From a693f1c75508d7ab4a6b87d345e56ac5dfee41e1 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 16 Dec 2024 16:24:56 -0500 Subject: [PATCH 35/65] PXBF-update-prettier-eslint: format files --- benefit-finder/.storybook/main.js | 11 ++++++----- .../selected-criteria-eligibility-benefits.cy.js | 3 ++- .../cypress/e2e/usagov-public-site/links.cy.js | 1 - 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/benefit-finder/.storybook/main.js b/benefit-finder/.storybook/main.js index 9457c7cdc..11f52d16b 100644 --- a/benefit-finder/.storybook/main.js +++ b/benefit-finder/.storybook/main.js @@ -20,15 +20,16 @@ const config = { viteFinal(config) { return mergeConfig(config, { build: { - chunkSizeWarningLimit: '1000', - rollupOptions: { + chunkSizeWarningLimit: '1000', + rollupOptions: { output: { - manualChunks: (id) => id.includes('src/App/index.jsx') ? 'app-chunk' : false, + manualChunks: id => + id.includes('src/App/index.jsx') ? 'app-chunk' : false, }, }, }, - }); + }) }, -}; +} export default config diff --git a/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js b/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js index 90af38090..a2557049c 100644 --- a/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js +++ b/benefit-finder/cypress/e2e/storybook/selected-criteria-eligibility-benefits.cy.js @@ -97,7 +97,8 @@ describe('Validate correct eligibility benefits display based on selected criter }) it('QA scenario 3 Coal Miner EN - Verify correct benefit results for query values that includes Coal Miner in search parameter of URL', () => { - const selectedData = BENEFITS_ELIGIBILITY_DATA.scenario_3_coal_miner.en.param + const selectedData = + BENEFITS_ELIGIBILITY_DATA.scenario_3_coal_miner.en.param const enResults = BENEFITS_ELIGIBILITY_DATA.scenario_3_coal_miner.en.results const scenario = utils.encodeURIFromObject(selectedData) diff --git a/benefit-finder/cypress/e2e/usagov-public-site/links.cy.js b/benefit-finder/cypress/e2e/usagov-public-site/links.cy.js index ec7225aa3..67bba145b 100644 --- a/benefit-finder/cypress/e2e/usagov-public-site/links.cy.js +++ b/benefit-finder/cypress/e2e/usagov-public-site/links.cy.js @@ -58,7 +58,6 @@ describe('Verify correct status code handling', () => { // negate validation on our functional code Cypress.on('fail', error => { if (JSON.stringify(error).includes('httpstat')) { - expect(error).to.not.be.undefined } else { throw error From 97b4794d50296750973c6170dd9104985d46f43d Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Wed, 18 Dec 2024 09:38:40 -0500 Subject: [PATCH 36/65] Unmute scripts --- scripts/pipeline/cloud-gov-post-deploy.sh | 10 +++++----- scripts/pipeline/cloud-gov-remote-command.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/pipeline/cloud-gov-post-deploy.sh b/scripts/pipeline/cloud-gov-post-deploy.sh index 45335121e..27d9a8b63 100755 --- a/scripts/pipeline/cloud-gov-post-deploy.sh +++ b/scripts/pipeline/cloud-gov-post-deploy.sh @@ -6,25 +6,25 @@ ROOT_DIR=$(git rev-parse --show-toplevel) # Read the drush-post-deploy.sh file line by line while IFS= read -r command || [[ -n "$command" ]]; do # Debugging: Print the current command being processed - # echo "Processing command: ${command}" + echo "Processing command: ${command}" # Skip comments, empty lines, or echo commands if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then - # echo "Running command: ${command}" + echo "Running command: ${command}" # Call the cloud-gov-remote-command script with the project and branch - bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null >/dev/null 2>&1 + bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" #< /dev/null >/dev/null 2>&1 # Check for errors and exit if a command fails if [[ $? -ne 0 ]]; then - # echo "Error: Command '${command}' failed!" #>&2 + echo "Error: Command '${command}' failed!" #>&2 exit 1 fi fi done < <(cat "${ROOT_DIR}/scripts/drush-post-deploy.sh") # Indicate script completion -# echo "All commands processed successfully!" +echo "All commands processed successfully!" exit 0 #Casey's Original Script diff --git a/scripts/pipeline/cloud-gov-remote-command.sh b/scripts/pipeline/cloud-gov-remote-command.sh index de49ac845..224ebca11 100755 --- a/scripts/pipeline/cloud-gov-remote-command.sh +++ b/scripts/pipeline/cloud-gov-remote-command.sh @@ -30,7 +30,7 @@ if [ -z "${show_output}" ]; then echo "Running command: '$(echo "${command}" | cut -d' ' -f1,2)'..." { sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" - } > /dev/null 2>&1 + } #> /dev/null 2>&1 else sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" fi From 7f73242956df1326000c7ab1892234d38de20d12 Mon Sep 17 00:00:00 2001 From: Xavier Metichecchia Date: Wed, 18 Dec 2024 12:04:29 -0500 Subject: [PATCH 37/65] Simplify command script --- scripts/pipeline/cloud-gov-remote-command.sh | 75 ++++++++++++++++---- 1 file changed, 63 insertions(+), 12 deletions(-) diff --git a/scripts/pipeline/cloud-gov-remote-command.sh b/scripts/pipeline/cloud-gov-remote-command.sh index 224ebca11..3d496bd5e 100755 --- a/scripts/pipeline/cloud-gov-remote-command.sh +++ b/scripts/pipeline/cloud-gov-remote-command.sh @@ -1,7 +1,9 @@ #!/bin/bash +# Ensure the script stops on any error +set -e - +# Variables APP_NAME=$1 command=$2 show_output=$3 @@ -9,11 +11,15 @@ show_output=$3 APP_GUID=$(cf app "${APP_NAME}" --guid) bin_path="/var/www/vendor/bin/:/home/vcap/deps/0/bin/" +# Validate inputs +if [ -z "${APP_NAME}" ] || [ -z "${command}" ]; then + echo "Command error! Valid format: ${0} " + exit 1 +fi -[ -z "${APP_NAME}" ] || [ -z "${command}" ] && echo "Command error! Valid format: ${0} " && exit 1 - +# Create SSH configuration and password files ssh_config=/tmp/ssh_config -ssh_passwd="/tmp/ssh_password" +ssh_passwd=/tmp/ssh_password cat >${ssh_config} < ${ssh_passwd} -if [ -z "${show_output}" ]; then - echo "Running command: '$(echo "${command}" | cut -d' ' -f1,2)'..." - { - sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" - } #> /dev/null 2>&1 -else - sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" -fi +# Debugging: Output command being run +echo "Running command on remote app: ${command}" + +# Execute the commands line by line +echo "Executing commands from input..." +while IFS= read -r line || [[ -n "$line" ]]; do + echo "Processing command: $line" + sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" \ + "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} $line" +done <<< "${command}" + +# Clean up temporary files +rm -f ${ssh_config} ${ssh_passwd} + +# Debugging: Notify success +echo "Command execution completed." + +# #!/bin/bash +# +# +# +# APP_NAME=$1 +# command=$2 +# show_output=$3 +# +# APP_GUID=$(cf app "${APP_NAME}" --guid) +# bin_path="/var/www/vendor/bin/:/home/vcap/deps/0/bin/" +# +# +# [ -z "${APP_NAME}" ] || [ -z "${command}" ] && echo "Command error! Valid format: ${0} " && exit 1 +# +# ssh_config=/tmp/ssh_config +# ssh_passwd="/tmp/ssh_password" +# +# cat >${ssh_config} < ${ssh_passwd} +# +# if [ -z "${show_output}" ]; then +# echo "Running command: '$(echo "${command}" | cut -d' ' -f1,2)'..." +# { +# sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" +# } #> /dev/null 2>&1 +# else +# sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}" +# fi From 060a80b5985e092248f1a50676c82818ebc6f508 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 23 Dec 2024 15:27:30 -0500 Subject: [PATCH 38/65] PXBF-2014-design-qa-tweaks: bold content on notices intro --- .../src/App/__tests__/__snapshots__/index.spec.jsx.snap | 5 ++++- .../Routes/Intro/__tests__/__snapshots__/index.spec.jsx.snap | 5 ++++- .../NoticesList/__tests__/__snapshots__/index.spec.jsx.snap | 5 ++++- benefit-finder/src/shared/locales/en/en.json | 2 +- benefit-finder/src/shared/locales/es/es.json | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/benefit-finder/src/App/__tests__/__snapshots__/index.spec.jsx.snap b/benefit-finder/src/App/__tests__/__snapshots__/index.spec.jsx.snap index a7f5bf281..fc95a33b2 100644 --- a/benefit-finder/src/App/__tests__/__snapshots__/index.spec.jsx.snap +++ b/benefit-finder/src/App/__tests__/__snapshots__/index.spec.jsx.snap @@ -166,7 +166,10 @@ exports[`loads intro 1`] = ` with each agency.

- We do not share, save, or submit your information. + + We do not share, save, or submit + + your information.

diff --git a/benefit-finder/src/Routes/Intro/__tests__/__snapshots__/index.spec.jsx.snap b/benefit-finder/src/Routes/Intro/__tests__/__snapshots__/index.spec.jsx.snap index 8eb8970d3..e308c488e 100644 --- a/benefit-finder/src/Routes/Intro/__tests__/__snapshots__/index.spec.jsx.snap +++ b/benefit-finder/src/Routes/Intro/__tests__/__snapshots__/index.spec.jsx.snap @@ -151,7 +151,10 @@ exports[`Intro > renders a match to the previous snapshot 1`] = ` with each agency.

- We do not share, save, or submit your information. + + We do not share, save, or submit + + your information.

diff --git a/benefit-finder/src/shared/components/NoticesList/__tests__/__snapshots__/index.spec.jsx.snap b/benefit-finder/src/shared/components/NoticesList/__tests__/__snapshots__/index.spec.jsx.snap index 7dcc73318..1460b272d 100644 --- a/benefit-finder/src/shared/components/NoticesList/__tests__/__snapshots__/index.spec.jsx.snap +++ b/benefit-finder/src/shared/components/NoticesList/__tests__/__snapshots__/index.spec.jsx.snap @@ -43,7 +43,10 @@ exports[`NoticesList > renders a match to the previous snapshot 1`] = ` with each agency.

- We do not share, save, or submit your information. + + We do not share, save, or submit + + your information.

diff --git a/benefit-finder/src/shared/locales/en/en.json b/benefit-finder/src/shared/locales/en/en.json index 1d4e44f8d..6010535fd 100644 --- a/benefit-finder/src/shared/locales/en/en.json +++ b/benefit-finder/src/shared/locales/en/en.json @@ -20,7 +20,7 @@ "iconAlt": "Important", "list": [ { - "notice": "

This is not an application. You will need to apply for benefits with each agency.

We do not share, save, or submit your information.

" + "notice": "

This is not an application. You will need to apply for benefits with each agency.

We do not share, save, or submit your information.

" } ] }, diff --git a/benefit-finder/src/shared/locales/es/es.json b/benefit-finder/src/shared/locales/es/es.json index c07da0c99..435f780bb 100644 --- a/benefit-finder/src/shared/locales/es/es.json +++ b/benefit-finder/src/shared/locales/es/es.json @@ -20,7 +20,7 @@ "iconAlt": "Importante", "list": [ { - "notice": "

Esto no es una aplicación. Necesita presentar una solicitud con cada agencia.

No guardamos ni compartimos sus respuestas con ninguna agencia.

" + "notice": "

Esto no es una aplicación. Necesita presentar una solicitud con cada agencia.

No guardamos ni compartimos sus respuestas con ninguna agencia.

" } ] }, From e374ab77806a03641fd2818f9fd891b42eee91dd Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 23 Dec 2024 15:31:25 -0500 Subject: [PATCH 39/65] PXBF-2014-design-qa-tweaks: margin adjustment to cta-wrapper --- benefit-finder/src/Routes/Intro/_index.scss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/benefit-finder/src/Routes/Intro/_index.scss b/benefit-finder/src/Routes/Intro/_index.scss index 1db312294..aeace7403 100644 --- a/benefit-finder/src/Routes/Intro/_index.scss +++ b/benefit-finder/src/Routes/Intro/_index.scss @@ -12,7 +12,7 @@ .bf-cta-wrapper { display: flex; justify-content: center; - margin: rem(20px) 0 rem(56px); + margin: rem(20px) 0 rem(24px); @media (width >= $desktop) { margin: rem(32px) rem(32px) rem(64px); @@ -32,7 +32,7 @@ margin-left: rem(16px); } - .bf-intro-process-notices-heading { + .bf-intro-process-notices-heading { width: 100; margin-bottom: rem(30px); } @@ -59,14 +59,14 @@ .bf-usa-process-list { margin-left: 0; margin-right: 0; - padding-top:rem(8px); + padding-top: rem(8px); .bf-usa-process-list__heading { font-size: rem(16px); - @media (width >= $desktop) { - font-size: rem(21px); - } + @media (width >= $desktop) { + font-size: rem(21px); + } } } } From 05a0d182877149f5c73bc94eb52e3a3c1f5335c5 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 23 Dec 2024 15:37:11 -0500 Subject: [PATCH 40/65] PXBF-2015-design-qa-tweaks: adjust container pading on verification view --- benefit-finder/src/Routes/LifeEventSection/_index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benefit-finder/src/Routes/LifeEventSection/_index.scss b/benefit-finder/src/Routes/LifeEventSection/_index.scss index 01407f339..af95097c2 100644 --- a/benefit-finder/src/Routes/LifeEventSection/_index.scss +++ b/benefit-finder/src/Routes/LifeEventSection/_index.scss @@ -11,7 +11,7 @@ .bf-grid-container.grid-container { max-width: $form-container-max-width; - padding: 0 rem(36px); + padding: 0 rem(20px); @media (width >= calc($form-container-max-width + rem(24px))) { padding-left: 0; From b4585b368f9daf1cfb513aa369ddfc4a655a7639 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 23 Dec 2024 15:49:39 -0500 Subject: [PATCH 41/65] PXBF-2016-design-qa-tweaks: hide expand all button on mobile --- .../ResultsView/components/Results/_index.scss | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/benefit-finder/src/Routes/ResultsView/components/Results/_index.scss b/benefit-finder/src/Routes/ResultsView/components/Results/_index.scss index 5e1a7e985..08c69a62a 100644 --- a/benefit-finder/src/Routes/ResultsView/components/Results/_index.scss +++ b/benefit-finder/src/Routes/ResultsView/components/Results/_index.scss @@ -4,9 +4,9 @@ @use '@styles/functions' as *; .bf-result-view { - .bf-grid-container.grid-container { - padding: rem(20px); - } + .bf-grid-container.grid-container { + padding: rem(20px); + } } .bf-result-view-benefits, @@ -21,6 +21,10 @@ .bf-result-view-share-results-heading { @include h3; } + + .bf-expand-all { + display: none; + } } .bf-result-view-unmet { @@ -48,4 +52,8 @@ .bf-result-view-details { padding: rem(24px) 5.4rem; } + + .bf-result-view-benefits .bf-expand-all { + display: block; + } } From d67085ba26bfea87e6fa5a57e928ff3435d19f5a Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 23 Dec 2024 15:50:44 -0500 Subject: [PATCH 42/65] PXBF-2016-design-qa-tweaks: update content for cta --- .../ResultsView/__tests__/__snapshots__/index.spec.jsx.snap | 4 ++-- benefit-finder/src/shared/locales/en/en.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap b/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap index 6a1bd88f0..3625590d4 100644 --- a/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap +++ b/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap @@ -6215,7 +6215,7 @@ exports[`loads view 1`] = ` data-testid="bf-result-view-unmet-button" type="button" > - Explore benefits you did not qualify for + See benefits you didn't qualify for @@ -12554,7 +12554,7 @@ exports[`scenario 1 loads in view with the correct amount of likely eligible ite data-testid="bf-result-view-unmet-button" type="button" > - Explore benefits you did not qualify for + See benefits you didn't qualify for diff --git a/benefit-finder/src/shared/locales/en/en.json b/benefit-finder/src/shared/locales/en/en.json index 6010535fd..584b6f9d6 100644 --- a/benefit-finder/src/shared/locales/en/en.json +++ b/benefit-finder/src/shared/locales/en/en.json @@ -153,7 +153,7 @@ "notEligibleResults": { "heading": "Benefits you did not qualify for", "description": "
Based on your answers you are not eligible for these benefits. You may become eligible if you enter additional information or your situation changes.
", - "cta": "Explore benefits you did not qualify for" + "cta": "See benefits you didn't qualify for" }, "resultsRelativeBenefits": { "heading": "More benefits" From 83ddf93b412fb1c2888e99dc5a12d17e66441ae5 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 23 Dec 2024 16:02:00 -0500 Subject: [PATCH 43/65] PXBF-2016-design-qa-tweaks: bold content and include createMarkup --- .../__tests__/__snapshots__/index.spec.jsx.snap | 14 ++++++++++++-- .../__tests__/__snapshots__/index.spec.jsx.snap | 7 ++++++- .../ResultsView/components/Results/index.jsx | 2 +- benefit-finder/src/shared/locales/en/en.json | 2 +- benefit-finder/src/shared/locales/es/es.json | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap b/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap index 3625590d4..9595482c7 100644 --- a/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap +++ b/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap @@ -6303,7 +6303,12 @@ exports[`loads view 1`] = ` Share results

- Copy or email these results. Your answers will be visible. Only share with those you trust. + Copy or email these results. Your answers will be visible. + + Only share with those you trust + + . +