Chris Hill-Scott
f55a8bf4b8
Add library of test areas
...
This is a temporary addition so we can test out some functionality.
2021-02-19 11:35:51 +00:00
Ben Thorner
5c2cdf6250
Remove redundant import of Mock and ANY
...
It's conventional to use the "mocker" fixture to access these.
2021-02-17 09:34:34 +00:00
Ben Thorner
00cc67f813
Inline duplicate service fixture with test
...
Similarly to the previous commit, this fixture is only used once,
so can benefit from being inline with its test.
2021-02-17 09:34:33 +00:00
Ben Thorner
52a5da4d17
Handle exception is org name already exists
...
Previously this would return a 500 error, as the 400 exception was
not handled from the API [1]. Note that:
- We tend to rely on exception messages to identify the error that
occurred [2][3], with services being a notable deviation [4]. I've
used the exception message approach, as this is more granular and
broadly consistent with the rest of the app.
- There is already code to cover this scenario when a user changes
the name of an existing organisation or service, but the mechanism
is different [5][6]. It makes sense to just get any error from the
call to try and create the organisation.
- The API mock is based on one for services [7], but I've chosen to
have it inline with the test, since we're unlikely to reuse it, and
it's clearer to have the test setup as part of the test.
[1]: 8f99da525d/app/organisation/rest.py (L34-L47)
[2]: 70b606a2d4/app/main/views/manage_users.py (L166)
[3]: 70b606a2d4/app/main/views/templates.py (L499)
[4]: 70b606a2d4/app/main/views/add_service.py (L30)
[5]: 70b606a2d4/app/main/views/service_settings.py (L102-L104)
[6]: 70b606a2d4/app/main/views/organisations.py (L264-L266)
[7]: 0abc143147/tests/conftest.py (L590-L606)
2021-02-17 09:34:30 +00:00
Pea Tyczynska
47f20ae438
Change content following content review
2021-02-16 15:20:15 +00:00
Pea Tyczynska
5a342b2a39
Test that only platform admins can update org notes
2021-02-16 14:46:14 +00:00
Pea Tyczynska
d7596f81fb
Add screen reader suffixes on all org settings
...
So screen reader users have consistent experience.
2021-02-16 14:46:14 +00:00
Pea Tyczynska
741beeb903
Add test case for when organisation notes do not change
2021-02-16 14:46:14 +00:00
Pea Tyczynska
eb9e6e2c71
Update organisation billing details
2021-02-16 14:46:13 +00:00
Pea Tyczynska
36c72bb4cc
View edit organisation billing details page
2021-02-16 14:46:13 +00:00
Pea Tyczynska
f4dc2a173e
Link to edit billing details page for organisation
2021-02-16 14:46:13 +00:00
Pea Tyczynska
8ea748f6e4
Update organisation notes
2021-02-16 14:46:12 +00:00
Pea Tyczynska
e090d97997
View edit organisation notes page
...
Also fix page title for edit service notes page.
2021-02-16 14:46:12 +00:00
Pea Tyczynska
56b777872e
Organisation billing details visible on organisation settings page
2021-02-16 14:46:12 +00:00
Pea Tyczynska
f0d94a009e
Organisation notes visible on organisation settings page
2021-02-16 14:46:11 +00:00
Chris Hill-Scott
276644f504
Reduce default broadcast expiry time to 4 hours
...
We don’t think we need to broadcast longer than this to validate that
the system is working.
2021-02-12 17:43:11 +00:00
David McDonald
70b606a2d4
Merge pull request #3795 from alphagov/drop-go-live-link
...
Remove text about service is live or in trial mode
2021-02-11 12:01:35 +00:00
David McDonald
dc69fa5a90
Remove text about service is live or in trial mode
...
This is not relevant for broadcast services. This information is
given in the heading bar next to the service name. There is no process
to request to go live and it is not necessary to tell you again that the
service is live
2021-02-10 15:35:48 +00:00
Ben Thorner
0abc143147
Merge pull request #3790 from alphagov/show-from-reply-to
...
Fix not showing 'From' / 'Reply to' after sending
2021-02-10 14:40:54 +00:00
Ben Thorner
486393962e
Show 'From' / 'Reply to' on all sending screens
...
This makes the preview of the email / SMS to send consistent with
the final screen, which we previously changed to show the "reply
to" text irrespective of whether the user had selected anything.
2021-02-10 10:43:29 +00:00
Ben Thorner
933d5bf68e
Show 'From' / 'Reply To' if set for notification
...
Previously when a service had multiple "reply to" entries setup for
email or SMS, we would show the one that was selected on all screens
[1][2] except the final one, where the notification is actually sent.
This fixes that, with the caveat that it will also show for services
with only one "reply to" entry (see notes below) - we will look at
making this consistent on the previous screens in the next commit.
Here's a bit more detail on how this works:
- If a service has multiple "reply to" entries, the journey to send a
one-off message starts with a screen to select the "sender_id", which
is otherwise "None" [3].
- The "sender_id" is subsequently resolved to an actual email / phone
number by calling an API [4] and plucking it out of the response JSON.
- The email / phone number then get rendered as part of the preview
template [5][6].
- Unfortunately the "sender_id" is removed from the session by the time
we get to the "view_notification" view [7].
- However, we can get back the equivalent text from the notification
JSON, which is set by the API when the notification is created [8],
give or take a bit of validation code [9][10].
- But the "reply_to_text" field is also set by the API when the service
only has one "reply to" entry, so it will show then as well.
We could add look at the number of "reply to" entries for the service,
in order to consistently only show it when there is more the one. But
it seems more useful to show it on previous screens, since it provides
more information than is currently show (esp. for emails).
[1]: 93226ec5d6/app/main/views/send.py (L441-L442)
[2]: 93226ec5d6/app/main/views/send.py (L966-L967)
[3]: 93226ec5d6/app/main/views/send.py (L247)
[4]: 93226ec5d6/app/main/views/send.py (L1071-L1082)
[5]: 93226ec5d6/app/templates/views/notifications/notification.html (L80)
[6]: https://github.com/alphagov/notifications-utils/blob/master/notifications_utils/jinja_templates/sms_preview_template.jinja2
[7]: 93226ec5d6/app/main/views/send.py (L1059)
[8]: f8b4c9151c/app/service/send_notification.py (L87-L93)
[9]: f8b4c9151c/app/models.py (L653)
[10]: https://github.com/alphagov/notifications-utils/blob/master/notifications_utils/recipients.py#L482
2021-02-10 10:43:27 +00:00
Rebecca Law
f0ce2c6f5b
Update utils to version 43.8.
...
Invalid characters for the first line of a postal address now include < >
2021-02-09 14:07:01 +00:00
David McDonald
93226ec5d6
Merge pull request #3787 from alphagov/platform-admin-service-settings
...
Show only relevant platform admin settings for broadcast service
2021-02-08 14:31:00 +00:00
David McDonald
752b685b26
Show only relevant platform admin settings for broadcast service
...
A few of note
Count in list of live services - this should be set to no in the API (to
be implemented) so we never show broadcast services in the list of live
services to reduce security leaks
Organisation - all broadcast services are currently going to be found in
a single organisation so we keep track of them easily. Therefore there
is no need to allow the changing of the organisation
Email authentication - we may in time not allow these services to use
email auth to log in but this hasn't been decided so let's keep it for
the moment
Rate limit - although a service may end up using our API to create
broadcasts, there is currently no rate limit check on this endpoint
and it's also extremely unlikely that any service would ever breach
the default limit
2021-02-04 17:36:30 +00:00
Katie Smith
3ee16ecdbe
Adjust test instruction
2021-02-04 15:21:29 +00:00
Pea Tyczynska
25534dbee3
Remove 'billing' from option labels
...
They were unnecessary it turned out.
2021-02-03 10:30:02 +00:00
Pea Tyczynska
c60be7000a
Add notes to edit billing details page
...
As per ticket and as per Caley's request, so everything can be
edited together.
Also pluralise labels for billing contact info, to indicate
that putting multiple in is ok, and widen the input fields so
that it is more comfortable to input multiple contact details.
2021-02-03 10:30:02 +00:00
Pea Tyczynska
079f371bc5
Update attribute names following changes in API
2021-02-03 10:30:01 +00:00
Pea Tyczynska
8f21caa87a
Change service billing details
...
View page that lets you change service billing details and
update details on form submission.
2021-02-03 10:30:01 +00:00
Pea Tyczynska
73031962a7
Change link leads to edit billing details view
2021-02-03 10:29:19 +00:00
Pea Tyczynska
4a7bfcc9c5
Add billing details property
...
This property lets service settings know if there are any
billing details to preview.
2021-02-03 10:29:18 +00:00
Pea Tyczynska
8219e5a2f9
Show billing details row for admins on service settings page
2021-02-03 10:29:18 +00:00
Pea Tyczynska
f5e639050b
Merge pull request #3784 from alphagov/notes-fix
...
Allow to update service notes
2021-02-02 17:37:27 +00:00
Pea Tyczynska
42b17d40b4
Test allowed attributes are really allowed
2021-02-02 16:38:56 +00:00
Tom Byers
0cedf39992
Merge pull request #3781 from alphagov/add-govuk-radios-7
...
Add GOVUK radios [part 7]
2021-02-02 11:40:53 +00:00
karlchillmaid
ed45cd18b0
Change p to pence
2021-02-01 08:11:51 +00:00
karlchillmaid
3728ec965c
Update letter prices
2021-02-01 08:11:51 +00:00
karlchillmaid
624b8544b3
Update letter price content
2021-02-01 08:11:51 +00:00
Chris Hill-Scott
f34cd4a6b5
Merge pull request #3780 from alphagov/show-areas-not-in-library
...
Display areas that aren’t in the library
2021-01-28 10:21:12 +00:00
Tom Byers
0459cbe24f
Merge pull request #3768 from alphagov/add-govuk-radios-6
...
Add GOVUK radios [part 6]
2021-01-27 14:54:30 +00:00
Chris Hill-Scott
926ada2f21
Check that all areas are in the library
...
We should assume to start with that areas come either from the library
or from the JSON, and not a combination of the two.
2021-01-27 14:32:35 +00:00
Chris Hill-Scott
5ae53b625b
Show broadcasts created by the API
...
Broadcasts created by the API are different in that:
- they aren’t created by any user, so don’t have a `created_by_id`
- they are created instantly, not in steps, so don’t have an
`updated_at` time
This commit alters the views to account for when these pieces of
information aren’t present.
2021-01-27 11:34:43 +00:00
Tom Byers
e013fbb9b3
Merge pull request #3770 from alphagov/fix-extend-params-bug
...
Fix bug with extend_params function
2021-01-27 10:52:51 +00:00
Tom Byers
513fbff6e0
Convert radios on set-template-sender page
...
Includes making the legend the h1 for the page to
follow design system guidance:
https://design-system.service.gov.uk/get-started/labels-legends-headings/
2021-01-27 10:52:24 +00:00
Tom Byers
ece956e324
Convert radios on set-sender page
...
Includes making the legend the page header to
follow design system guidance:
https://design-system.service.gov.uk/get-started/labels-legends-headings/
I had to add some override styles to allow the
legend to classes as a full-width column, and the
radios to be in one that is three-quarters.
2021-01-27 10:52:24 +00:00
Tom Byers
f6cef24617
Convert create API key radios to GOVUK Frontend
2021-01-27 10:52:24 +00:00
Tom Byers
31b344d6b4
Make radioSelect use GOVUK Frontend radios
...
Includes changing the code so that the radios
aren't split into two columns in the HTML present
when the page loads. This layout is now added by
the JS.
2021-01-26 21:14:48 +00:00
David McDonald
8e3aeea9a0
Merge pull request #3775 from alphagov/set-sender-bug
...
Fix bug with incorrect redirect to send_one_off
2021-01-26 13:54:18 +00:00
Tom Byers
67392e97ee
Fix issue with looping in list merging
...
The last_dest_idx variable should always have been
tracking the last index in the source list. The
original intention, implemented incorrectly, was
to just append any items which source has no item
at that index.
2021-01-26 12:16:08 +00:00
Chris Hill-Scott
60aa2d2b42
Display areas that aren’t in the library
2021-01-26 10:49:47 +00:00