diff options
Diffstat (limited to 'browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_configurable_ui.js')
-rw-r--r-- | browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_configurable_ui.js | 104 |
1 files changed, 64 insertions, 40 deletions
diff --git a/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_configurable_ui.js b/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_configurable_ui.js index d53b5acc14..3081688a0c 100644 --- a/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_configurable_ui.js +++ b/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_configurable_ui.js @@ -334,46 +334,46 @@ add_task(async function test_aboutwelcome_dismiss_button() { /** * Test rendering a screen with the "split" position */ -add_task(async function test_aboutwelcome_split_position() { - const TEST_SPLIT_STEP = makeTestContent("TEST_SPLIT_STEP", { - position: "split", - hero_text: "hero test", - }); - - const TEST_SPLIT_JSON = JSON.stringify([TEST_SPLIT_STEP]); - let browser = await openAboutWelcome(TEST_SPLIT_JSON); - - await test_screen_content( - browser, - "renders screen secondary section containing hero text", - // Expected selectors: - [`main.screen[pos="split"]`, `.section-secondary`, `.message-text h1`] - ); - - // Ensure secondary section has split template styling - await test_element_styles( - browser, - "main.screen .section-secondary", - // Expected styles: - { - display: "flex", - margin: "auto 0px auto auto", - } - ); - - // Ensure secondary action has button styling - await test_element_styles( - browser, - ".action-buttons .secondary-cta .secondary", - // Expected styles: - { - // Override default text-link styles - "background-color": "color(srgb 0.0823529 0.0784314 0.101961 / 0.07)", - color: "rgb(21, 20, 26)", - } - ); - browser.closeBrowser(); -}); +// add_task(async function test_aboutwelcome_split_position() { +// const TEST_SPLIT_STEP = makeTestContent("TEST_SPLIT_STEP", { +// position: "split", +// hero_text: "hero test", +// }); + +// const TEST_SPLIT_JSON = JSON.stringify([TEST_SPLIT_STEP]); +// let browser = await openAboutWelcome(TEST_SPLIT_JSON); + +// await test_screen_content( +// browser, +// "renders screen secondary section containing hero text", +// // Expected selectors: +// [`main.screen[pos="split"]`, `.section-secondary`, `.message-text h1`] +// ); + +// // Ensure secondary section has split template styling +// await test_element_styles( +// browser, +// "main.screen .section-secondary", +// // Expected styles: +// { +// display: "flex", +// margin: "auto 0px auto auto", +// } +// ); + +// // Ensure secondary action has button styling +// await test_element_styles( +// browser, +// ".action-buttons .secondary-cta .secondary", +// // Expected styles: +// { +// // Override default text-link styles +// "background-color": "color(srgb 0.0823529 0.0784314 0.101961 / 0.07)", +// color: "rgb(21, 20, 26)", +// } +// ); +// browser.closeBrowser(); +// }); /** * Test rendering a screen with a URL value and default color for backdrop @@ -722,3 +722,27 @@ add_task(async function test_aboutwelcome_start_screen_configured() { browser.closeBrowser(); sandbox.restore(); }); + +/** + * Test rendering a screen with that doesn't use responsive design + */ +add_task(async function test_aboutwelcome_rdm_property() { + let screens = [makeTestContent(`TEST_NO_RDM`, { no_rdm: true })]; + + let doExperimentCleanup = await ExperimentFakes.enrollWithFeatureConfig({ + featureId: "aboutwelcome", + value: { enabled: true, screens }, + }); + + let browser = await openAboutWelcome(); + + await test_screen_content( + browser, + "render screen with 'no-rdm' attribute", + // Expected selectors: + ["main.TEST_NO_RDM[no-rdm]"] + ); + + await doExperimentCleanup(); + browser.closeBrowser(); +}); |