Skip to content

Commit

Permalink
side by side tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloster committed Jun 18, 2024
1 parent 9c5380b commit e6cccf3
Show file tree
Hide file tree
Showing 21 changed files with 1,169 additions and 963 deletions.
16 changes: 13 additions & 3 deletions client/__tests__/e2e/cellxgeneActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,18 @@ export async function snapshotTestGraph(page: Page, testInfo: TestInfo) {
);
}

export async function selectLayout(layoutChoice: string, page: Page) {
await page.getByTestId(LAYOUT_CHOICE_TEST_ID).click();
export async function selectLayout(
layoutChoice: string,
graphTsetId: string,
sidePanel: string,
page: Page
) {
let layoutChoiceTestId = LAYOUT_CHOICE_TEST_ID;
if (graphTsetId === sidePanel) {
layoutChoiceTestId = `${LAYOUT_CHOICE_TEST_ID}-side`;
}

await page.getByTestId(layoutChoiceTestId).click();

/**
* (thuang): For blueprint radio buttons, we need to tab first to go to the
Expand Down Expand Up @@ -847,7 +857,7 @@ export async function selectLayout(layoutChoice: string, page: Page) {
}
}

await page.getByTestId(LAYOUT_CHOICE_TEST_ID).click();
await page.getByTestId(layoutChoiceTestId).click();

await page.waitForTimeout(WAIT_FOR_SWITCH_LAYOUT_MS);
}
Expand Down
4 changes: 4 additions & 0 deletions client/__tests__/e2e/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const datasets = {
{
"coordinates-as-percent": { x1: 0.1, y1: 0.25, x2: 0.7, y2: 0.75 },
count: "930",
count_side: "1211",
},
],
invalidLasso: [
Expand Down Expand Up @@ -113,6 +114,7 @@ export const datasets = {
lasso: {
"coordinates-as-percent": { x1: 0.3, y1: 0.3, x2: 0.5, y2: 0.5 },
count: "37",
count_side: "45",
},
},
},
Expand Down Expand Up @@ -211,6 +213,7 @@ export const datasets = {
{
"coordinates-as-percent": { x1: 0.1, y1: 0.25, x2: 0.7, y2: 0.75 },
count: "2025",
count_side: "1775",
},
],
invalidLasso: [
Expand Down Expand Up @@ -284,6 +287,7 @@ export const datasets = {
lasso: {
"coordinates-as-percent": { x1: 0.3, y1: 0.3, x2: 0.5, y2: 0.5 },
count: "221",
count_side: "221",
},
},
},
Expand Down
Loading

0 comments on commit e6cccf3

Please sign in to comment.