aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/TestMech.pm
Commit message (Collapse)AuthorAgeLines
* 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.
* Factor out test contact creation to function.Matthew Somerville2015-03-13-11/+24
|
* By default, use area-based alerts.Matthew Somerville2014-12-12-8/+25
| | | | | | | | | The body-based alert only works if the body ID matches the MapIt ID. This fixes #959. Further work needs to be done to enable proper body-based alerts that work properly in all circumstances. Consequently, factor out fixed body IDs from many tests. Also fix a couple of tests not overriding geocoder correctly.
* [fixmystreet.com] Remove login content experiment.Matthew Somerville2014-10-17-4/+0
| | | | This gave no conclusive results, which was interesting.
* Add fixmystreet.com reporting form A/B tests.Matthew Somerville2014-07-10-1/+8
| | | | | | Testing two things: * Putting the email box above the Yes/No, or repeating it inside. * Showing the contents of the Yes/No sections at first, or not.
* Fix a bug in TestMech->log_in_ok that scrambeled the users password.Edmund von der Burg2013-09-10-4/+16
|
* Use mech->content, as mech->response->content is pre-gunzipping.Matthew Somerville2013-03-19-1/+1
|
* Allow bodies to span multiple area IDs, and areas can be covered by more ↵Matthew Somerville2012-12-19-1/+8
| | | | than one body.
* Update tests for new names of things and bodies needing to exist.Matthew Somerville2012-12-15-0/+11
|
* Rename council column to bodies_str, and all the related code.Matthew Somerville2012-12-15-8/+8
|
* disabled fields confuse things so ignore themStruan Donald2012-10-26-0/+1
|
* Presumably test meant to only use default if params not specified (and stop ↵Matthew Somerville2012-09-07-4/+3
| | | | void warning).
* tests for non public reports on around pageStruan Donald2012-09-03-9/+17
|
* move add and delete problem utility functions to test mechStruan Donald2012-09-03-0/+56
| | | | add in non public problem tests for front page
* do not display non public reports in reports list for a councilStruan Donald2012-09-03-0/+43
| | | | do include non public reports in council stats
* Have a whole fake mapit (for #182) that works if MAPIT_URL is set accordingly.Matthew Somerville2012-07-13-22/+4
| | | | | | | | | Setting MAPIT_URL to .../fakemapit/ will then return one area, ID 161 and type ZZZ, whatever co-ordinate it is given. This means the default area type is now ZZZ, the UK specific types are moved into the UK cobrands, and the tests updated accordingly to still function (they assume UK-ness a lot, so probably need an ALLOWED_COBRANDS entry of "fixmystreet: 'localhost'" and for your host's domain to show fixmystreet too).
* make banner tests a bit more tolerantStruan Donald2012-05-16-0/+1
|
* test uses the name-changed alerts_sentDave Whiteland2012-05-02-1/+1
|
* Get test suite all passing again, and fix bug displaying partial photo and ↵Matthew Somerville2012-03-02-0/+2
| | | | my stupid use of c as a variable.
* Fix tests, and remove unwanted height.Matthew Somerville2011-09-08-1/+1
|
* Sign in over login; tidy CSS.Matthew Somerville2011-06-24-3/+3
|
* Allow people to give name/pw on auth page.Matthew Somerville2011-06-24-1/+1
|
* Use bcrypt.Matthew Somerville2011-06-24-4/+3
|
* Migrate alert sending script, add test for it, fix some small bugs and strings.Matthew Somerville2011-06-04-1/+4
|
* Delete questionnaires when deleting a user's problems, and fetch all errors ↵Matthew Somerville2011-05-27-1/+2
| | | | separately from a ul.error, not munged together.
* Create some _local functions to return the right DateTimes.Matthew Somerville2011-05-24-1/+3
|
* optional form name argumentStruan Donald2011-05-23-8/+21
|
* port json.cgi code to CatalystEdmund von der Burg2011-05-20-4/+21
|
* Added tests for bad requestsEdmund von der Burg2011-05-20-8/+29
|
* delete things in an order such that we don't break referential integrityStruan Donald2011-05-19-4/+7
|
* delete comments when deleting a userStruan Donald2011-05-18-0/+2
|
* extract_update_metas methodStruan Donald2011-05-17-0/+22
|
* method to extract problem bannerStruan Donald2011-05-16-1/+21
|
* method to extract problem titleStruan Donald2011-05-16-0/+19
|
* add method to extract meta information from problem report pageStruan Donald2011-05-16-0/+20
|