Created
February 4, 2020 01:30
-
-
Save DylanLacey/841fbf2c4ac7efe61ef0a37b61d1d038 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// This is how your screener config might look to start with | |
var Steps = require('screener-runner/src/steps'); | |
module.exports = { | |
// full repository name for your project: | |
projectRepo: 'dylan/fake-screener', | |
// this example assumes Environment Variables listed below exist on your system: | |
apiKey: "some_key", | |
// array of UI states to capture visual snapshots of. | |
// each state consists of a url and a name. | |
states: [ | |
{ | |
url: 'https://saucelabs.com', | |
name: 'State One' | |
}, | |
{ | |
url: 'https://saucelabs.com/pricing', | |
name: 'State Two' | |
} | |
{ | |
url: 'https://saucelabs.com/support-policy', | |
name: 'State Three' | |
} | |
] | |
}; |
This file contains hidden or 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
// Our new screener config needs to require the files we put our steps into | |
var first = require("./path_to/state_file_one.js"); | |
var second = require("./path_to/state_file_two.js"); | |
module.exports = { | |
// full repository name for your project: | |
projectRepo: 'dylan/fake-screener', | |
// this example assumes Environment Variables listed below exist on your system: | |
apiKey: "1e3f165b-0d39-4800-9f10-8220d25a1690" | |
, | |
// Then we fill in the states array with the imported states, using the ...syntax to expand them | |
states: [...first, ...second] | |
}; |
This file contains hidden or 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
// A broken up set of states will require the "Steps" to be imported into each file. | |
var Steps = require('screener-runner/src/steps'); | |
// Then define a const called states | |
const states = [ | |
{ | |
url: 'https://saucelabs.com', | |
name: 'State One' | |
}, | |
{ | |
url: 'https://saucelabs.com/pricing', | |
name: 'State Two' | |
} | |
] | |
// And export it | |
module.exports = states |
This file contains hidden or 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
// A broken up set of states will require the "Steps" to be imported into each file. | |
var Steps = require('screener-runner/src/steps'); | |
// Then define a const called states | |
const states = [ | |
{ | |
url: 'https://saucelabs.com/support-policy', | |
name: 'State Three' | |
} | |
] | |
// And export it | |
module.exports = states |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment