-
Notifications
You must be signed in to change notification settings - Fork 607
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
Feat/1432 global scenario settings #1539
Feat/1432 global scenario settings #1539
Conversation
Great work @dgrebb. 🥳 |
Thanks @JPustkuchen! For maintainability, especially because the project has (and will have more!) numerous contributors, I would suggest avoiding the word " There are some
These are used when running To avoid breaking changes, this new " I'm not in love with the name, either. We have a tough job. Perhaps simply using a top level " Will think on this, and also give time for others to discover the party we have going on in here 🎉 Thank you for the suggestions! |
@garris as discussed I've renamed the global scenario configuration object @JPustkuchen FYA — you almost got what you asked for :) |
GREAT WORK, thank you @dgrebb !! 🎉 |
Thank you @dgrebb! ⭐️ |
Problem
As described in #1432 and other issues, setting/getting
scenario
properties at the global level would save time, typing, and testing overhead.Solution
Spread (
...
) and logical OR (||
) operator.Important
This feature is opt-in only, and documented as such
Because configuration at the
scenario
level will always override anyglobals
set inbackstop.json
, a user will need to remove the corresponding property in ascenario
object.This is a 100% non-breaking change, thanks to spread
...
Supported Global Properties
cookiePath
url
- maybe we have a single-page app with no routes?readySelector
delay
hideSelectors
removeSelectors
hoverSelector
clickSelector
postInteractionWait
selectors
selectorExpansion
misMatchThreshold
- previously supported but refactoredgetMisMatchThreshHold
requireSameDimensions
- previously supported but refactoredgetRequireSameDimensions
Added to both Playwright and Puppeteer.
Closes
removeSelectors
globally? #1090hideSelectors
not working #715Notes
An example:
Expand `backstop.json`
Next Steps
We could discuss moving the global
onBefore
andonReady
scripts into the newglobals
object, but it would be a breaking change, or duplicative (to classify as non-breaking), as we'd have them repeated as such: