Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production deploy #4046

Merged
merged 6 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@airbrake/node": "^2.1.8",
"@aws-sdk/client-s3": "^3.696.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#ccf9ac3",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#29b4851",
"@types/isomorphic-fetch": "^0.0.36",
"adm-zip": "^0.5.10",
"axios": "^1.7.4",
Expand Down
34 changes: 17 additions & 17 deletions api.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/tests/api-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packageManager": "[email protected]",
"dependencies": {
"@cucumber/cucumber": "^9.3.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#ccf9ac3",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#29b4851",
"axios": "^1.7.4",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
Expand Down
34 changes: 17 additions & 17 deletions e2e/tests/api-driven/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/tests/ui-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"postinstall": "./install-dependencies.sh"
},
"dependencies": {
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#ccf9ac3",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#29b4851",
"axios": "^1.7.4",
"dotenv": "^16.3.1",
"eslint": "^8.56.0",
Expand Down
34 changes: 17 additions & 17 deletions e2e/tests/ui-driven/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions e2e/tests/ui-driven/src/create-flow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import {
tearDownTestContext,
} from "./helpers/context";
import { getTeamPage } from "./helpers/getPage";
import { createAuthenticatedSession } from "./helpers/globalHelpers";
import {
createAuthenticatedSession,
filterFlags,
selectedFlag,
} from "./helpers/globalHelpers";
import {
answerAddressInput,
answerChecklist,
Expand Down Expand Up @@ -79,7 +83,7 @@ test.describe("Flow creation, publish and preview", () => {
await editor.createList();
await editor.createTaskList();
await editor.createContent();

await editor.createFilter();
await editor.createResult();
await editor.createNextSteps();
await editor.createReview();
Expand All @@ -99,6 +103,7 @@ test.describe("Flow creation, publish and preview", () => {
"A list title",
"What you should do next",
"Some content",
...filterFlags,
"Planning permission", // default result flag
"Next steps",
"Check your answers before sending your application",
Expand Down Expand Up @@ -336,6 +341,14 @@ test.describe("Flow creation, publish and preview", () => {
await expect(page.locator("p", { hasText: "Some content" })).toBeVisible();
await clickContinue({ page });

// this is the content placed in the filtered branch
await expect(
page.locator("p", {
hasText: `This is the ${selectedFlag} filter`,
}),
).toBeVisible();
await clickContinue({ page });

await expect(page.locator("h1", { hasText: "No result" })).toBeVisible();
await clickContinue({ page });

Expand Down
8 changes: 8 additions & 0 deletions e2e/tests/ui-driven/src/helpers/addComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { expect, Locator, Page } from "@playwright/test";
import { contextDefaults } from "./context";
import { externalPortalServiceProps } from "./serviceData";
import { OptionWithDataValues } from "./types";
import { selectedFlag } from "./globalHelpers";

const createBaseComponent = async (
page: Page,
Expand Down Expand Up @@ -123,6 +124,10 @@ const createBaseComponent = async (
.fill(options?.[0] || "");
break;
case ComponentType.Filter:
await page
.getByTestId("flagset-category-select")
.selectOption(selectedFlag);
break;
case ComponentType.Feedback:
break;
case ComponentType.InternalPortal:
Expand Down Expand Up @@ -359,6 +364,9 @@ async function createComponentOptions(
await page.getByPlaceholder("Option").nth(index).fill(option);
index++;
}

await page.getByPlaceholder("Flags (up to one per category)").nth(1).click();
await page.getByRole("option", { name: selectedFlag, exact: true }).click();
}

async function createComponentOptionsWithDataValues(
Expand Down
Loading
Loading