aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/TestMech.pm
Commit message (Collapse)AuthorAgeLines
* Do not display deleted priorities in inspect form.M Somerville2020-10-02-31/+0
|
* Enable HTML in update alert emails.Dave Arter2020-09-30-0/+18
|
* TestMech->page_errors now handles error markup with leading spacesZarino Zappia2020-09-28-1/+2
| | | | | | | | | The "error" output in our new `.search-help__header` element begins and ends with whitespace. The test really shouldn’t care about whitespace at the start and end of HTML tags, so this commit makes page_errors trim whitespace from the errors it passes to the tests. Also adds `.search-help__header` as a location to find page errors!
* A basic web manifest starter.Matthew Somerville2020-02-14-1/+1
| | | | | Reads information from a theme object if present, and icons from a theme directory, with fallbacks.
* [SortMySign] Tweaks needed for tests.Matthew Somerville2020-01-21-1/+1
|
* [TfL] Store password in separate location.Matthew Somerville2019-12-09-7/+3
|
* Test warnfix on confirmed comments lacking time.Matthew Somerville2019-10-14-0/+1
|
* Per-test file email addresses.Matthew Somerville2019-10-03-2/+25
|
* [Zurich] Set envelope for external body emails.Matthew Somerville2019-09-30-0/+11
|
* Switch all Norwegian tests to Swedish.Dave Arter2019-05-28-1/+1
| | | | | | | | | | On Macs, the Norwegian locale is no_NO, whereas on Debian it is nb_NO: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=206474 This can cause issues running the Norwegian tests on Macs with certain setups (e.g. on my machine a Homebrew installation of perl and gettext fails, but MacPorts and system pass). As Swedish is sv_SE in both, the easiest solution is to switch the tests to Swedish.
* Update a number of packages.Matthew Somerville2019-05-13-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update: * Catalyst * Specify Catalyst::DispatchType::Regex explicitly * Remove Catalyst::Plugin::Unicode::Encoding * Catalyst::Plugin::SmartURI * Specify URI::SmartURI explicitly * Catalyst::Plugin::Static::Simple * CGI * Class::Load * DateTime * DateTime::TimeZone * DBD::Pg * DBIx::Class * DBIx::Class::EncodedColumn. * Email::Address. * Email::MIME * ExtUtils::MakeMaker * ExtUtils::ParseXS (for Params::Classify upgrade) * File::ChangeNotify * Image::Size * IO::Socket::SSL * local::lib * Moo * Moose (and some related others due to deprecations) * namespace::autoclean * Net::Server * Net::SSLeay * Number::Phone * Plack * Starman * Template * Test::PostgreSQL * Test::WWW::Mechanize::Catalyst * Text::CSV * YAML carton install was run on a wheezy box, the oldest that is supported, to make sure the required minimal vesions of core modules weren't removed from the snapshot. Cpanel::JSON::XS, Devel::GlobalDestruction::XS, and MooseX::NonMoose were then put back in the snapshot, in case another system needs them (e.g. system Perl on Mac looks for MooseX::NonMoose).
* Factor out test CSV content function.Matthew Somerville2019-02-25-0/+11
|
* Modernise report "status" bannerZarino Zappia2018-12-13-3/+3
| | | | | | | | | | | | | * 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.
* Remove “Keep me signed in” box.Matthew Somerville2018-12-04-25/+0
|
* Allow moderation to potentially change photos.Matthew Somerville2018-10-22-10/+1
|
* [UK] Fix issue when body ID not equal to MapIt ID.Matthew Somerville2018-06-28-0/+7
| | | | | | | | | | | Hitherto when creating a body or ward alert on a UK site, the MapIt area ID has been stored instead of the body ID. This is okay for www.fixmystreet.com which for historical reasons does have body IDs that match MapIt area IDs, but other UK-based sites may well not. The alert lookup looks for body ID, meaning those alerts will not work. Save the body ID instead, plus fix some tests that were making the same assumption.
* Prefill first question from questionnaire email.Matthew Somerville2018-02-16-2/+2
|
* Only allow one auto-response template per category/state.Dave Arter2017-12-04-0/+8
|
* Add ability to confirm reports/updates via text.Matthew Somerville2017-09-30-15/+17
|
* Add ability to log in on /auth via text.Matthew Somerville2017-09-30-1/+1
| | | | A confirmation code is sent via Twilio to be entered on the site.
* Add 'verified' database columns for email/phone.Matthew Somerville2017-09-30-2/+1
| | | | | These are so we can state whether a user's email address or phone number have been verified by confirmation email/text.
* area stats page for staff usersStruan Donald2017-09-20-0/+14
| | | | | | | | | Admin page to show some simple summary stats for an area. If the user has been assigned to an area then they will see the stats for that area. Superusers can pick which area they want to view. For mysociety/fixmystreetforcouncils#2
* Allow extra params in TestMech::create_body_okDave Arter2017-07-26-3/+4
|
* Merge branch 'issues/forcouncils/192-unused-categories'Matthew Somerville2017-07-14-2/+1
|\
| * Add inactive state to categories.Matthew Somerville2017-07-14-2/+1
| | | | | | | | | | A new 'state' column replaces confirmed and deleted, allowing categories to be unconfirmed, confirmed, deleted or inactive.
* | New version of /reports main page.Matthew Somerville2017-07-14-25/+0
|/ | | | | | | | | | | This is a much broader summary page, plus a body name autocomplete. This was originally implemented for fixmystreet.com in 8a6a4ccb7. It also adds '(no longer exists)' in the autocomplete next to bodies not covering any areas. You can supply the `--table` argument to `update-all-reports` to generate the old-style data.
* Run each test file in a transaction.Matthew Somerville2017-06-20-8/+1
| | | | This means that the tests can be run in parallel.
* [UK] Remove requirement for fixed body IDs.Matthew Somerville2017-06-20-7/+2
| | | | | | | | | | | | Historically in UK cobrands, bodies have had IDs the same as the MapIt area ID they cover. This can be confusing (if you are setting up a dev environment, say) and should not be necessary. This commit removes the requirement entirely, by switching any ID checks to either the name of the body, or the actual area it covers. One note: the body name in the test has to match so that we do not get two bodies both covering 2237 created. This will not be necessary when the tests are compartmentalized in the next commit.
* Auto-add strict/warnings/Test::More with TestMech.Matthew Somerville2017-05-31-2/+10
|
* Merge branch '1639-email-ascender'Matthew Somerville2017-03-28-4/+5
|\
| * Upgrade to using Email::Sender.Matthew Somerville2017-03-28-4/+5
| | | | | | | | | | | | | | | | | | | | Email::Send is long deprecated and uses submodules that no longer work correctly (e.g. Net::SMTP::TLS breaks with recent IO::Socket::SSL). We create an Email::Sender subclass to perform the same functionality and this also simplifies the email code with simpler envelope handling. Bundle Email::Sender::Transport::SMTP to include fix from https://github.com/rjbs/Email-Sender/issues/46
* | Merge branch 'offline-tests'Matthew Somerville2017-03-28-0/+1
|\ \
| * | Always include MapIt mock handler in all tests.Matthew Somerville2017-03-23-0/+1
| |/
* / Add customisable defect types.Dave Arter2017-03-23-0/+9
|/ | | | | | | | | Problems can have an associated defect type, that can be assigned during an inspection. Include an admin interface for managing these types, that can also be assigned on a per-category basis, currently available to the Oxfordshire cobrand. (Also include 'TM' in traffic management Exor RDI output.)
* Factor out contains_or_lacks test function.Matthew Somerville2016-09-29-0/+10
|
* Refactor problem response priority into its own modelDave Arter2016-09-09-0/+2
| | | | | | | This moves the response priority values from a cobrand-specific method to a full DB model, and includes management screens in the admin for administering them. For mysociety/fixmystreetforcouncils#66
* Extend response templates to work across all cobrandsDave Arter2016-09-08-1/+10
| | | | | | | | | | | This builds on the response templates in the Zürich cobrand: - Allow response templates to be assigned to categories - Also adds a auto_response flag, which will be used to automatically create updates when reports are made. - Include response templates select box on update form For mysociety/fixmystreetforcouncils#31
* Add user planned reports.Matthew Somerville2016-08-22-0/+1
| | | | | | A user with the appropriate permission can add/remove reports from their list of planned reports using a button on a report page. The list can be viewed at /my/planned.
* Feature to create report as body/other user.Zarino Zappia2016-08-10-0/+1
| | | | | | | | | | | | This allows users who have the correct permissions to add reports on behalf of the body or another user. We enable editing of the email box by default, so that if JavaScript isn't available, someone can still change the email for the 'another user' option. For mysociety/fixmystreetforcouncils#10 and mysociety/fixmystreetforcouncils#11
* Add HTML email templates.Matthew Somerville2016-08-01-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | Design is all Zarino. This adds the ability to send HTML emails, including attached inline images. When included, this is done as a multipart/related email containing a multipart/alternative (of plain and HTML) and any attached images, so that the images are available even if HTML mail is not. The alert emails list data has been improved so it can be constructed in the templates rather than the code. Various templates have been tidied. Various workarounds for email clients have been made, including: * <th> is used so that the Android 4.x mail client can give them `block` styling in the small screen media query. * Font settings defined on every table cell (<th>) so that sans-serif fonts are used in Outlook, rather than Times New Roman. * A three-column wrapper table to create a 620px centred content area that also shrinks down on narrow screens. (Outlook doesn’t like max-width, so this is the simplest alternative.) * Enforcing a sensible (500px) min-width for the main content area, on clients that don’t support media queries (eg: native Gmail app). * Giant borders on buttons so Outlook displays them * Image alignment with align rather than float.
* Use improved TestMech::create_user_ok instead of User::find_or_createDave Arter2016-07-19-4/+3
| | | | | This improves create_user_ok to work more like create_body_ok where extra params can be passed in and set on the model.
* Switch list item heading from h4 to h3.Matthew Somerville2016-03-30-1/+1
| | | | This stops the front page header nesting skipping a level.
* Updates to cpanfile and code for perl 5.20/5.22.Matthew Somerville2016-03-23-2/+2
| | | | | | | | | | | | | | | | | | | | The following modules had bugs that have been fixed for working in recent perls: * List::MoreUtils * Guard * PadWalker * aliased * URI * Convert::NLS_DATE_FORMAT The CGI module was removed from core in 5.20, so include it in the snapshot (I don't think it's actually used, but is a dependency). "{" needs to be escaped in regular expressions, and ~~ should not be used. Fix some tests that expect e.g. a certain hash ordering, to use sorted output or better comparisons.
* Switch to JSON::MaybeXS, remove JSON::XS.Matthew Somerville2016-01-22-1/+1
| | | | | | Travis has Cpanel::JSON::XS preinstalled, which means that the build would fail there, as JSON::MaybeXS would try and upgrade JSON::XS to version 3 which the snapshot did not contain.
* Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-8/+8
| | | | Command line scripts don't need a full blown app, just database.
* Improve item list CSS.Matthew Somerville2015-10-09-2/+2
| | | | | | | | | | | | Generally, a rewrite of issue-list-a to item-list--reports or item-list--wards (two different uses) and issue-list to item-list--updates, with subsequent renames/changes to children. For those cobrands using a different list showing a pin icon, use item-list__item--with-pin to stop needing to override existing classes. Fix a variety of niggling issues e.e ward list display, or overloading of the .text class.
* Add "time spent" admin logging.Hakim Cassimally2015-10-06-0/+1
| | | | | | | | | | | | | | | | | | | | | Mechanism is general, but current implementation only used for Zurich. - Zurich: Record time_spent field mysociety/FixMyStreet-Commercial#676 - template changes (including jQuery spinner) - backend changes to save data are made: - in log_edit, if supplied - and time on category change (and arbitrary actions) - Add update_admin_log to all paths for DM, ensuring that it gets called, while resetting the `time_spent` parameter, to make sure that there is never a duplicate record created. - Also quell warning about using DateTime values in query. - Also add (seemingly unrelated) parens to stop misparsing of OK line in questionnaire test now that DT::Format::Pg is used in Zurich cobrand See mysociety/FixMyStreet-Commercial#676
* Allow attachment of emails in email_sendHakim Cassimally2015-10-06-0/+18
| | | | Required by Zurich for mysociety/FixMyStreet-Commercial#675
* Add support for multiple photos per report.Hakim Cassimally2015-10-06-1/+10
| | | | | | | | For Zurich, see mysociety/FixMyStreet-Commercial#664. This commit includes a new PhotoSet class (NB: called Model:: though not really a model), should handle binary data (e.g. old style photos in database), fileids (40-char hash), and Catalyst::Upload objects.
* Simpler report meta information displayZarino Zappia2015-06-29-0/+1
| | | | | Removes the italics, and breaks the wording into two separate paragraphs, at the top of the report page.