mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00:00
DEV: Fix invalid hbs syntax in tests (#27348)
Followup to 26198fb32817c6df336ea20e6d234f0f58d663da also removes superfluous whitespace
This commit is contained in:
parent
da162639fa
commit
fb812a48ab
@ -88,7 +88,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("-expanded class", async function (assert) {
|
test("-expanded class", async function (assert) {
|
||||||
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
assert.dom(".fk-d-menu__trigger").doesNotHaveClass("-expanded");
|
assert.dom(".fk-d-menu__trigger").doesNotHaveClass("-expanded");
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("trigger id attribute", async function (assert) {
|
test("trigger id attribute", async function (assert) {
|
||||||
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
assert.dom(".fk-d-menu__trigger").hasAttribute("id");
|
assert.dom(".fk-d-menu__trigger").hasAttribute("id");
|
||||||
});
|
});
|
||||||
@ -116,7 +116,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("aria-expanded attribute", async function (assert) {
|
test("aria-expanded attribute", async function (assert) {
|
||||||
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
assert.dom(".fk-d-menu__trigger").hasAttribute("aria-expanded", "false");
|
assert.dom(".fk-d-menu__trigger").hasAttribute("aria-expanded", "false");
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("content role attribute", async function (assert) {
|
test("content role attribute", async function (assert) {
|
||||||
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
await open();
|
await open();
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("content aria-labelledby attribute", async function (assert) {
|
test("content aria-labelledby attribute", async function (assert) {
|
||||||
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
await open();
|
await open();
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
|
|
||||||
test("@closeOnEscape", async function (assert) {
|
test("@closeOnEscape", async function (assert) {
|
||||||
await render(
|
await render(
|
||||||
hbs`<DMenu @inline={{true}} @label="label" @closeOnEscape={{true}} />`
|
hbs`<DMenu @inline={{true}} @label="label" @closeOnEscape={{true}} />`
|
||||||
);
|
);
|
||||||
await open();
|
await open();
|
||||||
await triggerKeyEvent(document.activeElement, "keydown", "Escape");
|
await triggerKeyEvent(document.activeElement, "keydown", "Escape");
|
||||||
@ -188,7 +188,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
assert.dom(".fk-d-menu").doesNotExist();
|
assert.dom(".fk-d-menu").doesNotExist();
|
||||||
|
|
||||||
await render(
|
await render(
|
||||||
hbs`<DMenu @inline={{true}} @label="label" @closeOnEscape={{false}} />`
|
hbs`<DMenu @inline={{true}} @label="label" @closeOnEscape={{false}} />`
|
||||||
);
|
);
|
||||||
await open();
|
await open();
|
||||||
await triggerKeyEvent(document.activeElement, "keydown", "Escape");
|
await triggerKeyEvent(document.activeElement, "keydown", "Escape");
|
||||||
@ -198,7 +198,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
|
|
||||||
test("@closeOnClickOutside", async function (assert) {
|
test("@closeOnClickOutside", async function (assert) {
|
||||||
await render(
|
await render(
|
||||||
hbs`<span class="test">test</span><DMenu @inline={{true}} @label="label" @closeOnClickOutside={{true}} />`
|
hbs`<span class="test">test</span><DMenu @inline={{true}} @label="label" @closeOnClickOutside={{true}} />`
|
||||||
);
|
);
|
||||||
await open();
|
await open();
|
||||||
await triggerEvent(".test", "pointerdown");
|
await triggerEvent(".test", "pointerdown");
|
||||||
@ -206,7 +206,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
assert.dom(".fk-d-menu").doesNotExist();
|
assert.dom(".fk-d-menu").doesNotExist();
|
||||||
|
|
||||||
await render(
|
await render(
|
||||||
hbs`<span class="test">test</span><DMenu @inline={{true}} @label="label" @closeOnClickOutside={{false}} />`
|
hbs`<span class="test">test</span><DMenu @inline={{true}} @label="label" @closeOnClickOutside={{false}} />`
|
||||||
);
|
);
|
||||||
await open();
|
await open();
|
||||||
await triggerEvent(".test", "pointerdown");
|
await triggerEvent(".test", "pointerdown");
|
||||||
@ -216,7 +216,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
|
|
||||||
test("@maxWidth", async function (assert) {
|
test("@maxWidth", async function (assert) {
|
||||||
await render(
|
await render(
|
||||||
hbs`<DMenu @inline={{true}} @label="label" @maxWidth={{20}} />`
|
hbs`<DMenu @inline={{true}} @label="label" @maxWidth={{20}} />`
|
||||||
);
|
);
|
||||||
await open();
|
await open();
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("applies position", async function (assert) {
|
test("applies position", async function (assert) {
|
||||||
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
||||||
await open();
|
await open();
|
||||||
|
|
||||||
assert.dom(".fk-d-menu").hasAttribute("style", /left: /);
|
assert.dom(".fk-d-menu").hasAttribute("style", /left: /);
|
||||||
|
@ -88,13 +88,13 @@ module("Integration | Component | FloatKit | d-tooltip", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("trigger role attribute", async function (assert) {
|
test("trigger role attribute", async function (assert) {
|
||||||
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
assert.dom(".fk-d-tooltip__trigger").hasAttribute("role", "button");
|
assert.dom(".fk-d-tooltip__trigger").hasAttribute("role", "button");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("trigger id attribute", async function (assert) {
|
test("trigger id attribute", async function (assert) {
|
||||||
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
assert.dom(".fk-d-tooltip__trigger").hasAttribute("id");
|
assert.dom(".fk-d-tooltip__trigger").hasAttribute("id");
|
||||||
});
|
});
|
||||||
@ -112,7 +112,7 @@ module("Integration | Component | FloatKit | d-tooltip", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("aria-expanded attribute", async function (assert) {
|
test("aria-expanded attribute", async function (assert) {
|
||||||
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
assert.dom(".fk-d-tooltip__trigger").hasAttribute("aria-expanded", "false");
|
assert.dom(".fk-d-tooltip__trigger").hasAttribute("aria-expanded", "false");
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ module("Integration | Component | FloatKit | d-tooltip", function (hooks) {
|
|||||||
|
|
||||||
test("<:trigger>", async function (assert) {
|
test("<:trigger>", async function (assert) {
|
||||||
await render(
|
await render(
|
||||||
hbs`<DTooltip @inline={{true}}><:trigger>label</:trigger></DTooltip />`
|
hbs`<DTooltip @inline={{true}}><:trigger>label</:trigger></DTooltip>`
|
||||||
);
|
);
|
||||||
|
|
||||||
assert.dom(".fk-d-tooltip__trigger").hasText("label");
|
assert.dom(".fk-d-tooltip__trigger").hasText("label");
|
||||||
@ -131,7 +131,7 @@ module("Integration | Component | FloatKit | d-tooltip", function (hooks) {
|
|||||||
|
|
||||||
test("<:content>", async function (assert) {
|
test("<:content>", async function (assert) {
|
||||||
await render(
|
await render(
|
||||||
hbs`<DTooltip @inline={{true}}><:content>content</:content></DTooltip />`
|
hbs`<DTooltip @inline={{true}}><:content>content</:content></DTooltip>`
|
||||||
);
|
);
|
||||||
|
|
||||||
await hover();
|
await hover();
|
||||||
@ -140,7 +140,7 @@ module("Integration | Component | FloatKit | d-tooltip", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("content role attribute", async function (assert) {
|
test("content role attribute", async function (assert) {
|
||||||
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
await hover();
|
await hover();
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ module("Integration | Component | FloatKit | d-tooltip", function (hooks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("content aria-labelledby attribute", async function (assert) {
|
test("content aria-labelledby attribute", async function (assert) {
|
||||||
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
await render(hbs`<DTooltip @inline={{true}} @label="label" />`);
|
||||||
|
|
||||||
await hover();
|
await hover();
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ module("Integration | Component | user-info", function (hooks) {
|
|||||||
this.currentUser.status = { emoji: "tooth", description: "off to dentist" };
|
this.currentUser.status = { emoji: "tooth", description: "off to dentist" };
|
||||||
|
|
||||||
await render(
|
await render(
|
||||||
hbs`<UserInfo @user={{this.currentUser}} @showStatus={{true}} /><DTooltips />`
|
hbs`<UserInfo @user={{this.currentUser}} @showStatus={{true}} /><DTooltips />`
|
||||||
);
|
);
|
||||||
await triggerEvent(query(".user-status-message"), "mousemove");
|
await triggerEvent(query(".user-status-message"), "mousemove");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user