mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-09 16:40:56 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user