Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PXBF v0.9.0 (Sprint 46) #1989

Merged
merged 142 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
db6bff7
PXBF-dev: Re-factor the git submodule hash pipe due to issues we had …
Nov 14, 2024
c591783
PXBF-dev: Try and adress submodule issue
Nov 14, 2024
fba697c
PXBF-dev: Try and adress submodule issue 2
Nov 14, 2024
70eea86
PXBF-dev: Try and adress submodule issue 3
Nov 14, 2024
ed8301c
PXBF-dev: Try and adress submodule issue 4
Nov 14, 2024
a7b9a7c
PXBF-dev: Try and adress submodule issue 5
Nov 14, 2024
51e3cf6
PXBF-dev: Try and adress submodule issue 6
Nov 14, 2024
603184e
PXBF-1928-cypress-page-objects-alpha-order: organize page object meth…
nehemiah-abuga Nov 14, 2024
6b0b70d
PXBF-dev: Try and adress submodule issue 7
Nov 14, 2024
c192d8c
PXBF-dev: Add rebase false for merging in the hash pipeline
Nov 14, 2024
04ec467
Merge branch 'release' of https://github.com/GSA/px-benefit-finder in…
XavierMetichecchia Nov 14, 2024
3bb2dde
PXBF-1492-remove-criteria-group: remove criteria group from children …
gchi25 Nov 14, 2024
73ee888
PXBF-1492-remove-criteria-group: remove criteria group from criteria …
gchi25 Nov 14, 2024
a1edc04
PXBF-1930-cypress-lint-error-resolve: resolve cypress lint error
nehemiah-abuga Nov 15, 2024
3cf271f
PXBF-1929-remove-component-js-file: remove unused component files
nehemiah-abuga Nov 15, 2024
d93d14b
Merge pull request #1952 from GSA/1930-cypress-lint-error-resolve
scottqueen-bixal Nov 15, 2024
a029d14
Merge pull request #1953 from GSA/1929-remove-component-js-file
scottqueen-bixal Nov 15, 2024
052809f
Merge pull request #1950 from GSA/1928-cypress-page-objects-alpha-order
scottqueen-bixal Nov 15, 2024
40d8be4
Merge pull request #1951 from GSA/1492-remove-criteria-group
scottqueen-bixal Nov 15, 2024
4db2e63
PXBF-1954-mobile-layout-updates: move to the new flat format for our …
scottqueen-bixal Nov 18, 2024
c8b6f34
PXBF-1954-mobile-layout-updates: combined into new flat config
scottqueen-bixal Nov 18, 2024
d669744
PXBF-1954-mobile-layout-updates: no longer serving custom family font
scottqueen-bixal Nov 18, 2024
8017070
PXBF-1954-mobile-layout-updates: update linting packages
scottqueen-bixal Nov 18, 2024
c39a28e
PXBF-1954-mobile-layout-updates: ignore linting cache
scottqueen-bixal Nov 18, 2024
90e5cb2
PXBF-1954-mobile-layout-updates: resolve a few of the linting errors
scottqueen-bixal Nov 18, 2024
282814c
PXBF-1954-mobile-layout-updates: resolve linting errors
scottqueen-bixal Nov 18, 2024
79c906d
PXBF-1954-mobile-layout-updates: resolve linting errors
scottqueen-bixal Nov 18, 2024
2cb8c15
PXBF-1954-mobile-layout-updates: include mjs files
scottqueen-bixal Nov 18, 2024
eb9f130
PXBF-1954-mobile-layout-updates: update lint config
scottqueen-bixal Nov 18, 2024
ca29cfb
PXBF-1955-update-lint-config: include a11y jsx linter
scottqueen-bixal Nov 18, 2024
6343b43
PXBF-1955-update-lint-config: include jsx a11y rules
scottqueen-bixal Nov 18, 2024
bbb23fe
PXBF-dev: Just some minor cleanup of the hash script
Nov 19, 2024
fae3494
Merge branch 'release' of https://github.com/GSA/px-benefit-finder in…
XavierMetichecchia Nov 20, 2024
0eae103
Hash script adjustments 1
Nov 20, 2024
a0388cc
Hash script adjustments 2
Nov 20, 2024
9e9c447
Hash script adjustments 3
Nov 20, 2024
b4056f2
Hash script adjustments 4
Nov 20, 2024
ee15191
Hash script adjustments 5
Nov 20, 2024
4cfcc14
Hash script adjustments 6
Nov 20, 2024
2ad2b48
Hash script adjustments 7
Nov 20, 2024
3ca4218
Hash script adjustments 8
Nov 20, 2024
7b5c360
Hash script adjustments 9
Nov 20, 2024
ce35168
Hash script adjustments 10
Nov 20, 2024
d24b43d
Merge branch 'release' of https://github.com/GSA/px-benefit-finder in…
XavierMetichecchia Nov 20, 2024
5ffdaac
Merge pull request #1958 from GSA/1955-update-lint-config
scottqueen-bixal Nov 21, 2024
68b81c8
PXBF-1954-mobile-layout-updates: update typography mixins to include …
scottqueen-bixal Nov 21, 2024
732fbe5
PXBF-1954-mobile-layout-updates: ignore mixed declarations depricatio…
scottqueen-bixal Nov 21, 2024
2601341
PXBF-1954-mobile-layout-updates: updated heading stories
scottqueen-bixal Nov 21, 2024
4e5ff32
PXBF-1954-mobile-layout-updates: remove no background prop from alert…
scottqueen-bixal Nov 21, 2024
f89290a
PXBF-1954-mobile-layout-updates: remove no background prop from alert…
scottqueen-bixal Nov 21, 2024
09baa61
PXBF-1954-mobile-layout-updates: remove font weight change
scottqueen-bixal Nov 21, 2024
f4a5054
PXBF-1954-mobile-layout-updates: update border-radius
scottqueen-bixal Nov 21, 2024
5350eba
PXBF-1954-mobile-layout-updates: set max grid container width on forms
scottqueen-bixal Nov 21, 2024
04de5a2
PXBF-1954-mobile-layout-updates: set max widths and heights of modal
scottqueen-bixal Nov 21, 2024
2b8aa8b
PXBF-1954-mobile-layout-updates: update width of form containers to r…
scottqueen-bixal Nov 21, 2024
ab60444
PXBF-1954-mobile-layout-updates: updated margin on forms and review
scottqueen-bixal Nov 22, 2024
d966320
PXBF-1954-mobile-layout-updates: adjust more specificity on padding i…
scottqueen-bixal Nov 22, 2024
0b96031
PXBF-1954-mobile-layout-updates: chevron and mobile results padding
scottqueen-bixal Nov 22, 2024
6e43b6e
PXBF-1954-mobile-layout-updates: new gap size
scottqueen-bixal Nov 22, 2024
7dbc635
PXBF-1954-mobile-layout-updates: update fontsize on list items
scottqueen-bixal Nov 22, 2024
d587b74
PXBF-1954-mobile-layout-updates: update padding and margins on accord…
scottqueen-bixal Nov 22, 2024
27e1b3b
PXBF-1954-mobile-layout-updates: update intro view
scottqueen-bixal Nov 22, 2024
3c927c5
PXBF-1954-mobile-layout-updates: updated intro content
scottqueen-bixal Nov 22, 2024
cf0e8bf
Debug main WAF failure 1
Nov 22, 2024
b257b36
Debug main WAF failure 2
Nov 22, 2024
d0d1371
Debug main WAF failure 3
Nov 22, 2024
50bf52a
Debug main WAF failure 4
Nov 22, 2024
a6044b2
Debug main WAF failure cleanup
Nov 22, 2024
de87f69
Debug main WAF failure cleanup 2
Nov 22, 2024
8d2c840
PXBF-1850-support-one-level-nested-criteria: support only one level n…
gchi25 Nov 23, 2024
ac1de2b
PXBF-1863-cypress-remove-cy-wait: refactoring cypress tests to remove…
nehemiah-abuga Nov 25, 2024
aca68ba
Merge pull request #1964 from GSA/1850-support-one-level-nested-criteria
gchi25 Nov 25, 2024
d84c140
Remove webkit testing from test-cypress.yml
Nov 25, 2024
a2150a0
PXBF-1863-cypress-remove-cy-wait: Merge branch 'dev' of github.com:GS…
scottqueen-bixal Dec 2, 2024
f3f7486
PXBF-1954-mobile-layout-updates: Merge branch 'dev' of github.com:GSA…
scottqueen-bixal Dec 2, 2024
18c40fc
PXBF-1954-mobile-layout-updates: updated content for intro view
scottqueen-bixal Dec 2, 2024
8f13f99
PXBF-1954-mobile-layout-updates: updated snaps
scottqueen-bixal Dec 2, 2024
3e6f4a3
Update es.json
diegocob Dec 2, 2024
50ec0f3
PXBF-1954-mobile-layout-updates: update bf-chevron styles for mobile
scottqueen-bixal Dec 2, 2024
19abdad
PXBF-1954-mobile-layout-updates: rename chevron to banner
scottqueen-bixal Dec 2, 2024
6b32110
PXBF-1954-mobile-layout-updates: rename class
scottqueen-bixal Dec 2, 2024
f5623ea
PXBF-1954-mobile-layout-updates: update space
scottqueen-bixal Dec 2, 2024
6e2c52c
PXBF-1954-mobile-layout-updates: remove container space sizes that ar…
scottqueen-bixal Dec 2, 2024
e772771
PXBF-1954-mobile-layout-updates: include functions with rems use
scottqueen-bixal Dec 2, 2024
b00b381
PXBF-1954-mobile-layout-updates: include functions use with rem use
scottqueen-bixal Dec 2, 2024
2571b8e
PXBF-1954-mobile-layout-updates: remove commented code from spaces
scottqueen-bixal Dec 2, 2024
e7e26f3
PXBF-1954-mobile-layout-updates: remove horizontal line sep
scottqueen-bixal Dec 2, 2024
ea9b04f
PXBF-1954-mobile-layout-updates: remove spaces partial
scottqueen-bixal Dec 2, 2024
5d33cb8
PXBF-1954-mobile-layout-updates: update mobile container sizes intro
scottqueen-bixal Dec 2, 2024
a9df5e5
PXBF-1954-mobile-layout-updates: padding and margin adjustments on mo…
scottqueen-bixal Dec 2, 2024
d7d1604
PXBF-1940-README: update README
gchi25 Dec 4, 2024
2cb24cc
Merge pull request #1974 from GSA/1973-typo-on-spanish-bullets
scottqueen-bixal Dec 4, 2024
645b386
PXBF-dev: update package version
scottqueen-bixal Dec 4, 2024
027022e
PXBF-1979-remove-role-attribute: remove role attribute
gchi25 Dec 4, 2024
f9cc369
Merge pull request #1980 from GSA/1979-remove-role-attribute
scottqueen-bixal Dec 5, 2024
9950137
Merge pull request #1976 from GSA/1940-README
scottqueen-bixal Dec 5, 2024
8685fd6
PXBF-1954-mobile-layout-updates: Merge branch 'dev' of github.com:GSA…
scottqueen-bixal Dec 6, 2024
a5df934
PXBF-1954-mobile-layout-updates: update padding on bf form elements
scottqueen-bixal Dec 6, 2024
5b9a079
PXBF-1954-mobile-layout-updates: adjust padding bf mobile
scottqueen-bixal Dec 6, 2024
5dc02bb
PXBF-1954-mobile-layout-updates: adjust modal widths
scottqueen-bixal Dec 6, 2024
9d9bc95
PXBF-1954-mobile-layout-updates: adjust spacing on verification view
scottqueen-bixal Dec 6, 2024
adc703b
PXBF-1863-cypress-remove-cy-wait: combine processes
nehemiah-abuga Dec 8, 2024
69d5960
Merge pull request #1965 from GSA/1863-cypress-remove-cy-wait
scottqueen-bixal Dec 9, 2024
ad3e5cb
PXBF-1954-mobile-layout-updates: update relative benefits to use usag…
scottqueen-bixal Dec 9, 2024
f0af6ab
PXBF-1954-mobile-layout-updates: adjust mobile padding
scottqueen-bixal Dec 9, 2024
c440f2f
PXBF-1954-mobile-layout-updates: Merge branch 'dev' of github.com:GSA…
scottqueen-bixal Dec 9, 2024
138bdaa
PXBF-1954-mobile-layout-updates: update chevron to banner
scottqueen-bixal Dec 9, 2024
14b3f8a
Merge pull request #1962 from GSA/1954-mobile-layout-updates
scottqueen-bixal Dec 9, 2024
d5882d2
PXBF-1975-more-info-return-to-form: include back to start cta with mo…
scottqueen-bixal Dec 9, 2024
a1458ad
PXBF-dev: update packages and version
scottqueen-bixal Dec 9, 2024
01f0ba3
Merge pull request #1985 from GSA/1975-more-info-return-to-form
scottqueen-bixal Dec 9, 2024
516ae48
Merge pull request #1988 from GSA/update-packages-v9
scottqueen-bixal Dec 9, 2024
a79695d
Add automation in order to automate test user creation
Dec 9, 2024
d90c463
Merge pull request #1990 from GSA/1981-add-test-users
XavierMetichecchia Dec 9, 2024
5454406
Fix Typo
Dec 9, 2024
0ca4f04
Merge pull request #1991 from GSA/1981-add-test-users
XavierMetichecchia Dec 9, 2024
41285ef
Change upwd command
Dec 9, 2024
5451e73
Merge pull request #1992 from GSA/1981-add-test-users
XavierMetichecchia Dec 9, 2024
a0b4658
Change upwd command 2
Dec 9, 2024
5af5dbf
Change upwd command 3
Dec 9, 2024
759e804
Merge pull request #1993 from GSA/1981-add-test-users
XavierMetichecchia Dec 9, 2024
93c6390
Change upwd command 4
Dec 9, 2024
103d856
Merge pull request #1994 from GSA/1981-add-test-users
XavierMetichecchia Dec 9, 2024
4cc531d
PXBF-dev: Merge branch 'main' of github.com:GSA/px-benefit-finder int…
scottqueen-bixal Dec 10, 2024
58bb903
PXBF-dev: updated snaps
scottqueen-bixal Dec 10, 2024
6ac640f
Change upwd command 5
Dec 10, 2024
c860b6c
Change upwd command 6
Dec 10, 2024
60c2702
Merge pull request #1997 from GSA/1981-add-test-users
XavierMetichecchia Dec 10, 2024
c2b3f4e
Change upwd command 7
Dec 10, 2024
ce3bc9f
Merge pull request #1998 from GSA/1981-add-test-users
XavierMetichecchia Dec 10, 2024
3185a0d
Change upwd command 8
Dec 10, 2024
0c39c34
Merge pull request #1999 from GSA/1981-add-test-users
XavierMetichecchia Dec 10, 2024
5dde9c1
Change upwd command 9
Dec 10, 2024
5dfe6ff
Merge pull request #2000 from GSA/1981-add-test-users
XavierMetichecchia Dec 10, 2024
c31cc60
Change upwd command 10
Dec 10, 2024
7ba8ad2
Merge pull request #2001 from GSA/1981-add-test-users
XavierMetichecchia Dec 10, 2024
efbc52f
Change upwd command 11
Dec 10, 2024
9e54bd8
Merge pull request #2002 from GSA/1981-add-test-users
XavierMetichecchia Dec 10, 2024
ed79c45
Change upwd command 11
Dec 10, 2024
e6393d9
Merge pull request #2003 from GSA/1981-add-test-users
XavierMetichecchia Dec 10, 2024
01e06b3
Change upwd command 12
Dec 11, 2024
e01d2e5
Revert recent work for release
Dec 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-and-deploy-main-waf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
- cron: "0 5 * * 4"

