Skip to content

Commit

Permalink
Add change button coverage
Browse files Browse the repository at this point in the history
lint:fix

remove unused import
  • Loading branch information
RODO94 committed Dec 2, 2024
1 parent c948b8f commit 110a373
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions e2e/tests/ui-driven/src/create-flow-with-geospatial.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ test.describe("Flow creation, publish and preview", () => {

// Check property info is being shown
await expect(page.getByText("Test Street, Testville")).toBeVisible();
await expect(page.getByText("Residential - Semi Detached")).toBeVisible();
const changeButton = page.getByRole("button", {
name: "Change your Property type",
});

await changeButton.click();

await expect(page.getByText("Unknown")).toBeVisible();
await clickContinue({ page });

await expect(
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/ui-driven/src/helpers/addComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const createBaseComponent = async (
case ComponentType.FindProperty:
break;
case ComponentType.PropertyInformation:
await page.getByLabel("Show users a 'change' link to").click();
break;
case ComponentType.PlanningConstraints:
break;
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/ui-driven/src/helpers/geospatialChecks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Feature } from "geojson";

export const checkGeoJsonContent = async (page: Page, geoJson: Feature) => {
// Wait for the map component to be present
const mapComponent = await page.waitForSelector("my-map",);
const mapComponent = await page.waitForSelector("my-map");

// Get the geojsonData attribute
const geojsonData = await mapComponent.getAttribute("geojsondata");
Expand Down

0 comments on commit 110a373

Please sign in to comment.