Commit Graph

2179 Commits

Author SHA1 Message Date
Chris Hill-Scott
989875294b Make technical failure letters show up on the activity page 2019-01-11 16:55:37 +00:00
Pea Tyczynska
bb1e9d2a0f Add validation-failed status to FAILURE_STATUSES in admin utils 2019-01-10 15:54:31 +00:00
Pea Tyczynska
2dec697dc9 Fix a test after merge conflict mixup 2019-01-10 15:43:38 +00:00
Pea Tyczynska
dcc590ec96 Cancelled notifications do not show as failures on dashboard stats
Also update tests after we no longer show cancelled letters
2019-01-10 15:27:04 +00:00
Katie Smith
1c6a71700d Update error messages for validation-failed precompiled letters 2019-01-09 13:10:36 +00:00
Katie Smith
da50f77538 Show error message if precompiled PDF cannot be opened
If PDF files have a validation error which means that they can't be
opened by PyPDF2 we would previously show the 500 status error page. We
now catch PyPDF2.utils.PdfReadErrors so that we can display a custom
error message on the notification page instead.
2019-01-09 13:10:36 +00:00
Katie Smith
bb7e9726d3 Stop showing validation-failed letters as cancelled in table
Changed the table for displaying all notifications to show letters which
have the status of 'validation-failed' as 'Validation failed' instead of
'Cancelled'.

The individual notification page for a letter which has failed
validation has not been changed since this already has a description
(letter has content outside the printable area).
2019-01-09 13:10:36 +00:00
Chris Hill-Scott
8b39bc14d1 Merge pull request #2643 from alphagov/dont-count-pages-api-message-log
Don't request pagination links for API Message log page
2019-01-09 12:27:35 +00:00
Chris Hill-Scott
a34e1ea1f0 Merge pull request #2638 from alphagov/copy-template-from-folders
Allow users to navigate folders when copying
2019-01-09 12:26:29 +00:00
Chris Hill-Scott
30886c3cdb Merge pull request #2626 from alphagov/empty-service-state-folders
Use grey buttons to add templates when service is new
2019-01-09 10:26:43 +00:00
Alexey Bezhan
6cd18f87de Don't request pagination links for API Message log page
Counting pages for API notifications takes a long time for services
with a lot of sent messages (since it issues a `count(*)` query for
the given filter). Since API message log doesn't have a "Next page"
link we can skip the count by setting a flag on the API request.
2019-01-08 15:35:44 +00:00
Chris Hill-Scott
a093b8d976 Use Babergh as the example in tests
Because Aberdeenshire have signed the agreement.
2019-01-08 15:12:52 +00:00
Chris Hill-Scott
206a7806d4 Allow users to navigate folders when copying
We already have a pattern for navigation folders and searching for
templates – let’s use it for the copy page too. And I reckon we can
represent services as folders if the user has multiple services they
could copy a template from.
2019-01-08 12:21:32 +00:00
Pea (Malgorzata Tyczynska)
0b22fff751 Merge pull request #2639 from alphagov/quick_fix_letter_status
Format letter statuses so they make more sense to our users
2019-01-08 11:06:35 +00:00
Pea Tyczynska
b8318c491b Format letter statuses so they make more sense to our users 2019-01-07 15:17:09 +00:00
Tom Byers
1685e492ca Merge pull request #2630 from alphagov/nest-destination-folders
Nest destination folders
2019-01-07 10:31:41 +00:00
Tom Byers
bdc4a1056d Add a test to ensure move_to has no default folder
As requested in:

https://github.com/alphagov/notifications-admin/pull/2630#pullrequestreview-189414780
2019-01-04 17:21:54 +00:00
Chris Hill-Scott
d907fc9ce6 Update tests/app/main/views/test_template_folders.py
Remove quotes around variable. Were added by mistake.

Co-Authored-By: tombye <tombaromba@gmail.com>
2019-01-04 15:40:34 +00:00
Chris Hill-Scott
39506c4794 Rename ‘All templates’ 2019-01-04 15:15:58 +00:00
Chris Hill-Scott
c1b61a3658 Merge pull request #2617 from alphagov/pytest4
Pytest 4: don't call pytest.mark directly
2019-01-04 11:48:16 +00:00
Chris Hill-Scott
0c1a797a82 Keep param on multiple lines
so it scans the same as preceeding test cases

Co-Authored-By: leohemsted <leohemsted@gmail.com>
2019-01-04 11:34:26 +00:00
Katie Smith
3cf36c592f Change move folder form to not have default radio btn and to show hint
Updated the move folder form to add a hint for the radio button for the
current folder saying 'current folder'. This hint does not get shown if
you are viewing all folders (so you are not inside a folder).

Also stopped a default radio button from being selected on the form.
2019-01-03 16:51:47 +00:00
Tom Byers
3c4a186a25 Display the template folders nested on the move template/folder form
Before, all the folders were displayed in a list which was ordered but
not nested. This changes the move form to nest the template folders.
2019-01-03 16:51:47 +00:00
Chris Hill-Scott
3a2cfda8b2 Don’t show postage to users who can’t choose it
If you can’t choose postage on a per-template basis, you shouldn’t be
see the thing that indicates that postage can be changed.
2019-01-03 16:04:16 +00:00
Chris Hill-Scott
aaf3322662 Use folder buttons in empty state
It’s confusing to have one way of adding things when your service is new
(green button) but a different way once you’ve added your first thing
(the new grey buttons).