# on:
# workflow_dispatch:
#
# workflow_dispatch:

jobs:
checkVersion:
name: Check versions
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ 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
Expand All @@ -221,4 +222,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 ..
## sed -i "s#TU_PASS#${TEST_USER_PASS}#g" ./scripts/drush-post-deploy.sh
## cat ./scripts/drush-post-deploy.sh
source ./scripts/pipeline/cloud-gov-post-deploy.sh
1 change: 1 addition & 0 deletions .github/workflows/database-restore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ 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 }}"
run: |
export S3_FILE_PATH=${{ github.event.inputs.database_file_override }}
source ./scripts/pipeline/s3-backup-download.sh
Expand Down
84 changes: 44 additions & 40 deletions .github/workflows/increment_sub_hash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,55 @@ jobs:
uses: actions/checkout@v4
with:
submodules: false # Do not checkout submodules initially
fetch-depth: 0 # Necessary to fetch all history for branch creation
fetch-depth: 0 # Fetch all history

# Set up GitHub CLI
- name: Set up GitHub CLI
run: sudo apt-get install gh -y

- name: Initialize and update submodule
continue-on-error: true # This step won't fail the workflow if an error occurs
- name: Set up Git
run: |
git submodule update --init --recursive usagov-2021
git config --global user.name "Xavier Metichecchia"
git config --global user.email "[email protected]"
git config --global pull.rebase false # Ensure merge strategy
git remote set-url origin https://${{ secrets.HASH_PAT }}@github.com/GSA/px-benefit-finder.git

