diff options
-rw-r--r-- | .cypress/cypress/integration/regressions.js | 9 | ||||
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rwxr-xr-x | bin/fixmystreet.com/fixture | 1 | ||||
-rwxr-xr-x | templates/web/base/around/_updates.html | 2 | ||||
-rw-r--r-- | templates/web/base/report/display_tools.html | 2 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 10 |
6 files changed, 18 insertions, 7 deletions
diff --git a/.cypress/cypress/integration/regressions.js b/.cypress/cypress/integration/regressions.js new file mode 100644 index 000000000..a0d5b3fc9 --- /dev/null +++ b/.cypress/cypress/integration/regressions.js @@ -0,0 +1,9 @@ +describe('Regression tests', function() { + it('Shows the sub-map links after clicking Try again', function() { + cy.viewport(480, 800); + cy.visit('/around?pc=BS10+5EE&js=1'); + cy.get('#map_box').click(200, 200); + cy.get('#try_again').click(); + cy.get('#sub_map_links').should('be.visible'); + }); +}); diff --git a/CHANGELOG.md b/CHANGELOG.md index a0e8bb1d6..efcdca382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Fix text layout issues in /reports/…/summary dashboard charts. - Fix post-edit issues on admin report edit page. - Truncate dates in Open311 output to the second. #2023 + - Fix check for visible sub map links after 'Try again'. - Admin improvements: - Inspectors can set non_public status of reports. #1992 - Default start date is shown on the dashboard. diff --git a/bin/fixmystreet.com/fixture b/bin/fixmystreet.com/fixture index 1aa85564f..091fcab9d 100755 --- a/bin/fixmystreet.com/fixture +++ b/bin/fixmystreet.com/fixture @@ -16,6 +16,7 @@ BEGIN { } use List::Util qw(shuffle); +use Path::Tiny; use FixMyStreet; use FixMyStreet::Cobrand; use FixMyStreet::DB::Factories; diff --git a/templates/web/base/around/_updates.html b/templates/web/base/around/_updates.html index 6121b218b..e5af69da0 100755 --- a/templates/web/base/around/_updates.html +++ b/templates/web/base/around/_updates.html @@ -1,5 +1,5 @@ <div class="shadow-wrap"> <ul id="key-tools"> - <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">[% loc("Get updates") %]</a></li> + <li><a class="feed js-feed" id="key-tool-around-updates" href="[% email_url | html %]">[% loc("Get updates") %]</a></li> </ul> </div> diff --git a/templates/web/base/report/display_tools.html b/templates/web/base/report/display_tools.html index bb76cc388..8ed86c228 100644 --- a/templates/web/base/report/display_tools.html +++ b/templates/web/base/report/display_tools.html @@ -11,7 +11,7 @@ %]</a></li> [% END %] [% IF c.cobrand.moniker != 'zurich' %] - <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li> + <li><a rel="nofollow" id="key-tool-report-updates" class="feed js-feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li> [% END %] [% IF c.cobrand.moniker == 'fixmystreet' %] <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li> diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index d85a5cdbc..c187c218c 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -682,11 +682,11 @@ $.extend(fixmystreet.set_up, { } if ($('.mobile').length) { - $('#map_permalink').hide(); + $('#map_permalink').addClass('hidden'); // Make sure we end up with one Get updates link - if ($('#key-tools a.feed').length) { - $('#sub_map_links a.feed').remove(); - $('#key-tools a.feed').appendTo('#sub_map_links'); + if ($('#key-tools a.js-feed').length) { + $('#sub_map_links a.js-feed').remove(); + $('#key-tools a.js-feed').appendTo('#sub_map_links'); } $('#key-tools li:empty').remove(); $('#report-updates-data').insertAfter($('#map_box')); @@ -696,7 +696,7 @@ $.extend(fixmystreet.set_up, { } // Show/hide depending on whether it has any children to show - if ($('#sub_map_links a:visible').length) { + if ($('#sub_map_links a').not('.hidden').length) { $('#sub_map_links').show(); } else { $('#sub_map_links').hide(); |