diff --git a/src/server/wtr-config.js b/src/server/wtr-config.js index 7f49ec0e..6b02805f 100644 --- a/src/server/wtr-config.js +++ b/src/server/wtr-config.js @@ -66,7 +66,7 @@ const HTML_BODY = testFramework => ` `; -const HTML_HEAD = ` +const HTML_HEAD = (expandBody = false) => ` @@ -123,6 +123,7 @@ const HTML_HEAD = ` line-height: 1.4rem; margin: 0; padding: 38px; + ${expandBody ? 'height: 100vh;box-sizing: border-box;' : ''} } body.no-padding { padding: 0; @@ -134,11 +135,13 @@ const DEFAULT_TEST_RUNNER_HTML = testFramework => ` ${HTML_BODY(testFramework)} `; -const FULL_TEST_RUNNER_HTML = testFramework => ` - - ${HTML_HEAD} - ${HTML_BODY(testFramework)} -`; +const FULL_TEST_RUNNER_HTML = (expandBody = false) => { + return testFramework => ` + + ${HTML_HEAD(expandBody)} + ${HTML_BODY(testFramework)} + `; +}; export class WTRConfig { @@ -153,7 +156,7 @@ export class WTRConfig { name: 'vdiff', files: this.#pattern, browsers: [BROWSER_MAP.chrome], - testRunnerHtml: FULL_TEST_RUNNER_HTML + testRunnerHtml: FULL_TEST_RUNNER_HTML() }; } create({ @@ -180,7 +183,7 @@ export class WTRConfig { if (!['test', 'vdiff', ...passthroughGroupNames].includes(group)) { const groupConfig = { name: group, files: this.#pattern }; - if (group === 'axe') groupConfig.testRunnerHtml = FULL_TEST_RUNNER_HTML; + if (group === 'axe') groupConfig.testRunnerHtml = FULL_TEST_RUNNER_HTML(true); config.groups.push(groupConfig); } else { const groupConfig = config.groups.find(g => g.name === group);