- name: Update submodule to latest commit and capture latest_commit
id: update-submodule
run: |
cd usagov-2021/
git config --global user.name "Hash Pipeline"
git config --global user.email "[email protected]"
git fetch origin
latest_commit=$(git rev-parse origin/prod) # Get latest commit hash of the submodule
git checkout $latest_commit
cd ..
git add usagov-2021
git commit --allow-empty -m "Updated submodule to latest commit $latest_commit"
echo "::set-output name=latest_commit::$latest_commit" # Set the output variable

- name: Make PR Branch using submodule's SHA
- name: Update submodules on release branch
continue-on-error: true
run: |
git checkout -b update-submodule-hash-$(echo ${{ steps.update-submodule.outputs.latest_commit }} | cut -c1-7)
# Checkout the release branch
git checkout release

# Update and initialize submodules
git submodule update --init
git submodule set-branch --branch prod usagov-2021
git submodule update --remote || echo "Expected error: Failed to update all submodules."

# Check Git Status
git add .
git commit --allow-empty -m "Updated submodule to the latest commit on release branch"

# Commit the changes
git status
git --no-pager diff

- name: Push the updated branch
# Push changes to release branch
git push origin release

- name: Sync release to main
run: |
git push origin HEAD:update-submodule-hash-$(echo ${{ steps.update-submodule.outputs.latest_commit }} | cut -c1-7)
# Switch to the main branch
git checkout main

