aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model
Commit message (Collapse)AuthorAgeLines
* Set up translatable category columns.Matthew Somerville2017-08-10-9/+0
| | | | | | As category is used both for display and as a link between Problem and Contact tables, add `category_display` for use whenever a category is displayed.
* Move FixMyStreet::DB to FixMyStreet::DB::Schema.Matthew Somerville2017-08-09-2/+2
| | | | Store a schema object on FixMyStreet::DB instead.
* Add inactive state to categories.Matthew Somerville2017-07-14-3/+2
| | | | | A new 'state' column replaces confirmed and deleted, allowing categories to be unconfirmed, confirmed, deleted or inactive.
* Return Response Priorities as JSON.pezholio2017-06-20-0/+103
| | | | | This now lets the response priority and defect type handling share the same code.
* Populate defect types dropdown on category changepezholio2017-06-20-3/+67
|
* Run each test file in a transaction.Matthew Somerville2017-06-20-58/+9
| | | | This means that the tests can be run in parallel.
* [UK] Remove requirement for fixed body IDs.Matthew Somerville2017-06-20-3/+3
| | | | | | | | | | | | 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-29/+0
|
* Fix test that would not run offline.Matthew Somerville2017-05-25-3/+0
| | | | | Switch it to use our mock MapIt. Also remove other unused overrides to external services.
* Move alert signup logic out of controllerpezholio2017-05-05-0/+29
|
* Merge branch 'offline-tests'Matthew Somerville2017-03-28-5/+5
|\
| * Make sure all MapIt tests can run offline.Matthew Somerville2017-03-23-5/+5
| |
* | Add customisable defect types.Dave Arter2017-03-23-0/+67
|/ | | | | | | | | 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.)
* Use sender in From if From and To domains match.Matthew Somerville2017-03-14-5/+13
| | | | | | To deal with a recipient mail server not allowing inbound email using the same domain as an internal domain, e.g. https://community.mimecast.com/docs/DOC-1419
* Add is_in_progress Problem helper.Matthew Somerville2017-03-10-0/+16
|
* [Oxfordshire] Use 'days ago' format on problem listspezholio2017-02-27-1/+14
| | | | Fixes mysociety/fixmystreetforcouncils#98
* Add Problem->tokenised_url for logging user inpezholio2017-02-15-2/+29
| | | | | | This method creates a token that logs the reporting user in, optionally with some parameters which are stored with the token for use when redirecting after login.
* Add Problem->time_ago for pretty-printed durationpezholio2017-02-15-0/+44
|
* If a problem has duplicates, display them on its detail pageDave Arter2016-12-13-0/+11
|
* Fix list of response templates for a problem.Matthew Somerville2016-10-20-0/+14
| | | | | Instead of returning all templates for the problem's body, return those for the problem's category (or with no category).
* Adding report to shortlist removes from others.Matthew Somerville2016-10-11-0/+14
|
* Fix bug in fetching existing shortlisted report.Matthew Somerville2016-10-11-0/+4
| | | | | It would always create a new report rather than return an existing one, if present.
* Improve display of category extra data in admin.Matthew Somerville2016-09-09-4/+4
| | | | Allow get_extra_metadata to return all the data with no argument.
* Add user planned reports.Matthew Somerville2016-08-22-0/+34
| | | | | | 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.
* Shrink test sample photo.Matthew Somerville2016-08-16-1/+1
|
* Add HTML email templates.Matthew Somerville2016-08-01-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch '1347-fold-back-zurich'Matthew Somerville2016-06-29-6/+6
|\
| * Tidy up some UK specific easting/northing handlingMatthew Somerville2016-06-22-6/+6
| |
* | Use valid orientation flag for test imageDave Arter2016-06-27-1/+1
|/ | | | | | jhead 3.00 considers 0 an invalid value for EXIF orientation and will replace it with 1 when run with the -autorot flag. This was causing a test failure as the SHA hash of the sample image was being changed.
* Update tests for cobrand/template changes.Matthew Somerville2016-04-20-1/+1
|
* Add PNG image support.Matthew Somerville2016-04-08-1/+1
| | | | | | | Store image type along with hash in photo column, and use that when outputting images / generating URLs. Make sure all public photo URL generation goes through appropriate functions, and change temp URLs so the filename can be output directly from the list.
* Refactor email handling to use Email::MIME alone.Matthew Somerville2016-03-30-1/+1
|
* Remember user's last anonymous state.Matthew Somerville2016-03-04-0/+61
| | | | | If a user is logged in, use their last report/update to set the default anonymity state.
* Remove unnecessary shebang lines.Matthew Somerville2016-01-22-8/+0
|
* Remove risk of infinite loop in PhotoSet.Matthew Somerville2015-12-16-2/+2
| | | | | | Use a separate attribute for data direct from a database row when creating a PhotoSet, so that data will always contain one or more photo IDs.
* Remove many uses of mySociety::Config.Matthew Somerville2015-12-02-3/+3
|
* Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-66/+69
| | | | Command line scripts don't need a full blown app, just database.
* Add support for multiple photos per report.Hakim Cassimally2015-10-06-0/+76
| | | | | | | | 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.
* Move "missing" handling to separate column.Matthew Somerville2015-08-19-1/+3
|
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-76/+20
| | | | | This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
* Move Latin-char-specific name check to cobrand.Matthew Somerville2015-07-31-24/+0
| | | | | Also move some UK-specific code in the same function. The specific code is still tested in report_new.t.
* Alter token logging in and timeout behaviour.Matthew Somerville2015-07-10-1/+1
| | | | | | | Restrict email_sign_in token to one day, unused confirmation tokens to one month. Used tokens will redirect to the created thing but not log in; don't log in with alert links (unsubscribe link never expires, reply link will still show "reopen" tickbox).
* Add hidden_states and updating functions.Hakim Cassimally2015-06-16-0/+17
| | | | To allow visible/hidden states to be manipulated at runtime.
* Add Extra role to ease use of {extra} field.Hakim Cassimally2015-03-20-0/+111
| | | | | | | | | Historically, the extra field has been used in two different ways by different cobrands, both as a list (e.g. Open311 category fields) and a hash (e.g. the Zurich cobrand). This commit consolidates usage, adding an API to make use of the field easier and always returning a hash for the code to use. Fixes #1018.
* [fixmystreet.com] Remove special NI code.Matthew Somerville2015-03-16-7/+12
| | | | | This is now handled by normal bodies in the admin. In order to remove references in send_reports, tidy up (unused) EmptyHomes code a bit.
* Factor out test contact creation to function.Matthew Somerville2015-03-13-20/+7
|
* [UK] Output NI grid references to NI councils.Matthew Somerville2015-02-20-2/+10
|
* Use same handling for cron and non-cron email.Matthew Somerville2015-01-13-1/+1
| | | | | This means that e.g. SMTP authentication is used when set up by all emails, not just non-cron ones. Fixes #988.
* By default, use area-based alerts.Matthew Somerville2014-12-12-30/+32
| | | | | | | | | 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.
* Tests for moderationHakim Cassimally2014-08-14-0/+66
|