Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Dec 30, 2024
1 parent e17d3d0 commit bc701ea
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/end-to-end/official-site.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,24 +156,26 @@ test("no console errors on card page", async ({ page }) => {

test("form component documentation", async ({ page }) => {
await page.goto(`${BASE}/component.sql?component=form`);

// Find the form that contains radio buttons for component selection
const componentForm = page.locator('form', {
has: page.getByRole('radio', { name: 'Chart' })
const componentForm = page.locator("form", {
has: page.getByRole("radio", { name: "Chart" }),
});

// the form should be visible
await expect(componentForm).toBeVisible();

// Check that "form" is the first and default selected option
const mapRadio = componentForm.getByRole("radio", { name: "Map" });
await expect(mapRadio).toHaveValue("map");
await expect(mapRadio).toBeChecked();

// Select "Chart" option and submit
await componentForm.getByLabel("Chart").click({ force: true });
await componentForm.getByRole("button", { name: "Submit" }).click();

// Verify we're on the chart documentation page
await expect(page.getByRole("heading", { name: /chart/i, level: 1 })).toBeVisible();
await expect(
page.getByRole("heading", { name: /chart/i, level: 1 }),
).toBeVisible();
});

0 comments on commit bc701ea

Please sign in to comment.