# Pull changes from release into main
git pull origin release

# Push updated main branch
git push origin main

- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}
- name: Sync release to dev
run: |
gh pr create \
--title "Automated PR from update-submodule-hash-$(echo ${{ steps.update-submodule.outputs.latest_commit }} | cut -c1-7) to ${{ github.ref_name }}" \
--body "This PR is to update the hash on the usagov-2021 submodule to ${{ steps.update-submodule.outputs.latest_commit }} on branch ${{ github.ref_name }}." \
--base ${{ github.ref_name }} \
--head "update-submodule-hash-$(echo ${{ steps.update-submodule.outputs.latest_commit }} | cut -c1-7)" \
--repo ${{ github.repository }} \
--assignee scottqueen-bixal \
--reviewer scottqueen-bixal \
--label "stale" \
--label "maintenance" \
--project "PX Benefit Finder"
# Switch to the dev branch
git checkout dev

# Pull changes from release into dev
git pull origin release

# Push updated dev branch
git push origin dev
47 changes: 3 additions & 44 deletions .github/workflows/test-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ defaults:
working-directory: ./benefit-finder

jobs:

tests-chrome:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -45,7 +44,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Chrome cypress screenshots
path: ./benefit-finder/cypress/screenshots
path: ./benefit-finder/cypress/screenshots

