-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove redundant URLs from Axe testing
- Loading branch information
Showing
1 changed file
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|