mirror of
https://github.com/discourse/discourse.git
synced 2025-03-01 16:59:22 +00:00
DEV: Fix some qunit linting issues (#24686)
`qunit/literal-compare-order` `qunit/no-compare-relation-boolean` `qunit/assert-args`
This commit is contained in:
parent
2029777b86
commit
e0c876696a
@ -137,7 +137,7 @@ and a second group of images
|
||||
`[grid]${uploads[0]} ${uploads[1]} ${uploads[0]} ${uploads[1]}[/grid]`
|
||||
);
|
||||
|
||||
assert.ok(
|
||||
assert.strictEqual(
|
||||
document.querySelectorAll(".d-editor-preview .d-image-grid-column")
|
||||
.length,
|
||||
2,
|
||||
|
@ -56,11 +56,10 @@ module("Integration | Component | d-lightbox", function (hooks) {
|
||||
// the content has an aria-labelledby attribute
|
||||
assert.dom(SELECTORS.LIGHTBOX_CONTENT).hasAttribute("aria-labelledby");
|
||||
|
||||
assert.strictEqual(
|
||||
assert.true(
|
||||
query(SELECTORS.LIGHTBOX_CONTENT)
|
||||
.getAttribute("style")
|
||||
.match(/--d-lightbox/g).length > 0,
|
||||
true,
|
||||
"the content has the correct css variables added"
|
||||
);
|
||||
|
||||
|
@ -34,11 +34,7 @@ module("Integration | Component | dialog-holder", function (hooks) {
|
||||
});
|
||||
await settled();
|
||||
|
||||
assert.ok(
|
||||
query(".dialog-overlay").offsetWidth > 0,
|
||||
true,
|
||||
"overlay is visible"
|
||||
);
|
||||
assert.true(query(".dialog-overlay").offsetWidth > 0, "overlay is visible");
|
||||
assert.strictEqual(
|
||||
query(".dialog-body").innerText.trim(),
|
||||
"This is an error",
|
||||
@ -79,11 +75,7 @@ module("Integration | Component | dialog-holder", function (hooks) {
|
||||
});
|
||||
await settled();
|
||||
|
||||
assert.ok(
|
||||
query(".dialog-overlay").offsetWidth > 0,
|
||||
true,
|
||||
"overlay is visible"
|
||||
);
|
||||
assert.true(query(".dialog-overlay").offsetWidth > 0, "overlay is visible");
|
||||
assert.strictEqual(
|
||||
query(".dialog-body").innerText.trim(),
|
||||
"This is an error",
|
||||
|
@ -50,7 +50,7 @@ module("Integration | Component | emoji-uploader", function (hooks) {
|
||||
await selectKit("#emoji-group-selector").selectRowByValue("cool-emojis");
|
||||
|
||||
this.set("doneUpload", (upload, group) => {
|
||||
assert.strictEqual("cool-emojis", group);
|
||||
assert.strictEqual(group, "cool-emojis");
|
||||
done();
|
||||
});
|
||||
const image = createFile("avatar.png");
|
||||
@ -76,7 +76,7 @@ module("Integration | Component | emoji-uploader", function (hooks) {
|
||||
let uploadDoneCount = 0;
|
||||
this.set("doneUpload", (upload, group) => {
|
||||
uploadDoneCount++;
|
||||
assert.strictEqual("cool-emojis", group);
|
||||
assert.strictEqual(group, "cool-emojis");
|
||||
|
||||
if (uploadDoneCount === 2) {
|
||||
done();
|
||||
|
@ -357,7 +357,7 @@ module(
|
||||
|
||||
await render(template);
|
||||
assert.notOk(exists(".item-description"), "description is not rendered");
|
||||
assert.ok(
|
||||
assert.strictEqual(
|
||||
query("li").textContent.trim(),
|
||||
"notification label",
|
||||
"only label content is displayed"
|
||||
@ -390,7 +390,7 @@ module(
|
||||
);
|
||||
|
||||
await render(template);
|
||||
assert.ok(
|
||||
assert.strictEqual(
|
||||
query("li").textContent.trim(),
|
||||
"notification description",
|
||||
"only notification description is displayed"
|
||||
|
@ -253,10 +253,10 @@ module("Unit | Utility | autocomplete", function (hooks) {
|
||||
element.dispatchEvent(new KeyboardEvent("keyup", { key: "@" }));
|
||||
|
||||
let list = document.querySelectorAll("#ac-testing ul li");
|
||||
assert.strictEqual(2, list.length);
|
||||
assert.strictEqual(list.length, 2);
|
||||
|
||||
let selected = document.querySelectorAll("#ac-testing ul li a.selected");
|
||||
assert.strictEqual(1, selected.length);
|
||||
assert.strictEqual("test1", selected[0].innerText);
|
||||
assert.strictEqual(selected.length, 1);
|
||||
assert.strictEqual(selected[0].innerText, "test1");
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user