snapshot parentInnerhtml

This commit is contained in:
Colin Megill
2021-06-30 12:53:42 -07:00
parent 1e2b27db80
commit e54d0e3412
3 changed files with 15 additions and 140122 deletions
File diff suppressed because one or more lines are too long
+12 -7
View File
@@ -147,8 +147,6 @@ describe.each([
await clickOn(`diffexp-button`);
await waitByClass("pop-1-geneset-expand");
await expect(page).toClick(getTestClass("pop-1-geneset-expand"));
const popOne = await waitByClass("histogram-gene-set-summary");
const popOneParent = (await popOne.$x(".."))[0];
await page.waitForFunction(
(selector) => !document.querySelector(selector),
@@ -156,21 +154,28 @@ describe.each([
getTestClass("gene-loading-spinner")
);
expect(popOneParent).toMatchSnapshot();
const popOneParentHTML = await page.$eval(
getTestClass("histogram-gene-set-summary"),
(el) => el.parentElement.innerHTML
);
expect(popOneParentHTML).toMatchSnapshot();
await expect(page).toClick(getTestClass("pop-1-geneset-expand"));
await expect(page).toClick(getTestClass("pop-2-geneset-expand"));
const popTwo = await waitByClass("histogram-gene-set-summary");
const popTwoParent = (await popTwo.$x(".."))[0];
await page.waitForFunction(
(selector) => !document.querySelector(selector),
{},
getTestClass("gene-loading-spinner")
);
expect(popTwoParent).toMatchSnapshot();
const popTwoParentHTML = await page.$eval(
getTestClass("histogram-gene-set-summary"),
(el) => el.parentElement.innerHTML
);
expect(popTwoParentHTML).toMatchSnapshot();
});
test("create a new geneset", async () => {
if (config.withSubset) return;
@@ -9,6 +9,7 @@ const StillLoading = ({ zebra, displayName }) => {
*/
return (
<div
data-testclass="gene-loading-spinner"
style={{
padding: globals.leftSidebarSectionPadding,
backgroundColor: zebra ? globals.lightestGrey : "white",