A platform for community discussion. Free, open, simple.
DEV: Fix `qunit/assert-args` (#14932)
Jarek Radosz9c9ad2262630
diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.jsindex efdbf1ab7c3..c09719d96eb 100644--- a/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js@@ -2,6 +2,7 @@ import {acceptance,count,exists,+ query,queryAll,} from "discourse/tests/helpers/qunit-helpers";import { click, visit } from "@ember/test-helpers";@@ -19,8 +20,7 @@ acceptance("Category Edit - security", function (needs) {const badgeName = firstRow.find(".group-name-label").text();assert.strictEqual(badgeName, "everyone");- const permission = firstRow.find(".d-icon-check-square");- assert.strictEqual(permission.length, 3);+ assert.strictEqual(count(".d-icon-check-square"), 3);});test("removing a permission", async function (assert) {@@ -41,8 +41,8 @@ acceptance("Category Edit - security", function (needs) {availableGroups.rowByValue("everyone").exists(),"everyone has been removed and appears in the available groups");- assert.ok(- queryAll(".row-empty").text(),+ assert.strictEqual(+ query(".row-empty").innerText,I18n.t("category.permissions.no_groups_selected"),"shows message when no groups are selected");diff --git a/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js b/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.jsindex 3b05a635128..490ffac456d 100644--- a/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js@@ -137,7 +137,6 @@ acceptance("EmojiPicker", function (needs) {assert.ok(exists(".emoji-picker button.diversity-scale.medium-dark .d-icon"),- true,"it stores diversity scale");});diff --git a/app/assets/javascripts/discourse/tests/acceptance/tags-test.js b/app/assets/javascripts/discourse/tests/acceptance/tags-test.jsindex b37b8c26518..3f8e95df2cf 100644--- a/app/assets/javascripts/discourse/tests/acceptance/tags-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/tags-test.js@@ -450,7 +450,11 @@ acceptance("Tag info", function (needs) {assert.ok(exists("#delete-tag"), "can delete tag");await click("#edit-synonyms");- assert.ok(count(".unlink-synonym:visible"), 2, "unlink UI is visible");+ assert.strictEqual(+ count(".unlink-synonym:visible"),+ 2,+ "unlink UI is visible"+ );assert.strictEqual(count(".delete-synonym:visible"),2,diff --git a/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js b/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.jsindex db55715d041..7cda767a015 100644--- a/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js+++ b/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js@@ -676,7 +676,7 @@ module("Unit | Model | post-stream", function () {topic_id: 10101,});postStream.appendPost(original);- assert.ok(+ assert.strictEqual(postStream.get("lastAppended"),original,"the original post is lastAppended"@@ -710,7 +710,7 @@ module("Unit | Model | post-stream", function () {postStream.get("loading"),"it is loading while the post is being staged");- assert.ok(+ assert.strictEqual(postStream.get("lastAppended"),original,"it doesn't consider staged posts as the lastAppended"@@ -775,7 +775,7 @@ module("Unit | Model | post-stream", function () {!postStream.get("posts").includes(stagedPost),"the post is removed from the stream");- assert.ok(+ assert.strictEqual(postStream.get("lastAppended"),original,"it doesn't consider undid post lastAppended"@@ -792,7 +792,7 @@ module("Unit | Model | post-stream", function () {topic_id: 10101,});postStream.appendPost(original);- assert.ok(+ assert.strictEqual(postStream.get("lastAppended"),original,"the original post is lastAppended"@@ -827,7 +827,7 @@ module("Unit | Model | post-stream", function () {"alreadyStaging","you can't stage a post while it is currently staging");- assert.ok(+ assert.strictEqual(postStream.get("lastAppended"),original,"staging a post doesn't change the lastAppended"@@ -854,7 +854,7 @@ module("Unit | Model | post-stream", function () {"different raw value","it also updated the value in the stream");- assert.ok(+ assert.strictEqual(postStream.get("lastAppended"),found,"committing a post changes lastAppended"