diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-09-08 20:59:43 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-09-08 20:59:43 +0100 |
commit | 948c591f80f6d79d8442da309f5173357d116ceb (patch) | |
tree | 80e406ec0a91ffcfc8e9c1cd7a27d96ef1a727d1 | |
parent | 5ed1e811cd31616cb591691a72b80b0bbbb5a002 (diff) |
Fix tests, and remove unwanted height.
-rw-r--r-- | perllib/FixMyStreet/TestMech.pm | 2 | ||||
-rw-r--r-- | t/app/controller/report_display.t | 10 | ||||
-rw-r--r-- | t/app/controller/report_updates.t | 22 | ||||
-rw-r--r-- | web/css/core.scss | 11 |
4 files changed, 22 insertions, 23 deletions
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm index 1391254b6..185b59daa 100644 --- a/perllib/FixMyStreet/TestMech.pm +++ b/perllib/FixMyStreet/TestMech.pm @@ -364,7 +364,7 @@ sub extract_problem_banner { my $mech = shift; my $result = scraper { - process 'div#side > p', id => '@id', text => 'TEXT'; + process 'div#side > p.banner', id => '@id', text => 'TEXT'; } ->scrape( $mech->response ); diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t index a70d5b9e9..c7455a99b 100644 --- a/t/app/controller/report_display.t +++ b/t/app/controller/report_display.t @@ -193,8 +193,8 @@ for my $test ( description => 'new report', date => DateTime->now, state => 'confirmed', - banner_id => '', - banner_text => '', + banner_id => undef, + banner_text => undef, fixed => 0 }, { @@ -293,8 +293,10 @@ for my $test ( $mech->get_ok("/report/$report_id"); is $mech->uri->path, "/report/$report_id", "at /report/$report_id"; my $banner = $mech->extract_problem_banner; - $banner->{text} =~ s/^ //g; - $banner->{text} =~ s/ $//g; + if ( $banner->{text} ) { + $banner->{text} =~ s/^ //g; + $banner->{text} =~ s/ $//g; + } is $banner->{id}, $test->{banner_id}, 'banner id'; is $banner->{text}, $test->{banner_text}, 'banner text'; diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t index 4469d4003..5719b13e3 100644 --- a/t/app/controller/report_updates.t +++ b/t/app/controller/report_updates.t @@ -749,8 +749,8 @@ for my $test ( changed => { update => 'Update from a registered user' }, - initial_banner => '', - endstate_banner => '', + initial_banner => undef, + endstate_banner => undef, alert => 0, anonymous => 0, }, @@ -775,8 +775,8 @@ for my $test ( changed => { update => 'Update from a registered user' }, - initial_banner => '', - endstate_banner => '', + initial_banner => undef, + endstate_banner => undef, alert => 0, anonymous => 1, }, @@ -800,8 +800,8 @@ for my $test ( changed => { update => 'Update from a registered user' }, - initial_banner => '', - endstate_banner => '', + initial_banner => undef, + endstate_banner => undef, alert => 1, anonymous => 0, }, @@ -825,7 +825,7 @@ for my $test ( changed => { update => 'Update from a registered user' }, - initial_banner => '', + initial_banner => undef, endstate_banner => ' This problem has been fixed. ', alert => 1, anonymous => 0, @@ -926,7 +926,7 @@ foreach my $test ( fixed => 1, }, changed => { update => 'Update from owner' }, - initial_banner => '', + initial_banner => undef, initial_state => 'confirmed', alert => 1, # we signed up for alerts before, do not unsign us anonymous => 0, @@ -981,7 +981,7 @@ foreach my $test ( fixed => 1, }, changed => { update => 'Update from owner' }, - initial_banner => '', + initial_banner => undef, initial_state => 'confirmed', alert => 1, # we signed up for alerts before, do not unsign us anonymous => 0, @@ -1098,7 +1098,7 @@ for my $test ( fixed => 1, }, changed => { update => 'Update from owner' }, - initial_banner => '', + initial_banner => undef, alert => 1, # we signed up for alerts before, do not unsign us anonymous => 0, answered => 0, @@ -1119,7 +1119,7 @@ for my $test ( fixed => 1, }, changed => { update => 'Update from owner' }, - initial_banner => '', + initial_banner => undef, alert => 1, # we signed up for alerts before, do not unsign us anonymous => 0, answered => 1, diff --git a/web/css/core.scss b/web/css/core.scss index 21d75d04d..9a4fb5a0d 100644 --- a/web/css/core.scss +++ b/web/css/core.scss @@ -643,7 +643,6 @@ $map_width: 500px; #map_box { padding-left: 10px; width: $map_width + 2px; - height: $map_width + 2px; } #map { width: $map_width; @@ -652,11 +651,10 @@ $map_width: 500px; .banner { margin-right: $map_width + 20px; } - } - .no-js #mysociety { - #text_map { } - #text_map_arrow { } - #side, #side-form { } + #text_map_arrow { + right: -18px; + border-width: 16px 9px; + } } } @@ -665,7 +663,6 @@ $map_width: 500px; #mysociety { #map_box { width: $map_width + 2px; - height: $map_width + 2px; } #map { width: $map_width; |