diff --git a/assets/stylesheets/common/custom/header.scss b/assets/stylesheets/common/custom/header.scss index 411d937c..6f49024d 100644 --- a/assets/stylesheets/common/custom/header.scss +++ b/assets/stylesheets/common/custom/header.scss @@ -1,7 +1,9 @@ -body.custom-wizard .d-header, -.global-notice, -.create-topics-notice, -.top-notices-outlet, -.consent_banner { - display: none; +body.custom-wizard { + .d-header, + .global-notice, + .create-topics-notice, + .top-notices-outlet, + .consent_banner { + display: none; + } } diff --git a/test/javascripts/acceptance/wizard-test.js b/test/javascripts/acceptance/wizard-test.js index d91edae5..063c80fb 100644 --- a/test/javascripts/acceptance/wizard-test.js +++ b/test/javascripts/acceptance/wizard-test.js @@ -66,6 +66,11 @@ acceptance("Wizard | Wizard", function (needs) { assert.ok(query(".wizard-column"), true); }); + test("Applies the wizard body class", async function (assert) { + await visit("/w/wizard"); + assert.ok($("body.custom-wizard").length); + }); + test("Applies the body background color", async function (assert) { await visit("/w/wizard"); assert.ok($("body")[0].style.background); @@ -95,4 +100,9 @@ acceptance("Wizard | Wizard", function (needs) { assert.ok(exists(".wizard-step-footer .wizard-progress"), true); assert.ok(exists(".wizard-step-footer .wizard-buttons"), true); }); + + test("Removes the wizard body class when navigating away", async function (assert) { + await visit("/"); + assert.strictEqual($("body.custom-wizard").length, 0); + }); });