Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamdelion committed Nov 26, 2024
1 parent 89f61f8 commit 4d1422b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 50 deletions.
3 changes: 1 addition & 2 deletions e2e/tests/ui-driven/src/create-flow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ test.describe("Flow creation, publish and preview", () => {
"Next steps",
"Check your answers before sending your application",
"Confirmation",
"Tell us what you think"
"Tell us what you think",
]);
});

Expand Down Expand Up @@ -299,6 +299,5 @@ test.describe("Flow creation, publish and preview", () => {
await expect(
page.locator("h1", { hasText: "Tell us what you think" }),
).toBeVisible();

});
});
68 changes: 34 additions & 34 deletions e2e/tests/ui-driven/src/helpers/addComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const createBaseComponent = async (
locatingNode: Locator,
type: ComponentType,
title?: string,
options?: string[]
options?: string[],
) => {
await locatingNode.click();
await page.getByRole("dialog").waitFor();
Expand Down Expand Up @@ -133,128 +133,128 @@ export const createQuestionWithOptions = async (
page: Page,
locatingNode: Locator,
questionText: string,
options: string[]
options: string[],
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.Question,
questionText,
options
options,
);
};

export const createNotice = async (
page: Page,
locatingNode: Locator,
noticeText: string
noticeText: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.Notice,
noticeText
noticeText,
);
};

export const createChecklist = async (
page: Page,
locatingNode: Locator,
checklistTitle: string,
checklistOptions: string[]
checklistOptions: string[],
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.Checklist,
checklistTitle,
checklistOptions
checklistOptions,
);
};

export const createTextInput = async (
page: Page,
locatingNode: Locator,
inputTitle: string
inputTitle: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.TextInput,
inputTitle
inputTitle,
);
};

export const createNumberInput = async (
page: Page,
locatingNode: Locator,
inputTitle: string,
inputUnits: string
inputUnits: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.NumberInput,
inputTitle,
[inputUnits]
[inputUnits],
);
};

export const createDateInput = async (
page: Page,
locatingNode: Locator,
inputTitle: string
inputTitle: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.DateInput,
inputTitle
inputTitle,
);
};

export const createAddressInput = async (
page: Page,
locatingNode: Locator,
inputTitle: string,
inputDataField: string
inputDataField: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.AddressInput,
inputTitle,
[inputDataField]
[inputDataField],
);
};

export const createContactInput = async (
page: Page,
locatingNode: Locator,
inputTitle: string,
inputDataField: string
inputDataField: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.ContactInput,
inputTitle,
[inputDataField]
[inputDataField],
);
};

export const createTaskList = async (
page: Page,
locatingNode: Locator,
title: string,
taskListOptions: string[]
taskListOptions: string[],
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.TaskList,
title,
taskListOptions
taskListOptions,
);
};

Expand All @@ -268,12 +268,12 @@ export const createFindProperty = async (page: Page, locatingNode: Locator) => {

export const createPlanningConstraints = async (
page: Page,
locatingNode: Locator
locatingNode: Locator,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.PlanningConstraints
ComponentType.PlanningConstraints,
);
};

Expand All @@ -284,35 +284,35 @@ export const createDrawBoundary = async (page: Page, locatingNode: Locator) => {
export const createNextSteps = async (
page: Page,
locatingNode: Locator,
nextSteps: string[]
nextSteps: string[],
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.NextSteps,
undefined,
nextSteps
nextSteps,
);
};

export const createFileUpload = async (
page: Page,
locatingNode: Locator,
dataField: string
dataField: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.FileUpload,
undefined,
[dataField]
[dataField],
);
};

async function createComponentOptions(
options: string[],
buttonText: string,
page: Page
page: Page,
) {
let index = 0;
for (const option of options) {
Expand All @@ -326,14 +326,14 @@ export const createList = async (
page: Page,
locatingNode: Locator,
inputTitle: string,
inputDataField: string
inputDataField: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.List,
inputTitle,
[inputDataField]
[inputDataField],
);
};

Expand All @@ -349,28 +349,28 @@ export const createUploadAndLabel = async (
page: Page,
locatingNode: Locator,
fileType: string,
dataField: string
dataField: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.FileUploadAndLabel,
undefined,
[fileType, dataField]
[fileType, dataField],
);
};

export const createContent = async (
page: Page,
locatingNode: Locator,
content: string
content: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.Content,
undefined,
[content]
[content],
);
};

Expand All @@ -381,13 +381,13 @@ export const createFilter = async (page: Page, locatingNode: Locator) => {
export const createInternalPortal = async (
page: Page,
locatingNode: Locator,
portalName: string
portalName: string,
) => {
await createBaseComponent(
page,
locatingNode,
ComponentType.InternalPortal,
portalName
portalName,
);
};

Expand Down
Loading

0 comments on commit 4d1422b

Please sign in to comment.