mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Make theme-qunit
discoverable from /tests
(#24606)
https://github.com/discourse/discourse/assets/50783505/c6db8c35-1473-4ccd-aca2-bfb71af9e73e
This commit is contained in:
parent
d7f618807e
commit
feb5eda0d1
@ -149,7 +149,14 @@ function setupToolbar() {
|
|||||||
QUnit.config.urlConfig.push({
|
QUnit.config.urlConfig.push({
|
||||||
id: "target",
|
id: "target",
|
||||||
label: "Target",
|
label: "Target",
|
||||||
value: ["core", "plugins", "all", "-----", ...Array.from(pluginNames)],
|
value: [
|
||||||
|
"core",
|
||||||
|
"plugins",
|
||||||
|
"all",
|
||||||
|
"theme-qunit",
|
||||||
|
"-----",
|
||||||
|
...Array.from(pluginNames),
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.begin(() => {
|
QUnit.begin(() => {
|
||||||
@ -375,6 +382,9 @@ export default function setupTests(config) {
|
|||||||
handleLegacyParameters();
|
handleLegacyParameters();
|
||||||
|
|
||||||
const target = getUrlParameter("target") || "core";
|
const target = getUrlParameter("target") || "core";
|
||||||
|
if (target === "theme-qunit") {
|
||||||
|
window.location.href = window.location.origin + "/theme-qunit";
|
||||||
|
}
|
||||||
|
|
||||||
const hasPluginJs = !!document.querySelector("script[data-discourse-plugin]");
|
const hasPluginJs = !!document.querySelector("script[data-discourse-plugin]");
|
||||||
const hasThemeJs = !!document.querySelector("script[data-theme-id]");
|
const hasThemeJs = !!document.querySelector("script[data-theme-id]");
|
||||||
|
Loading…
Reference in New Issue
Block a user