From f177267606fab3e9086aa1d971e1cd11217821d9 Mon Sep 17 00:00:00 2001 From: Christian Hartmann Date: Wed, 1 Apr 2026 23:08:44 +0200 Subject: [PATCH] Chore: fix formatting Signed-off-by: Christian Hartmann --- playwright/e2e/a11y-question-inputs.spec.ts | 12 +++++----- playwright/e2e/form-settings.spec.ts | 16 +++++++------- playwright/e2e/form-sharing.spec.ts | 16 +++++--------- playwright/e2e/question-editing.spec.ts | 8 +++---- playwright/e2e/required-fields.spec.ts | 14 ++++++------ playwright/e2e/results-view.spec.ts | 16 +++++++------- playwright/e2e/submit-form.spec.ts | 14 ++++++------ playwright/support/fixtures/results.ts | 2 +- playwright/support/fixtures/submit.ts | 2 +- playwright/support/helpers.ts | 8 +++---- .../support/sections/QuestionSection.ts | 3 ++- playwright/support/sections/ResultsSection.ts | 6 ++++- playwright/support/sections/SubmitSection.ts | 22 +++++++++++++++++-- 13 files changed, 79 insertions(+), 60 deletions(-) diff --git a/playwright/e2e/a11y-question-inputs.spec.ts b/playwright/e2e/a11y-question-inputs.spec.ts index 13e60fc01..66df3a141 100644 --- a/playwright/e2e/a11y-question-inputs.spec.ts +++ b/playwright/e2e/a11y-question-inputs.spec.ts @@ -4,12 +4,12 @@ */ import { expect, mergeTests } from '@playwright/test' -import { test as formTest } from '../support/fixtures/form' -import { test as appNavigationTest } from '../support/fixtures/navigation' -import { test as randomUserTest } from '../support/fixtures/random-user' -import { test as topBarTest } from '../support/fixtures/topBar' -import { QuestionType } from '../support/sections/QuestionType' -import { FormsView } from '../support/sections/TopBarSection' +import { test as formTest } from '../support/fixtures/form.ts' +import { test as appNavigationTest } from '../support/fixtures/navigation.ts' +import { test as randomUserTest } from '../support/fixtures/random-user.ts' +import { test as topBarTest } from '../support/fixtures/topBar.ts' +import { QuestionType } from '../support/sections/QuestionType.ts' +import { FormsView } from '../support/sections/TopBarSection.ts' const test = mergeTests(randomUserTest, appNavigationTest, formTest, topBarTest) diff --git a/playwright/e2e/form-settings.spec.ts b/playwright/e2e/form-settings.spec.ts index 3600dece5..f860ac6d0 100644 --- a/playwright/e2e/form-settings.spec.ts +++ b/playwright/e2e/form-settings.spec.ts @@ -4,14 +4,14 @@ */ import { expect, mergeTests } from '@playwright/test' -import { test as formTest } from '../support/fixtures/form' -import { test as appNavigationTest } from '../support/fixtures/navigation' -import { test as randomUserTest } from '../support/fixtures/random-user' -import { test as submitTest } from '../support/fixtures/submit' -import { test as topBarTest } from '../support/fixtures/topBar' -import { waitForApiResponse } from '../support/helpers' -import { QuestionType } from '../support/sections/QuestionType' -import { FormsView } from '../support/sections/TopBarSection' +import { test as formTest } from '../support/fixtures/form.ts' +import { test as appNavigationTest } from '../support/fixtures/navigation.ts' +import { test as randomUserTest } from '../support/fixtures/random-user.ts' +import { test as submitTest } from '../support/fixtures/submit.ts' +import { test as topBarTest } from '../support/fixtures/topBar.ts' +import { waitForApiResponse } from '../support/helpers.ts' +import { QuestionType } from '../support/sections/QuestionType.ts' +import { FormsView } from '../support/sections/TopBarSection.ts' const test = mergeTests( randomUserTest, diff --git a/playwright/e2e/form-sharing.spec.ts b/playwright/e2e/form-sharing.spec.ts index 28bedfb1c..8e379a8b5 100644 --- a/playwright/e2e/form-sharing.spec.ts +++ b/playwright/e2e/form-sharing.spec.ts @@ -4,17 +4,13 @@ */ import { expect, mergeTests } from '@playwright/test' -import { test as randomUserTest } from '../support/fixtures/random-user' -import { test as appNavigationTest } from '../support/fixtures/navigation' -import { test as formTest } from '../support/fixtures/form' -import { QuestionType } from '../support/sections/QuestionType' -import { waitForApiResponse } from '../support/helpers' +import { test as formTest } from '../support/fixtures/form.ts' +import { test as appNavigationTest } from '../support/fixtures/navigation.ts' +import { test as randomUserTest } from '../support/fixtures/random-user.ts' +import { waitForApiResponse } from '../support/helpers.ts' +import { QuestionType } from '../support/sections/QuestionType.ts' -const test = mergeTests( - randomUserTest, - appNavigationTest, - formTest, -) +const test = mergeTests(randomUserTest, appNavigationTest, formTest) test.describe('Form sharing', () => { test.beforeEach(async ({ page, appNavigation, form }) => { diff --git a/playwright/e2e/question-editing.spec.ts b/playwright/e2e/question-editing.spec.ts index a0c7b27c9..6b37d0c00 100644 --- a/playwright/e2e/question-editing.spec.ts +++ b/playwright/e2e/question-editing.spec.ts @@ -4,10 +4,10 @@ */ import { expect, mergeTests } from '@playwright/test' -import { test as randomUserTest } from '../support/fixtures/random-user' -import { test as appNavigationTest } from '../support/fixtures/navigation' -import { test as formTest } from '../support/fixtures/form' -import { QuestionType } from '../support/sections/QuestionType' +import { test as formTest } from '../support/fixtures/form.ts' +import { test as appNavigationTest } from '../support/fixtures/navigation.ts' +import { test as randomUserTest } from '../support/fixtures/random-user.ts' +import { QuestionType } from '../support/sections/QuestionType.ts' const test = mergeTests(randomUserTest, appNavigationTest, formTest) diff --git a/playwright/e2e/required-fields.spec.ts b/playwright/e2e/required-fields.spec.ts index 1da97dd65..d514694f3 100644 --- a/playwright/e2e/required-fields.spec.ts +++ b/playwright/e2e/required-fields.spec.ts @@ -4,13 +4,13 @@ */ import { expect, mergeTests } from '@playwright/test' -import { test as formTest } from '../support/fixtures/form' -import { test as appNavigationTest } from '../support/fixtures/navigation' -import { test as randomUserTest } from '../support/fixtures/random-user' -import { test as submitTest } from '../support/fixtures/submit' -import { test as topBarTest } from '../support/fixtures/topBar' -import { QuestionType } from '../support/sections/QuestionType' -import { FormsView } from '../support/sections/TopBarSection' +import { test as formTest } from '../support/fixtures/form.ts' +import { test as appNavigationTest } from '../support/fixtures/navigation.ts' +import { test as randomUserTest } from '../support/fixtures/random-user.ts' +import { test as submitTest } from '../support/fixtures/submit.ts' +import { test as topBarTest } from '../support/fixtures/topBar.ts' +import { QuestionType } from '../support/sections/QuestionType.ts' +import { FormsView } from '../support/sections/TopBarSection.ts' const test = mergeTests( randomUserTest, diff --git a/playwright/e2e/results-view.spec.ts b/playwright/e2e/results-view.spec.ts index 2254762a6..e4a22f523 100644 --- a/playwright/e2e/results-view.spec.ts +++ b/playwright/e2e/results-view.spec.ts @@ -4,14 +4,14 @@ */ import { expect, mergeTests } from '@playwright/test' -import { test as formTest } from '../support/fixtures/form' -import { test as appNavigationTest } from '../support/fixtures/navigation' -import { test as randomUserTest } from '../support/fixtures/random-user' -import { test as resultsTest } from '../support/fixtures/results' -import { test as submitTest } from '../support/fixtures/submit' -import { test as topBarTest } from '../support/fixtures/topBar' -import { QuestionType } from '../support/sections/QuestionType' -import { FormsView } from '../support/sections/TopBarSection' +import { test as formTest } from '../support/fixtures/form.ts' +import { test as appNavigationTest } from '../support/fixtures/navigation.ts' +import { test as randomUserTest } from '../support/fixtures/random-user.ts' +import { test as resultsTest } from '../support/fixtures/results.ts' +import { test as submitTest } from '../support/fixtures/submit.ts' +import { test as topBarTest } from '../support/fixtures/topBar.ts' +import { QuestionType } from '../support/sections/QuestionType.ts' +import { FormsView } from '../support/sections/TopBarSection.ts' const test = mergeTests( randomUserTest, diff --git a/playwright/e2e/submit-form.spec.ts b/playwright/e2e/submit-form.spec.ts index 336aafca9..aa0b666a9 100644 --- a/playwright/e2e/submit-form.spec.ts +++ b/playwright/e2e/submit-form.spec.ts @@ -4,13 +4,13 @@ */ import { expect, mergeTests } from '@playwright/test' -import { test as randomUserTest } from '../support/fixtures/random-user' -import { test as appNavigationTest } from '../support/fixtures/navigation' -import { test as formTest } from '../support/fixtures/form' -import { test as topBarTest } from '../support/fixtures/topBar' -import { test as submitTest } from '../support/fixtures/submit' -import { QuestionType } from '../support/sections/QuestionType' -import { FormsView } from '../support/sections/TopBarSection' +import { test as formTest } from '../support/fixtures/form.ts' +import { test as appNavigationTest } from '../support/fixtures/navigation.ts' +import { test as randomUserTest } from '../support/fixtures/random-user.ts' +import { test as submitTest } from '../support/fixtures/submit.ts' +import { test as topBarTest } from '../support/fixtures/topBar.ts' +import { QuestionType } from '../support/sections/QuestionType.ts' +import { FormsView } from '../support/sections/TopBarSection.ts' const test = mergeTests( randomUserTest, diff --git a/playwright/support/fixtures/results.ts b/playwright/support/fixtures/results.ts index 8f05841c9..df03abaf6 100644 --- a/playwright/support/fixtures/results.ts +++ b/playwright/support/fixtures/results.ts @@ -4,7 +4,7 @@ */ import { test as baseTest } from '@playwright/test' -import { ResultsSection } from '../sections/ResultsSection' +import { ResultsSection } from '../sections/ResultsSection.ts' interface ResultsFixture { resultsView: ResultsSection diff --git a/playwright/support/fixtures/submit.ts b/playwright/support/fixtures/submit.ts index b3c2c3fea..150592bf1 100644 --- a/playwright/support/fixtures/submit.ts +++ b/playwright/support/fixtures/submit.ts @@ -4,7 +4,7 @@ */ import { test as baseTest } from '@playwright/test' -import { SubmitSection } from '../sections/SubmitSection' +import { SubmitSection } from '../sections/SubmitSection.ts' interface SubmitFixture { submitView: SubmitSection diff --git a/playwright/support/helpers.ts b/playwright/support/helpers.ts index f12ffa7af..6a93d444c 100644 --- a/playwright/support/helpers.ts +++ b/playwright/support/helpers.ts @@ -10,11 +10,11 @@ const FORMS_API_PATH = '/api/v3/forms/' /** * Wait for a Forms API response matching the given HTTP method. * Must be called BEFORE the action that triggers the request. + * + * @param page the current page + * @param method the request method */ -export function waitForApiResponse( - page: Page, - method: string, -): Promise { +export function waitForApiResponse(page: Page, method: string): Promise { return page.waitForResponse( (response) => response.request().method() === method diff --git a/playwright/support/sections/QuestionSection.ts b/playwright/support/sections/QuestionSection.ts index 9bc9e85e3..39576f77f 100644 --- a/playwright/support/sections/QuestionSection.ts +++ b/playwright/support/sections/QuestionSection.ts @@ -4,7 +4,8 @@ */ import type { Locator, Page } from '@playwright/test' -import { waitForApiResponse } from '../helpers' + +import { waitForApiResponse } from '../helpers.ts' export class QuestionSection { public readonly titleInput: Locator diff --git a/playwright/support/sections/ResultsSection.ts b/playwright/support/sections/ResultsSection.ts index b9039a06a..d200c5a7f 100644 --- a/playwright/support/sections/ResultsSection.ts +++ b/playwright/support/sections/ResultsSection.ts @@ -33,7 +33,11 @@ export class ResultsSection { await this.responsesTab.dispatchEvent('change') } - /** Get the summary section for a specific question by its title. */ + /** + * Get the summary section for a specific question by its title. + * + * @param name the title of the question + */ public getSummaryForQuestion(name: string | RegExp): Locator { return this.page .getByRole('main') diff --git a/playwright/support/sections/SubmitSection.ts b/playwright/support/sections/SubmitSection.ts index 467b0aed6..f4c10042b 100644 --- a/playwright/support/sections/SubmitSection.ts +++ b/playwright/support/sections/SubmitSection.ts @@ -20,6 +20,8 @@ export class SubmitSection { * Get a question's list item by its title text. * Questions render as
  • , * and each contains an

    with the title text. + * + * @param name the title of the question */ public getQuestion(name: string | RegExp): Locator { return this.page @@ -32,8 +34,14 @@ export class SubmitSection { * QuestionShort renders , * QuestionLong renders