tests-firefox:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -77,7 +76,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Firefox cypress screenshots
path: ./benefit-finder/cypress/screenshots
path: ./benefit-finder/cypress/screenshots

tests-edge:
runs-on: ubuntu-latest
Expand All @@ -103,50 +102,10 @@ jobs:
env: NODE_ENV=test
build: "npm run cy:build:storybook"
start: "npm run cy:run:pipeline"

- name: Edge Artifact(s)
if: failure()
uses: actions/upload-artifact@v4
with:
name: Edge cypress screenshots
path: ./benefit-finder/cypress/screenshots

tests-webkit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version-file: "./benefit-finder/package.json"

- name: Install Submodule
run: |
cd ..
git submodule init
git submodule update

- name: Install dependencies
uses: cypress-io/github-action@v6
with:
working-directory: ./benefit-finder
build: npx playwright-webkit install-deps
runTests: false

- name: Cypress run (WebKit)
uses: cypress-io/github-action@v6
with:
working-directory: ./benefit-finder
install: false
browser: webkit
env: NODE_ENV=test
build: "npm run cy:build:storybook"
start: "npm run cy:run:pipeline"

- name: Webkit Artifact(s)
if: failure()
uses: actions/upload-artifact@v4
with:
name: Webkit cypress screenshots
path: ./benefit-finder/cypress/screenshots
7 changes: 0 additions & 7 deletions benefit-finder/.eslintignore

