mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-19 03:31:32 +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`
|
- `shake test`
|
||||||
- `elm-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)
|
### CI (Travis)
|
||||||
|
|
||||||
Travis will run `shake ci` to verify everything looks good.
|
Travis will run `shake ci` to verify everything looks good.
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
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.goto(location)
|
||||||
await page.waitFor(`#${name.replace(".", "-")}`)
|
await page.waitFor(`#${name.replace(".", "-")}`)
|
||||||
await percySnapshot(page, name)
|
await percySnapshot(page, name)
|
||||||
console.log(`Snapshot complete for ${name}`)
|
|
||||||
|
|
||||||
const results = await new AxePuppeteer(page).disableRules(skippedRules[name] || []).analyze();
|
const results = await new AxePuppeteer(page).disableRules(skippedRules[name] || []).analyze();
|
||||||
handleAxeResults(name, results);
|
handleAxeResults(name, results);
|
||||||
@ -65,7 +64,6 @@ describe('UI tests', function () {
|
|||||||
await page.waitForSelector(".checkbox-V5__Checked")
|
await page.waitForSelector(".checkbox-V5__Checked")
|
||||||
await percySnapshot(page, `${name} - display icon names`)
|
await percySnapshot(page, `${name} - display icon names`)
|
||||||
|
|
||||||
console.log(`Snapshots complete for ${name}`)
|
|
||||||
|
|
||||||
const results = await new AxePuppeteer(page).disableRules(skippedRules[name] || []).analyze();
|
const results = await new AxePuppeteer(page).disableRules(skippedRules[name] || []).analyze();
|
||||||
handleAxeResults(name, results);
|
handleAxeResults(name, results);
|
||||||
@ -142,10 +140,12 @@ describe('UI tests', function () {
|
|||||||
|
|
||||||
await links.reduce((acc, [name, location]) => {
|
await links.reduce((acc, [name, location]) => {
|
||||||
return acc.then(() => {
|
return acc.then(() => {
|
||||||
let handler = specialProcessing[name] || defaultProcessing
|
if (process.env.ONLYDOODAD == "default" || process.env.ONLYDOODAD == name) {
|
||||||
return handler(name, location)
|
console.log(`Testing ${name}`)
|
||||||
|
let handler = specialProcessing[name] || defaultProcessing;
|
||||||
|
return handler(name, location);
|
||||||
}
|
}
|
||||||
)
|
})
|
||||||
}, Promise.resolve())
|
}, Promise.resolve())
|
||||||
|
|
||||||
page.close();
|
page.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user