From e7208ab4c6454613eb7af1e9a117b9f72b154cbf Mon Sep 17 00:00:00 2001 From: marstall Date: Thu, 27 Jul 2023 17:46:58 -0400 Subject: [PATCH] FIX: fix flaky test from settings editor PR (discouse:main:80f5018) (#22834) --- .../components/admin-theme-settings-editor-test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/tests/integration/components/admin-theme-settings-editor-test.js b/app/assets/javascripts/discourse/tests/integration/components/admin-theme-settings-editor-test.js index 48e42efa7d2..c4fdacad53a 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/admin-theme-settings-editor-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/admin-theme-settings-editor-test.js @@ -2,6 +2,7 @@ import { module, test } from "qunit"; import { setupRenderingTest } from "discourse/tests/helpers/component-test"; import { render } from "@ember/test-helpers"; import { hbs } from "ember-cli-htmlbars"; + /* example valid content for ace editor: [ @@ -56,7 +57,8 @@ module( ) }} />`); const lines = document.querySelectorAll(".ace_line"); - assert.strictEqual(lines[0].innerHTML, "["); + const indexOf = lines[0].innerHTML.indexOf("["); + assert.ok(indexOf >= 0); }); test("input is valid json", async function (assert) {