aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2020-01-07 15:10:36 +0000
committerZarino Zappia <mail@zarino.co.uk>2020-01-07 15:10:36 +0000
commitcffacce503f6f34bbf362f1aae7c0218afbdee55 (patch)
treeb139c7d857138b67c9e30e5083fd16f807f26041 /t/cobrand
parenta1a3991dc1a8ff8199ab117f6c665323462a3ba3 (diff)
STAGING_FLAGS option to hide the staging site banner
Allows you to hide the banner introduced in 1f43fc9. Useful when you’re making front-end changes—especially on small screens—and don’t want the banner getting in the way.
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/staging.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/cobrand/staging.t b/t/cobrand/staging.t
new file mode 100644
index 000000000..5d79daa4b
--- /dev/null
+++ b/t/cobrand/staging.t
@@ -0,0 +1,18 @@
+use FixMyStreet::TestMech;
+my $mech = FixMyStreet::TestMech->new;
+
+subtest 'staging banner is visible by default on staging sites' => sub {
+ $mech->get_ok('/');
+ $mech->content_contains('<div class="dev-site-notice">');
+};
+
+FixMyStreet::override_config {
+ STAGING_FLAGS => { hide_staging_banner => 1 },
+}, sub {
+ subtest 'staging banner can be hidden through STAGING_FLAGS config' => sub {
+ $mech->get_ok('/');
+ $mech->content_lacks('<div class="dev-site-notice">');
+ };
+};
+
+done_testing();