Skip to content

Commit

Permalink
Remove redundant URLs from Axe testing
Browse files Browse the repository at this point in the history
  • Loading branch information
scruti committed Aug 7, 2024
1 parent a14ff56 commit 3ddc269
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/accessibility_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ jobs:
npm install -g @axe-core/cli sitemap-urls
# Gets all urls from sitemap in an array
urls=($(curl https://$HTTP_BASIC_USER:[email protected]/sitemap.xml | sitemap-urls))
# Removes sitemap urls that are redundant
urls=("${urls[@]/*teaching-jobs-in-*}")
urls=("${urls[@]/*\-jobs*}")
# Delete empty elements
for i in ${!urls[@]}; do [[ -z ${urls[i]} ]] && unset urls[i]; done
echo $(for url in "${urls[@]}"; do echo "$url\n"; done;)
# Transforms URLS to authenticated URLs
urls=("${urls[@]/qa\./$HTTP_BASIC_USER\:$HTTP_BASIC_PASSWORD\@qa\.}")
# Runs axe against each url from the sitemap
Expand Down

0 comments on commit 3ddc269

Please sign in to comment.