diff --git a/playwright/support/fixtures/random-user.ts b/playwright/support/fixtures/random-user.ts index e2778b398..973d600fb 100644 --- a/playwright/support/fixtures/random-user.ts +++ b/playwright/support/fixtures/random-user.ts @@ -12,7 +12,10 @@ import { createRandomUser, login } from '../utils/session' export const test = base.extend({ page: async ({ browser, baseURL }, use) => { // Important: make sure we authenticate in a clean environment by unsetting storage state. - const page = await browser.newPage({ storageState: undefined, baseURL }) + const page = await browser.newPage({ + storageState: undefined, + baseURL, + }) const uid = await createRandomUser() await login(page.request, uid, uid) diff --git a/playwright/support/sections/QuestionSection.ts b/playwright/support/sections/QuestionSection.ts index 3439d88f3..2b6c44acd 100644 --- a/playwright/support/sections/QuestionSection.ts +++ b/playwright/support/sections/QuestionSection.ts @@ -15,7 +15,9 @@ export class QuestionSection { public readonly page: Page, public readonly section: Locator, ) { - this.titleInput = this.section.getByRole('textbox', { name: /title of/i }) + this.titleInput = this.section.getByRole('textbox', { + name: /title of/i, + }) this.newAnswerInput = this.section.getByRole('textbox', { name: 'Add a new answer', }) diff --git a/playwright/support/utils/session.ts b/playwright/support/utils/session.ts index 950ca0899..483d82a3a 100644 --- a/playwright/support/utils/session.ts +++ b/playwright/support/utils/session.ts @@ -62,7 +62,10 @@ export async function runShell( */ export async function runOCC( command: string, - options?: { env?: Record; rejectOnError?: boolean }, + options?: { + env?: Record + rejectOnError?: boolean + }, ) { return await runShell(`php ./occ ${command}`, { ...options, @@ -109,6 +112,8 @@ export async function login( */ export async function createRandomUser(): Promise { const uid = (Math.random() + 1).toString(36).substring(7) - await runOCC(`user:add --password-from-env ${uid}`, { env: { OC_PASS: uid } }) + await runOCC(`user:add --password-from-env ${uid}`, { + env: { OC_PASS: uid }, + }) return uid } diff --git a/src/Forms.vue b/src/Forms.vue index 66411b4a1..60afe99bd 100644 --- a/src/Forms.vue +++ b/src/Forms.vue @@ -379,7 +379,9 @@ export default { ) this.allSharedForms = OcsResponse2Data(response) } catch (error) { - logger.error('Error while loading shared forms list', { error }) + logger.error('Error while loading shared forms list', { + error, + }) showError( t('forms', 'An error occurred while loading the forms list'), ) @@ -451,7 +453,10 @@ export default { ) const newForm = OcsResponse2Data(response) this.forms.unshift(newForm) - this.$router.push({ name: 'edit', params: { hash: newForm.hash } }) + this.$router.push({ + name: 'edit', + params: { hash: newForm.hash }, + }) this.mobileCloseNavigation() } catch (error) { logger.error('Unable to create new form', { error }) @@ -467,11 +472,16 @@ export default { async onCloneForm(id) { try { const response = await axios.post( - generateOcsUrl('apps/forms/api/v3/forms?fromId={id}', { id }), + generateOcsUrl('apps/forms/api/v3/forms?fromId={id}', { + id, + }), ) const newForm = OcsResponse2Data(response) this.forms.unshift(newForm) - this.$router.push({ name: 'edit', params: { hash: newForm.hash } }) + this.$router.push({ + name: 'edit', + params: { hash: newForm.hash }, + }) this.mobileCloseNavigation() } catch (error) { logger.error(`Unable to copy form ${id}`, { error }) diff --git a/src/components/AppNavigationForm.vue b/src/components/AppNavigationForm.vue index 5e92f1e63..dca2bdc84 100644 --- a/src/components/AppNavigationForm.vue +++ b/src/components/AppNavigationForm.vue @@ -254,7 +254,9 @@ export default { if (this.form.expires) { const relativeDate = moment(this.form.expires, 'X').fromNow() if (this.isExpired) { - return t('forms', 'Expired {relativeDate}', { relativeDate }) + return t('forms', 'Expired {relativeDate}', { + relativeDate, + }) } return t('forms', 'Expires {relativeDate}', { relativeDate }) } @@ -318,7 +320,9 @@ export default { this.isArchived ? FormState.FormClosed : FormState.FormArchived, ) } catch (error) { - logger.error('Error changing archived state of form', { error }) + logger.error('Error changing archived state of form', { + error, + }) showError(t('forms', 'Error changing archived state of form')) } }, diff --git a/src/components/QRDialog.vue b/src/components/QRDialog.vue index acbd43f27..3a2baaad3 100644 --- a/src/components/QRDialog.vue +++ b/src/components/QRDialog.vue @@ -32,7 +32,9 @@ :src="uri" :title="text" :alt=" - t('forms', 'QR code representation of {text}', { text: text }) + t('forms', 'QR code representation of {text}', { + text: text, + }) " /> @@ -90,7 +92,9 @@ export default { async generateQr() { if (this.text) { try { - this.uri = await QRCode.toDataURL(this.text, { width: 256 }) + this.uri = await QRCode.toDataURL(this.text, { + width: 256, + }) } catch (err) { console.error(err) } diff --git a/src/components/Questions/Question.vue b/src/components/Questions/Question.vue index d9f8a1195..4ba825ab9 100644 --- a/src/components/Questions/Question.vue +++ b/src/components/Questions/Question.vue @@ -67,7 +67,9 @@ v-if="!readOnly" :placeholder="titlePlaceholder" :aria-label=" - t('forms', 'Title of question number {index}', { index }) + t('forms', 'Title of question number {index}', { + index, + }) " :value="text" class="question__header__title__text question__header__title__text__input" diff --git a/src/components/Questions/QuestionLong.vue b/src/components/Questions/QuestionLong.vue index fbbf6728d..54187f2ac 100644 --- a/src/components/Questions/QuestionLong.vue +++ b/src/components/Questions/QuestionLong.vue @@ -30,7 +30,9 @@