From 9ec820fce856b42c8c3695db6df207e7d8daec54 Mon Sep 17 00:00:00 2001 From: merefield Date: Wed, 29 May 2024 15:54:34 +0100 Subject: [PATCH] linting --- test/javascripts/acceptance/field-test.js | 66 ++++++++++++++--------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/test/javascripts/acceptance/field-test.js b/test/javascripts/acceptance/field-test.js index 8635bee1..fdf99da5 100644 --- a/test/javascripts/acceptance/field-test.js +++ b/test/javascripts/acceptance/field-test.js @@ -1,5 +1,11 @@ import { getOwner } from "@ember/application"; -import { click, fillIn, settled, triggerKeyEvent, visit } from "@ember/test-helpers"; +import { + click, + fillIn, + settled, + triggerKeyEvent, + visit, +} from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, @@ -23,22 +29,24 @@ acceptance("Field | Fields", function (needs) { ); server.get("/u/search/users", () => helper.response(usersJson)); - server.post("/uploads.json", () => { - return helper.response({ - extension: "jpeg", - filesize: 126177, - height: 800, - human_filesize: "123 KB", - id: 202, - original_filename: "avatar.PNG.jpg", - retain_hours: null, - short_path: "/uploads/short-url/yoj8pf9DdIeHRRULyw7i57GAYdz.jpeg", - short_url: "upload://yoj8pf9DdIeHRRULyw7i57GAYdz.jpeg", - thumbnail_height: 320, - thumbnail_width: 690, - url: "/images/discourse-logo-sketch-small.png", - width: 1920, - }); + server.post( + "/uploads.json", + () => { + return helper.response({ + extension: "jpeg", + filesize: 126177, + height: 800, + human_filesize: "123 KB", + id: 202, + original_filename: "avatar.PNG.jpg", + retain_hours: null, + short_path: "/uploads/short-url/yoj8pf9DdIeHRRULyw7i57GAYdz.jpeg", + short_url: "upload://yoj8pf9DdIeHRRULyw7i57GAYdz.jpeg", + thumbnail_height: 320, + thumbnail_width: 690, + url: "/images/discourse-logo-sketch-small.png", + width: 1920, + }); }, 500 // this delay is important to slow down the uploads a bit so we can let elements of the interface update ); @@ -84,16 +92,22 @@ acceptance("Field | Fields", function (needs) { const appEvents = getOwner(this).lookup("service:app-events"); const done = assert.async(); - appEvents.on(`${wizardComposerEdtiorEventPrefix}:all-uploads-complete`, async () => { - await settled(); - assert.ok(!exists(".wizard-btn.next.primary:disabled")); - done(); - }); + appEvents.on( + `${wizardComposerEdtiorEventPrefix}:all-uploads-complete`, + async () => { + await settled(); + assert.ok(!exists(".wizard-btn.next.primary:disabled")); + done(); + } + ); - appEvents.on(`${wizardComposerEdtiorEventPrefix}:upload-started`, async () => { - await settled() - assert.ok(exists(".wizard-btn.next.primary:disabled")); - }); + appEvents.on( + `${wizardComposerEdtiorEventPrefix}:upload-started`, + async () => { + await settled(); + assert.ok(exists(".wizard-btn.next.primary:disabled")); + } + ); const image = createFile("avatar.png"); appEvents.trigger(`${wizardComposerEdtiorEventPrefix}:add-files`, image);