DEV: Fix `qunit/assert-args` (#14932)
Just a couple of invalid assertions.
This commit is contained in:
parent
b1c72282c9
commit
9c9ad22626
|
@ -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"
|
||||
);
|
||||
|
|
|
@ -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"
|
||||
);
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue