garris / garris/BackstopJS

Using JSON values as functions arguments

Open
#817 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

It is possible to use some of backstop.json values as arguments in puppeteer functions?

For example:

"label": "Sign Confirmation",
"url": "URL.COM",
"referenceUrl": "HOM.URL.COM",
"onReadyScript": "puppet/custom/sign-confirmation.js",
"delay": 0,
"hideSelectors": [],
"selectorExpansion": true,
"misMatchThreshold" : 0.5,
"requireSameDimensions": true

> puppet/custom/sign-confirmation.js

```
module.exports = async (page) => {

await login(page)

await page.goto(referenceUrl + \SIGNCONFIRMATION)

};
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.