Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Jul 1, 2024
1 parent 665b90b commit 632fe5e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/static/tests/e2e/code.etest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,19 @@ test.describe("Code Tab tests", () => {

const expectGraphVariables = async (page: Page, graphIndex: number, expectedVariables: string[]) => {
// expect to find these variables in config panel and on plot series
const configPanel = await page.locator(`:nth-match(.graph-config-panel, ${graphIndex+1})`);
const configPanel = await page.locator(`:nth-match(.graph-config-panel, ${graphIndex + 1})`);
const configVars = await configPanel.locator(".variable .variable-name");
await expect(configVars).toHaveCount(expectedVariables.length);

const plotSummary = await page.locator(`:nth-match(.wodin-plot-container .wodin-plot-data-summary, ${graphIndex+1})`);
for(let i = 0; i < expectedVariables.length; i++) {
const plotSummary = await page.locator(
`:nth-match(.wodin-plot-container .wodin-plot-data-summary, ${graphIndex + 1})`
);
for (let i = 0; i < expectedVariables.length; i++) {
await expect(configVars.nth(i)).toHaveText(expectedVariables[i]);
await expect(plotSummary.locator(`:nth-match(.wodin-plot-data-summary-series, ${i+1})`))
.toHaveAttribute("name", expectedVariables[i]);
await expect(plotSummary.locator(`:nth-match(.wodin-plot-data-summary-series, ${i + 1})`)).toHaveAttribute(
"name",
expectedVariables[i]
);
}
};

Expand Down

0 comments on commit 632fe5e

Please sign in to comment.