mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-18 11:11:38 +03:00
Merge pull request #910 from NoRedInk/bat/one-doodad-at-a-time
Bat/one doodad at a time
This commit is contained in:
commit
bbd61c20d8
@ -40,6 +40,8 @@ Run tests with
|
||||
- `shake test`
|
||||
- `elm-test`
|
||||
|
||||
You can run the Puppeteer tests for only one component by passing the name of the component to the test script, for example: `./script/puppeteer-tests-no-percy.sh Button`
|
||||
|
||||
### CI (Travis)
|
||||
|
||||
Travis will run `shake ci` to verify everything looks good.
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
npx mocha script/puppeteer-tests.js --timeout 15000 --exit
|
||||
env ONLYDOODAD=${1-default} npx mocha script/puppeteer-tests.js --timeout 15000 --exit
|
@ -49,7 +49,6 @@ describe('UI tests', function () {
|
||||
await page.goto(location)
|
||||
await page.waitFor(`#${name.replace(".", "-")}`)
|
||||
await percySnapshot(page, name)
|
||||
console.log(`Snapshot complete for ${name}`)
|
||||
|
||||
const results = await new AxePuppeteer(page).disableRules(skippedRules[name] || []).analyze();
|
||||
handleAxeResults(name, results);
|
||||
@ -65,7 +64,6 @@ describe('UI tests', function () {
|
||||
await page.waitForSelector(".checkbox-V5__Checked")
|
||||
await percySnapshot(page, `${name} - display icon names`)
|
||||
|
||||
console.log(`Snapshots complete for ${name}`)
|
||||
|
||||
const results = await new AxePuppeteer(page).disableRules(skippedRules[name] || []).analyze();
|
||||
handleAxeResults(name, results);
|
||||
@ -142,10 +140,12 @@ describe('UI tests', function () {
|
||||
|
||||
await links.reduce((acc, [name, location]) => {
|
||||
return acc.then(() => {
|
||||
let handler = specialProcessing[name] || defaultProcessing
|
||||
return handler(name, location)
|
||||
if (process.env.ONLYDOODAD == "default" || process.env.ONLYDOODAD == name) {
|
||||
console.log(`Testing ${name}`)
|
||||
let handler = specialProcessing[name] || defaultProcessing;
|
||||
return handler(name, location);
|
||||
}
|
||||
)
|
||||
})
|
||||
}, Promise.resolve())
|
||||
|
||||
page.close();
|
||||
|
Loading…
Reference in New Issue
Block a user