Skip to content

Commit db0c5e7

Browse files
Change the URL for devhost visual tests in the CI (#17143)
Devhost visual tests use a local devhost instead of the CDN, this changes how they run on the CI to use the localhost.
1 parent efcbc4d commit db0c5e7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/tools/testTools/src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ import { checkArgs, populateEnvironment } from "@dev/build-tools";
88
// eslint-disable-next-line @typescript-eslint/naming-convention
99
export const getGlobalConfig = (overrideConfig: { root?: string; baseUrl?: string; usesDevHost: boolean } = { usesDevHost: false }) => {
1010
populateEnvironment();
11+
let baseUrl = undefined;
12+
if (overrideConfig.usesDevHost) {
13+
baseUrl = (checkArgs(["--enable-https"], true) ? "https" : "http") + "://localhost:1338";
14+
} else {
15+
baseUrl = process.env.CDN_BASE_URL || (checkArgs(["--enable-https"], true) ? "https" : "http") + "://localhost:1337";
16+
}
17+
1118
return {
1219
snippetUrl: "https://snippet.babylonjs.com",
1320
pgRoot: "https://playground.babylonjs.com",
14-
baseUrl: process.env.CDN_BASE_URL || (checkArgs(["--enable-https"], true) ? "https" : "http") + "://localhost:" + (overrideConfig.usesDevHost ? 1338 : 1337),
21+
baseUrl: baseUrl,
1522
root: "https://cdn.babylonjs.com",
1623
assetsUrl: "https://assets.babylonjs.com",
1724
...overrideConfig,

0 commit comments

Comments
 (0)