diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-test.js index 45a40f095d0..318460d635b 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/topic-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-test.js @@ -1,6 +1,5 @@ import { acceptance, - chromeTest, count, exists, publishToMessageBus, @@ -376,67 +375,54 @@ acceptance("Topic featured links", function (needs) { assert.ok(!exists(".gap"), "it hides gap"); }); - chromeTest( - "Quoting a quote keeps the original poster name", - async function (assert) { - await visit("/t/internationalization-localization/280"); - await selectText("#post_5 blockquote"); - await click(".quote-button .insert-quote"); + test("Quoting a quote keeps the original poster name", async function (assert) { + await visit("/t/internationalization-localization/280"); + await selectText("#post_5 blockquote"); + await click(".quote-button .insert-quote"); - assert.ok( - query(".d-editor-input").value.includes( - 'quote="codinghorror said, post:3, topic:280"' - ) - ); - } - ); + assert.ok( + query(".d-editor-input").value.includes( + 'quote="codinghorror said, post:3, topic:280"' + ) + ); + }); - chromeTest( - "Quoting a quote of a different topic keeps the original topic title", - async function (assert) { - await visit("/t/internationalization-localization/280"); - await selectText("#post_9 blockquote"); - await click(".quote-button .insert-quote"); + test("Quoting a quote of a different topic keeps the original topic title", async function (assert) { + await visit("/t/internationalization-localization/280"); + await selectText("#post_9 blockquote"); + await click(".quote-button .insert-quote"); - assert.ok( - query(".d-editor-input").value.includes( - 'quote="A new topic with a link to another topic, post:3, topic:62"' - ) - ); - } - ); + assert.ok( + query(".d-editor-input").value.includes( + 'quote="A new topic with a link to another topic, post:3, topic:62"' + ) + ); + }); - chromeTest( - "Quoting a quote with the Reply button keeps the original poster name", - async function (assert) { - await visit("/t/internationalization-localization/280"); - await selectText("#post_5 blockquote"); - await click(".reply"); + test("Quoting a quote with the Reply button keeps the original poster name", async function (assert) { + await visit("/t/internationalization-localization/280"); + await selectText("#post_5 blockquote"); + await click(".reply"); - assert.ok( - query(".d-editor-input").value.includes( - 'quote="codinghorror said, post:3, topic:280"' - ) - ); - } - ); + assert.ok( + query(".d-editor-input").value.includes( + 'quote="codinghorror said, post:3, topic:280"' + ) + ); + }); - // Using J/K on Firefox clean the text selection, so this won't work there - chromeTest( - "Quoting a quote with replyAsNewTopic keeps the original poster name", - async function (assert) { - await visit("/t/internationalization-localization/280"); - await selectText("#post_5 blockquote"); - await triggerKeyEvent(document, "keypress", "J"); - await triggerKeyEvent(document, "keypress", "T"); + test("Quoting a quote with replyAsNewTopic keeps the original poster name", async function (assert) { + await visit("/t/internationalization-localization/280"); + await selectText("#post_5 blockquote"); + await triggerKeyEvent(document, "keypress", "J"); + await triggerKeyEvent(document, "keypress", "T"); - assert.ok( - query(".d-editor-input").value.includes( - 'quote="codinghorror said, post:3, topic:280"' - ) - ); - } - ); + assert.ok( + query(".d-editor-input").value.includes( + 'quote="codinghorror said, post:3, topic:280"' + ) + ); + }); test("Quoting by selecting text can mark the quote as full", async function (assert) { await visit("/t/internationalization-localization/280"); diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js b/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js index c5bfaa81b71..8d46a09206b 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js @@ -2,7 +2,6 @@ import { module, test } from "qunit"; import { setupRenderingTest } from "discourse/tests/helpers/component-test"; import { click, fillIn, render, settled } from "@ember/test-helpers"; import { - chromeTest, exists, paste, query, @@ -71,7 +70,7 @@ module("Integration | Component | d-editor", function (hooks) { } function testCase(title, testFunc) { - chromeTest(title, async function (assert) { + test(title, async function (assert) { this.set("value", "hello world."); await render(hbs`<DEditor @value={{this.value}} />`); diff --git a/app/assets/javascripts/discourse/tests/integration/components/input-size-test.js b/app/assets/javascripts/discourse/tests/integration/components/input-size-test.js index a1d8049056b..bf24a842ddb 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/input-size-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/input-size-test.js @@ -1,7 +1,7 @@ -import { module } from "qunit"; +import { module, test } from "qunit"; import { setupRenderingTest } from "discourse/tests/helpers/component-test"; import { render } from "@ember/test-helpers"; -import { chromeTest, query } from "discourse/tests/helpers/qunit-helpers"; +import { query } from "discourse/tests/helpers/qunit-helpers"; import { hbs } from "ember-cli-htmlbars"; module( @@ -9,28 +9,24 @@ module( function (hooks) { setupRenderingTest(hooks); - // these tests fail on Firefox 78 in CI, skipping for now - chromeTest( - "icon only button, icon and text button, text only button", - async function (assert) { - await render( - hbs`<DButton @icon="plus" /> <DButton @icon="plus" @label="topic.create" /> <DButton @label="topic.create" />` - ); + test("icon only button, icon and text button, text only button", async function (assert) { + await render( + hbs`<DButton @icon="plus" /> <DButton @icon="plus" @label="topic.create" /> <DButton @label="topic.create" />` + ); - assert.strictEqual( - query(".btn:nth-child(1)").offsetHeight, - query(".btn:nth-child(2)").offsetHeight, - "have equal height" - ); - assert.strictEqual( - query(".btn:nth-child(1)").offsetHeight, - query(".btn:nth-child(3)").offsetHeight, - "have equal height" - ); - } - ); + assert.strictEqual( + query(".btn:nth-child(1)").offsetHeight, + query(".btn:nth-child(2)").offsetHeight, + "have equal height" + ); + assert.strictEqual( + query(".btn:nth-child(1)").offsetHeight, + query(".btn:nth-child(3)").offsetHeight, + "have equal height" + ); + }); - chromeTest("button + text input", async function (assert) { + test("button + text input", async function (assert) { await render( hbs`<TextField /> <DButton @icon="plus" @label="topic.create" />` ); @@ -42,7 +38,7 @@ module( ); }); - chromeTest("combo box + input", async function (assert) { + test("combo box + input", async function (assert) { await render( hbs`<ComboBox @options={{hash none="category.none"}} /> <TextField />` );