For services that have a `edit_folders` permission, this commit
standardises on the grey buttons for a consistent experience.
2019-01-03 11:14:22 +00:00
Pea (Malgorzata Tyczynska)
5d99b2d2f6 Merge pull request #2616 from alphagov/choose_postage
Choose and display postage on template
2019-01-02 15:39:15 +00:00
Chris Hill-Scott
893163ff84 Reflect normalisation of whitespace in attributes
BeautifulSoup version 4.7.0 changes how it handles whitespace in
attribute values. See more detail here:
https://bugs.launchpad.net/beautifulsoup/+bug/1787453
2019-01-02 11:57:11 +00:00
Leo Hemsted
5961f470a4 don't apply marks directly in pytest
specifically - don't use `pytest.mark.xfail` directly in parametrize,
instead use `pytest.param(*args, marks=pytest.mark.xfail)`. the old way
is deprecated in pytest4 - for more information see
https://docs.pytest.org/en/latest/deprecations.html#marks-in-pytest-mark-parametrize

Also, make this an error in pytest.ini so if someone adds a new xfail,
it'll crash
2018-12-31 13:37:20 +00:00
Pea Tyczynska
97058d3c5b Add service setting switch to choose postage per template 2018-12-27 18:05:30 +00:00
Pea Tyczynska
50935e79ca Test mock_update_service_template called with right args 2018-12-21 17:18:18 +00:00
Pea Tyczynska
bc1e0b7167 Test choose postage section display when editing letter template 2018-12-21 17:13:19 +00:00
Pea Tyczynska
cbead5d665 Refactor tests for displaying template postage 2018-12-21 17:13:19 +00:00
Pea Tyczynska
5144db7baa Test postage display on view template page 2018-12-21 17:13:18 +00:00
Pea Tyczynska
85b8b343e2 Service deafault radio checked by default, existing tests pass. 2018-12-21 17:13:18 +00:00
Pea Tyczynska
e1191326f4 Fix tests after enabling editing of postage on letter templates 2018-12-21 17:13:18 +00:00
Leo Hemsted
94da05ebc4 only catch HTTPError
also add tests
2018-12-17 15:25:27 +00:00
Leo Hemsted
5c3c4ec78c change error message for not selecting a template
needed to subclass RadioField for this
2018-12-17 15:25:27 +00:00
Leo Hemsted
6f8dc7e6d3 fix being able to add template without selecting a radio button 2018-12-17 15:25:27 +00:00
Chris Hill-Scott
5ec673b84d Merge pull request #2578 from alphagov/add-existing-live-to-go-live
Note existing live services in go live ticket
2018-12-13 10:43:57 +00:00
Chris Hill-Scott
b51410baba Merge pull request #2575 from alphagov/remove-commas-volumes
Strip commas from estimated volumes
2018-12-13 10:41:50 +00:00
Chris Hill-Scott
9a70f6a7f4 Don’t let non-government users request to go live
Only users who work for government can accept the terms of use. This
will save us from having to email these requesters back telling them
they need to find someone else to submit the request.
2018-12-12 12:56:13 +00:00
Chris Hill-Scott
688bdd1d7a Note existing live services in go live ticket
It’s useful for analysing our growth to know if someone who’s requesting
to go live is already a live user of Notify.
2018-12-12 12:22:38 +00:00
Chris Hill-Scott
3cb0b164e8 Strip commas from estimated volumes
We suggest people format their numbers with commas when telling us how
many things they’re going to send.

This causes problems when we paste these values into a spreadsheet,
because the commas get interpreted as column separators.
2018-12-11 10:47:28 +00:00
Pea (Malgorzata Tyczynska)
77c61238e9 Merge pull request #2565 from alphagov/update_fields_csv_report
Add sender email to downloadable csv reports for notifications
2018-12-10 14:10:59 +00:00
Chris Hill-Scott
28d60124c2 Merge pull request #2568 from alphagov/fix-typod-test-name
Fix beheaded test name
2018-12-07 13:58:58 +00:00
Chris Hill-Scott
184a9fa605 Use email fields for feedback form
Otherwise we can end up collecting invalid email addresses…

This required some refactoring to allow our email fields to be optional
(but not by default).
2018-12-07 13:11:41 +00:00
Pea Tyczynska
1858ee93fd Notifications CSV Report now also shows sender email address 2018-12-07 11:20:20 +00:00
Chris Hill-Scott
b0ca82c0bd Fix beheaded test name
Tests wont run unless the function name starts with the word `test`.

Was accidentally deleted here:
de92950d8e (diff-3f993e348666469cc699ac3bf0e0cc5bR543)
2018-12-07 10:39:41 +00:00
Chris Hill-Scott
60f7aef3f7 Remove sticky textbox for one-off text messages
The idea behind the sticky textbox on this page is so you can scroll
through a long email or letter to find where in the message the
placeholder appears, while still being able to see the textbox you
should be typing in.

With text messages, they’re hardly ever long enough for anything to be
off the screen – ie no scrolling is required.

However if the user does scroll, they can end up covering the message
content with the sticky top panel. Which then looks like the message
has disappeared, so they click ‘back’ in the browser, then click into
the message again to make the page reload.

This commit removes the stickyness when sending from a text message
template.
2018-12-07 10:34:16 +00:00
Chris Hill-Scott
971c64a0a9 Merge pull request #2553 from alphagov/better-live-search-team
Scope live search on team page to name and email
2018-12-05 16:46:15 +00:00