Skip to content

Commit

Permalink
Update e2e test to match latest R API build
Browse files Browse the repository at this point in the history
  • Loading branch information
david-mears-2 committed Sep 10, 2024
1 parent 0966d2b commit 143063c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default defineConfig({
webServer: {
command: "npm run build && cd .output && node ./server/index.mjs",
url: "http://127.0.0.1:3000",
timeout: 120 * 1000,
timeout: 30 * 1000,
reuseExistingServer: true,
stdout: "pipe", // Debugging
},
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/runAnalysis.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ test("Can request a scenario analysis run", async ({ page, baseURL }) => {
await page.waitForURL(`${baseURL}/scenarios/new`);

await expect(page.getByText("Simulate a new scenario")).toBeVisible();
await expect(page.getByRole("form")).toBeVisible({ timeout: 30000 });
await expect(page.getByRole("form")).toBeVisible();

await page.selectOption('select[id="pathogen"]', { label: "Influenza 1957" });
await page.selectOption('select[id="response"]', { label: "Elimination" });
await page.selectOption('select[id="country"]', { label: "United States" });
await page.click('div[aria-label="Advance vaccine investment"] label[for="low"]');
await page.click('div[aria-label="Global vaccine investment"] label[for="low"]');

await expect(page.getByRole("form")).toHaveAttribute("data-test-form-data", "{\"country\":\"United States\",\"pathogen\":\"influenza-1957\",\"response\":\"elimination\",\"vaccine\":\"low\"}");

Expand Down

0 comments on commit 143063c

Please sign in to comment.