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

UHF-9632: Fix Visual regression tests #905

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 5 additions & 2 deletions .github/workflows/visual.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
Expand Down Expand Up @@ -82,12 +83,14 @@ jobs:
export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install && npm install && npx playwright install

- name: Check if we should re-create reference images
if: contains( github.event.pull_request.labels.*.name, 'recreate-reference-images')
run: echo "GENERATE_REFERENCES=1" >> $GITHUB_ENV

- name: Generate reference images
working-directory: ${{ env.THEME_FOLDER }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Uncomment this to force update reference images.
#GENERATE_REFERENCES: 1
run: |
gh run download -n bitmaps -D backstop_data/full/bitmaps_reference || true

Expand Down
28 changes: 14 additions & 14 deletions backstop_data/backstop_dynamic_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,20 +297,20 @@ function getConfig(hostname, type) {
],
'selectorExpansion': expandComponents,
},
{
'label': 'DC: Events',
'url': `https://${hostname}/en/dc-components/dc-events`,
'removeSelectors': removeDefault,
// 'hideSelectors': [
// '.event-list__event-image',
// ],
'delay': 1000, // The images are slow to load
'readySelector': '.react-search__results-stats',
'selectors': [
'.component--event-list'
],
'selectorExpansion': expandComponents,
},
//{
// 'label': 'DC: Event list',
// 'url': `https://${hostname}/en/dc-components/dc-event-list`,
// 'removeSelectors': removeDefault,
// // 'hideSelectors': [
// // '.event-list__event-image',
// // ],
// 'delay': 1000, // The images are slow to load
// 'readySelector': '.react-search__results-stats',
// 'selectors': [
// '.component--event-list'
// ],
// 'selectorExpansion': expandComponents,
//},
{
'label': 'DC: Image',
'url': `https://${hostname}/en/dc-components/dc-image`,
Expand Down
Loading