mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:38:17 +08:00
DEV: Fix home-logo test flakes (#27135)
This commit is contained in:
parent
24d701f058
commit
4c10b2eb33
|
@ -2,11 +2,12 @@ import { getOwner } from "@ember/application";
|
|||
import { render } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import HomeLogo, {
|
||||
clearHomeLogoHrefCallback,
|
||||
clearHomeLogoHrefCallback as clearComponentHomeLogoHrefCallback,
|
||||
} from "discourse/components/header/home-logo";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { clearHomeLogoHrefCallback as clearWidgetHomeLogoHrefCallback } from "discourse/widgets/home-logo";
|
||||
|
||||
const bigLogo = "/images/d-logo-sketch.png?test";
|
||||
const smallLogo = "/images/d-logo-sketch-small.png?test";
|
||||
|
@ -22,7 +23,8 @@ module("Integration | Component | home-logo", function (hooks) {
|
|||
this.session = getOwner(this).lookup("service:session");
|
||||
this.session.set("darkModeAvailable", null);
|
||||
this.session.set("defaultColorSchemeIsDark", null);
|
||||
clearHomeLogoHrefCallback();
|
||||
clearWidgetHomeLogoHrefCallback();
|
||||
clearComponentHomeLogoHrefCallback();
|
||||
});
|
||||
|
||||
test("basics", async function (assert) {
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import { clearHomeLogoHrefCallback as clearComponentHomeLogoHrefCallback } from "discourse/components/header/home-logo";
|
||||
import MountWidget from "discourse/components/mount-widget";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { count, exists, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { clearHomeLogoHrefCallback } from "discourse/widgets/home-logo";
|
||||
import { clearHomeLogoHrefCallback as clearWidgetHomeLogoHrefCallback } from "discourse/widgets/home-logo";
|
||||
|
||||
const bigLogo = "/images/d-logo-sketch.png?test";
|
||||
const smallLogo = "/images/d-logo-sketch-small.png?test";
|
||||
|
@ -22,7 +23,8 @@ module("Integration | Component | Widget | home-logo", function (hooks) {
|
|||
this.session = getOwner(this).lookup("service:session");
|
||||
this.session.set("darkModeAvailable", null);
|
||||
this.session.set("defaultColorSchemeIsDark", null);
|
||||
clearHomeLogoHrefCallback();
|
||||
clearWidgetHomeLogoHrefCallback();
|
||||
clearComponentHomeLogoHrefCallback();
|
||||
});
|
||||
|
||||
test("basics", async function (assert) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user