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,
|
acceptance,
|
||||||
count,
|
count,
|
||||||
exists,
|
exists,
|
||||||
|
query,
|
||||||
queryAll,
|
queryAll,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-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();
|
const badgeName = firstRow.find(".group-name-label").text();
|
||||||
assert.strictEqual(badgeName, "everyone");
|
assert.strictEqual(badgeName, "everyone");
|
||||||
|
|
||||||
const permission = firstRow.find(".d-icon-check-square");
|
assert.strictEqual(count(".d-icon-check-square"), 3);
|
||||||
assert.strictEqual(permission.length, 3);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("removing a permission", async function (assert) {
|
test("removing a permission", async function (assert) {
|
||||||
|
@ -41,8 +41,8 @@ acceptance("Category Edit - security", function (needs) {
|
||||||
availableGroups.rowByValue("everyone").exists(),
|
availableGroups.rowByValue("everyone").exists(),
|
||||||
"everyone has been removed and appears in the available groups"
|
"everyone has been removed and appears in the available groups"
|
||||||
);
|
);
|
||||||
assert.ok(
|
assert.strictEqual(
|
||||||
queryAll(".row-empty").text(),
|
query(".row-empty").innerText,
|
||||||
I18n.t("category.permissions.no_groups_selected"),
|
I18n.t("category.permissions.no_groups_selected"),
|
||||||
"shows message when no groups are selected"
|
"shows message when no groups are selected"
|
||||||
);
|
);
|
||||||
|
|
|
@ -137,7 +137,6 @@ acceptance("EmojiPicker", function (needs) {
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists(".emoji-picker button.diversity-scale.medium-dark .d-icon"),
|
exists(".emoji-picker button.diversity-scale.medium-dark .d-icon"),
|
||||||
true,
|
|
||||||
"it stores diversity scale"
|
"it stores diversity scale"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -450,7 +450,11 @@ acceptance("Tag info", function (needs) {
|
||||||
assert.ok(exists("#delete-tag"), "can delete tag");
|
assert.ok(exists("#delete-tag"), "can delete tag");
|
||||||
|
|
||||||
await click("#edit-synonyms");
|
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(
|
assert.strictEqual(
|
||||||
count(".delete-synonym:visible"),
|
count(".delete-synonym:visible"),
|
||||||
2,
|
2,
|
||||||
|
|
|
@ -676,7 +676,7 @@ module("Unit | Model | post-stream", function () {
|
||||||
topic_id: 10101,
|
topic_id: 10101,
|
||||||
});
|
});
|
||||||
postStream.appendPost(original);
|
postStream.appendPost(original);
|
||||||
assert.ok(
|
assert.strictEqual(
|
||||||
postStream.get("lastAppended"),
|
postStream.get("lastAppended"),
|
||||||
original,
|
original,
|
||||||
"the original post is lastAppended"
|
"the original post is lastAppended"
|
||||||
|
@ -710,7 +710,7 @@ module("Unit | Model | post-stream", function () {
|
||||||
postStream.get("loading"),
|
postStream.get("loading"),
|
||||||
"it is loading while the post is being staged"
|
"it is loading while the post is being staged"
|
||||||
);
|
);
|
||||||
assert.ok(
|
assert.strictEqual(
|
||||||
postStream.get("lastAppended"),
|
postStream.get("lastAppended"),
|
||||||
original,
|
original,
|
||||||
"it doesn't consider staged posts as the lastAppended"
|
"it doesn't consider staged posts as the lastAppended"
|
||||||
|
@ -775,7 +775,7 @@ module("Unit | Model | post-stream", function () {
|
||||||
!postStream.get("posts").includes(stagedPost),
|
!postStream.get("posts").includes(stagedPost),
|
||||||
"the post is removed from the stream"
|
"the post is removed from the stream"
|
||||||
);
|
);
|
||||||
assert.ok(
|
assert.strictEqual(
|
||||||
postStream.get("lastAppended"),
|
postStream.get("lastAppended"),
|
||||||
original,
|
original,
|
||||||
"it doesn't consider undid post lastAppended"
|
"it doesn't consider undid post lastAppended"
|
||||||
|
@ -792,7 +792,7 @@ module("Unit | Model | post-stream", function () {
|
||||||
topic_id: 10101,
|
topic_id: 10101,
|
||||||
});
|
});
|
||||||
postStream.appendPost(original);
|
postStream.appendPost(original);
|
||||||
assert.ok(
|
assert.strictEqual(
|
||||||
postStream.get("lastAppended"),
|
postStream.get("lastAppended"),
|
||||||
original,
|
original,
|
||||||
"the original post is lastAppended"
|
"the original post is lastAppended"
|
||||||
|
@ -827,7 +827,7 @@ module("Unit | Model | post-stream", function () {
|
||||||
"alreadyStaging",
|
"alreadyStaging",
|
||||||
"you can't stage a post while it is currently staging"
|
"you can't stage a post while it is currently staging"
|
||||||
);
|
);
|
||||||
assert.ok(
|
assert.strictEqual(
|
||||||
postStream.get("lastAppended"),
|
postStream.get("lastAppended"),
|
||||||
original,
|
original,
|
||||||
"staging a post doesn't change the lastAppended"
|
"staging a post doesn't change the lastAppended"
|
||||||
|
@ -854,7 +854,7 @@ module("Unit | Model | post-stream", function () {
|
||||||
"different raw value",
|
"different raw value",
|
||||||
"it also updated the value in the stream"
|
"it also updated the value in the stream"
|
||||||
);
|
);
|
||||||
assert.ok(
|
assert.strictEqual(
|
||||||
postStream.get("lastAppended"),
|
postStream.get("lastAppended"),
|
||||||
found,
|
found,
|
||||||
"committing a post changes lastAppended"
|
"committing a post changes lastAppended"
|
||||||
|
|
Loading…
Reference in New Issue