Skip to content

Commit

Permalink
chore: Update clipping smoke test to ensure categorical data appears …
Browse files Browse the repository at this point in the history
…properly when clipping (#456)

* ensure categorical data appears properly when clipping

* update snapshot

Co-authored-by: atarashansky <atarashansky@CZIMACOS3990.hsd1.ma.comcast.net>
  • Loading branch information
atarashansky and atarashansky authored Sep 23, 2022
1 parent 92c5237 commit 77cf3d8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/__tests__/e2e/__snapshots__/e2e.test.ts.snap

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions client/__tests__/e2e/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,29 @@ describe("clipping", () => {
await drag(histBrushableAreaId, coords.start, coords.end);
const cellCount = await getCellSetCount(1);
expect(cellCount).toBe(data.clip.count);

// ensure categorical data appears properly
for (const label of Object.keys(data.categorical)) {
const element = await getOneElementInnerHTML(
getTestId(`category-${label}`)
);

expect(element).toMatchSnapshot();

await clickOn(`${label}:category-expand`);

const categories = await getAllCategoriesAndCounts(label);

expect(Object.keys(categories)).toMatchObject(
// @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
Object.keys(data.categorical[label])
);

expect(Object.values(categories)).toMatchObject(
// @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
Object.values(data.categorical[label])
);
}
});
});

Expand Down

0 comments on commit 77cf3d8

Please sign in to comment.