refactor categorical controls state (#1549)

* refactor categorical controls state

* lint

* fix race condition in tests

* fix typo

* add missing update on subset

* remove obsolete code

* update jest and puppeteer major version; update all minors

* update when label changes

* remove lint from tests; increase timeouts in e2e tests

* changes in response to PR review

* lint

* more PR comment changes

* more PR comment fixes

* lint

* more PR comment resolutions
This commit is contained in:
Bruce Martin
2020-06-10 12:56:38 -07:00
committed by GitHub
parent f063708b33
commit bc7a712048
25 changed files with 5097 additions and 3510 deletions
+10 -6
View File
@@ -1,15 +1,17 @@
export const puppeteerUtils = (page) => ({
async waitByID(testId, props = {}) {
const puppeteerUtils = (page) => ({
waitByID(testId, props = {}) {
return page.waitForSelector(`[data-testid='${testId}']`, props);
},
async waitByClass(testClass, props = {}) {
waitByClass(testClass, props = {}) {
return page.waitForSelector(`[data-testclass='${testClass}']`, props);
},
async waitForAllByIds(testIds) {
await Promise.all(
testIds.map((testId) => page.waitForSelector(`[data-testid='${testId}']`))
async waitForAllByIds(testIds, props = {}) {
return Promise.all(
testIds.map((testId) =>
page.waitForSelector(`[data-testid='${testId}']`, props)
)
);
},
@@ -67,3 +69,5 @@ export const puppeteerUtils = (page) => ({
});
},
});
export default puppeteerUtils;