aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2018-12-10 18:37:05 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-12-13 16:00:36 +0000
commit760629b7d648e1abd4ae855ee0308d1e3151dc24 (patch)
tree76a7136c4ac588d7af9c4d4d7d6ade98531c7fd5 /t
parenta95103e6233d65f230327307904c67aadb871acb (diff)
Modernise report "status" banner
* Simplify markup required for the status banner. * Simplify styles - the banner is now identical on all screen sizes. * Move the banner from `report/display.html` into `report/_main.html` so that it can appear after `.problem-back` in the source order. * Use real pin icon instead of `pin-flat-white-small.png`. * Set a default `$col_fixed_label` colour in `_base.scss`, so cobrands don’t have to define it themselves if they’re happy with green. * Introduce `$col_fixed_label_light`, with a sensible default for all cobrands, even ones that have a custom `$col_fixed_label`. * Remove `$col_fixed_label_dark` – no longer needed.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/report_display.t7
-rw-r--r--t/cobrand/zurich.t7
2 files changed, 12 insertions, 2 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index a20eec005..bde090dd1 100644
--- a/t/app/controller/report_display.t
+++ b/t/app/controller/report_display.t
@@ -374,7 +374,12 @@ for my $test (
$banner->{text} =~ s/ $//g;
}
- is $banner->{id}, $test->{banner_id}, 'banner id';
+ if ( $test->{banner_id} ) {
+ ok $banner->{class} =~ /banner--$test->{banner_id}/i, 'banner class';
+ } else {
+ is $banner->{class}, $test->{banner_id}, 'banner class';
+ }
+
if ($test->{banner_text}) {
ok $banner->{text} =~ /$test->{banner_text}/i, 'banner text';
} else {
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 45888771d..1faa0adf2 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -196,7 +196,12 @@ subtest "Banners are displayed correctly" => sub {
$banner->{text} =~ s/ $//g;
}
- is $banner->{id}, $test->{banner_id}, 'banner id';
+ if ( $test->{banner_id} ) {
+ ok $banner->{class} =~ /banner--$test->{banner_id}/i, 'banner class';
+ } else {
+ is $banner->{class}, $test->{banner_id}, 'banner class';
+ }
+
if ($test->{banner_text}) {
like_string( $banner->{text}, qr/$test->{banner_text}/i, 'banner text is ' . $test->{banner_text} );
} else {