This file was deleted.

37 changes: 0 additions & 37 deletions benefit-finder/.eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions benefit-finder/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ yarn-error.log*
# generated files
.jest-test-results.json
storybook-static
.stylelintcache
.eslintcache

# cloned
themes
13 changes: 1 addition & 12 deletions benefit-finder/.stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@
"scss/load-no-partial-leading-underscore": null,
"no-descending-specificity": null,
"no-duplicate-selectors": null,
"selector-class-pattern": null,
"font-family-no-missing-generic-family-keyword": [
true,
{
"ignoreFontFamilies": [
"PublicSans-ExtraBold",
"PublicSans-Bold",
"PublicSans-Regular",
"PublicSans-ExtraLight"
]
}
]
"selector-class-pattern": null
}
}
4 changes: 2 additions & 2 deletions benefit-finder/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-console */
const { defineConfig } = require('cypress')

module.exports = defineConfig({
Expand All @@ -10,7 +10,7 @@ module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:6006',
excludeSpecPattern: 'cypress/e2e/usagov-public-site/*.cy.js',
setupNodeEvents(on, config) {
setupNodeEvents(on) {
on('task', {
log(message) {
console.log(message)
Expand Down
2 changes: 1 addition & 1 deletion benefit-finder/cypress/e2e/storybook/axe-a11y.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="cypress" />
/// <reference types="Cypress" />

import * as utils from '../../support/utils.js'
import * as BENEFITS_ELIBILITY_DATA from '../../fixtures/benefits-eligibility.json'
Expand Down
49 changes: 22 additions & 27 deletions benefit-finder/cypress/e2e/storybook/benefitAccordionGroup.cy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as utils from '../../support/utils'
import * as BENEFITS_ELIBILITY_DATA from '../../fixtures/benefits-eligibility.json'
import { pageObjects } from '../../support/pageObjects'

beforeEach(() => {
const selectedData = BENEFITS_ELIBILITY_DATA.scenario_1_covid.en.param
const scenario = utils.encodeURIFromObject(selectedData)
cy.visit(`${utils.storybookUri}${scenario}`)
pageObjects.accordionHeading().should('exist')
})

describe('BenefitAccordionGroup component tests', () => {
Expand All @@ -17,33 +19,26 @@ describe('BenefitAccordionGroup component tests', () => {
})

it('Validate opening individual accordion expands the clicked accordion and clicking it again closes it', () => {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2500).then(() => {
// get the first visible accordion and check if it is expanded
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(0)
.should('have.attr', 'aria-expanded', 'false')
// get the first visible accordion and click it
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(0)
.click()
// get the first visible accordion and check if it is expanded
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(0)
.should('have.attr', 'aria-expanded', 'true')
// get the second visible accordion and check if it is expanded
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(1)
.should('have.attr', 'aria-expanded', 'false')
// get the first visible accordion and click it
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(0)
.click()
// get the first visible accordion and check if it is expanded
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(0)
.should('have.attr', 'aria-expanded', 'false')
})
// get the first visible accordion and check if it is expanded
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(0)
.should('have.attr', 'aria-expanded', 'false')
// get the first visible accordion and click it
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button').eq(0).click()
// get the first visible accordion and check if it is expanded
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(0)
.should('have.attr', 'aria-expanded', 'true')
// get the second visible accordion and check if it is expanded
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(1)
.should('have.attr', 'aria-expanded', 'false')
// get the first visible accordion and click it
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button').eq(0).click()
// get the first visible accordion and check if it is expanded
cy.get('.bf-usa-accordion:visible .bf-usa-accordion__button')
.eq(0)
.should('have.attr', 'aria-expanded', 'false')
})

it('Validate clicking Expand all opens all accordions', () => {
Expand Down
Loading
Loading