Commit Graph

8225 Commits

Author SHA1 Message Date
Tom Byers
3c50c3cd01 Merge pull request #3086 from alphagov/add-js-tests-for-colour-preview
Add tests for colour preview
2019-08-20 13:53:32 +01:00
Tom Byers
1edea76a50 Merge pull request #3087 from alphagov/add-js-tests-for-error-tracking
Add tests for error tracking module
2019-08-20 13:53:01 +01:00
Pea (Malgorzata Tyczynska)
551c4abee2 Merge pull request #3089 from alphagov/search-services-by-name
Find services by name or partial name
2019-08-16 11:53:07 +01:00
Pea Tyczynska
3844d050ff Simplify find users by email view - valdiation already done by form 2019-08-16 11:20:36 +01:00
Pea Tyczynska
c717e37c48 Test no input 2019-08-15 17:06:43 +01:00
karlchillmaid
2eed904476 Merge pull request #3091 from alphagov/roadmap-update
Update roadmap
2019-08-15 15:58:42 +01:00
karlchillmaid
2707e5192e Amend content for clarity 2019-08-15 15:13:39 +01:00
karlchillmaid
b0c6b7c2d4 Update roadmap 2019-08-15 13:13:11 +01:00
Pea Tyczynska
a906552c25 Require data on search by name form
This lets us build leaner views when using this form.
2019-08-15 12:41:51 +01:00
Sakis
52971ae57a Merge pull request #3090 from alphagov/bump-utils
Bump utils to 33.2.9 for better error handling
2019-08-15 12:09:27 +01:00
Athanasios Voutsadakis
3c588bbbed Freeze requirements 2019-08-14 16:39:02 +01:00
Athanasios Voutsadakis
13816183df Bump utils to 33.2.9 for better error handling
alphagov/notifications-utils#640
2019-08-14 16:33:32 +01:00
Pea Tyczynska
035cb19568 Find services by name or partial name 2019-08-14 11:38:58 +01:00
karlchillmaid
1e248d9205 Merge pull request #3083 from alphagov/text-message-pricing-update
Update Pricing information
2019-08-13 09:49:09 +01:00
Katie Smith
350be28b38 Merge pull request #3082 from alphagov/upload-letters-hub
Add 'Uploads' hub and navigation
2019-08-13 09:20:29 +01:00
Pea Tyczynska
862df6d359 WIP find services by name 2019-08-12 18:02:27 +01:00
Tom Byers
436367ce81 Add tests for error tracking module 2019-08-12 16:48:23 +01:00
Tom Byers
5bda6a062e Add tests for colour preview 2019-08-12 16:29:28 +01:00
karlchillmaid
4eeb71c432 Add brackets for VAT 2019-08-09 13:15:14 +01:00
karlchillmaid
abf63d3ba5 Update and move price increase information 2019-08-09 13:13:38 +01:00
karlchillmaid
23273e1b25 Update and move price increase information 2019-08-09 13:13:21 +01:00
karlchillmaid
2eb5e2ad50 Update content
Update introduction, text messages and letters
2019-08-09 11:53:12 +01:00
Katie Smith
8a453890e6 Add 'Uploads' hub and navigation
The uploads hub is just a page with text for now - there are no actions
available on the page. It is linked to from a new 'Uploads' menu item on
the left of the page which is only visible if your service has the
`letter` and `upload_letters` permissions and if the current user has
permissions to send messages.
2019-08-09 08:50:48 +01:00
karlchillmaid
3d9aac4ac6 Merge pull request #3081 from alphagov/update-slack-link
Update slack link
2019-08-08 14:28:17 +01:00
karlchillmaid
00562cd0e7 Amend link 2019-08-08 12:28:10 +01:00
karlchillmaid
16b20475b2 Amend link 2019-08-08 12:27:48 +01:00
karlchillmaid
04880e8372 Update Slack link to use unique ID 2019-08-08 12:24:10 +01:00
karlchillmaid
1f67126ea5 Update Slack channel link to use unique ID 2019-08-08 12:23:04 +01:00
Tom Byers
6bf4e30a37 Merge pull request #3047 from alphagov/add-js-tests-for-radio-select
Add js tests for radio select
2019-08-07 15:16:24 +01:00
Andy Paine
f08ae7a77c Merge pull request #3075 from alphagov/use-paas-statsd
REP-340: Use PaaS hosted stats exporter
2019-08-07 10:56:20 +01:00
Tom Byers
551f7b91f4 Test and then fix focus when module state changes
Includes tests for this.
2019-08-07 10:23:09 +01:00
Tom Byers
c11c054323 Fix option selection for keyboard users
Keyboard users select a time slot by moving to the
radio for that slot, using the arrow keys, and
selecting it by pressing 'space' or 'enter', like
a `<select>`.

We allow this by listening for 'keydown' events
from the 'enter' or 'space' keys on time slot
radios that are checked.

Browsers fire 'click' events alongside the
'keydown' event meaning it's possible for the
code that makes the selection to be run twice.

We currently guard against this by checking for
the `pageX` property of the event object,
reasoning that a click event fired by a key press
won't have a cursor position.

Most browsers we support set it to `0` but it
isn't always the case:

https://dom-event-test.glitch.me/results.html

For those browsers, the `!event.pageX` condition
resolves correctly so this works. Safari and
versions of Internet Explorer before 11 however,
set it to a positive number.

In those browsers, moving the selection between
radios using the arrow keys fired a 'click' event
which, in Safari and IE<11, was treated as a
mouse/touch event and so confirmed the selection.
This made it impossible to select a later time.

These changes replace the 'click' event on time
slots with an artifical one that tracks
mouse/trackpad clicks by listening for a
'mousedown' followed by a 'mouseup' on a time
slot. This doesn't fire on key presses so avoids
the problem.
2019-08-07 10:23:09 +01:00
Tom Byers
64c6d1fbc7 Make clicking 'Done' preserve any selection made
Clicking the 'Done' button resets the module to
its default state. 'Done' implies you've
completed your selection so this doesn't make
sense.

This changes it so any selection made will be
confirmed when 'Done' is clicked.
2019-08-07 10:23:09 +01:00
Tom Byers
5186402958 Add tests for different selection methods
Adds tests for selection by keyboard, involving
making a selection with the arrow keys and
confirming it with the space or enter keys.
2019-08-07 10:23:09 +01:00
Tom Byers
6854361375 Expand event helpers
Extends triggerEvent, allowing the creation of
different types of event, and to change the data
on its object. Also fakes the positional data
browsers add to the event object.

Also adds helpers for simulating:
- all the events for a mouse click
- the events invovled in moving the selection in a radio group
2019-08-07 10:23:09 +01:00
Tom Byers
25b2414cec Add tests for radioSelect module 2019-08-07 10:23:09 +01:00
Tom Byers
a2ec376d03 Make Hogan definition clearer in radioSelect JS
It helps the tests to know the `Hogan` variable is
actually a property of the global variable
(`window` in this case) and doesn't hurt the
readability of the script.
2019-08-07 10:23:09 +01:00
Rebecca Law
f4b65683cf Merge pull request #3078 from alphagov/change-labels
Changing the labels on the service setting page.
2019-08-07 09:15:27 +01:00
Rebecca Law
026a01a090 Changing the labels on the sevice setting page.
We added `Upload letters` to the platform admin service settings, which makes is confusing when next to `Upload documents`.
Also `User auth type editting` is a confusing label

`User auth type editting` --> `Email authentication`
`Uploading documents` --> `Send file by email`
2019-08-06 16:57:40 +01:00
Katie Smith
5e39163277 Merge pull request #3076 from alphagov/upload-letters-service-setting
Add upload letters permission to service settings page
2019-08-06 13:30:32 +01:00
Katie Smith
0882c76476 Add upload letters permission to service settings page
The upload_letters permission can only be changed by Platform Admin
users. It works in a similar way to the inbound_sms nested permission
- you only see the row in the table if you have the 'letter' permission,
but the 'letter' and 'upload_letters' are still separate permissions and
changing one does not affect the other.
2019-08-05 13:51:31 +01:00
Andy Paine
5242f67d97 REP-340: Use PaaS hosted stats exporter
- We are running the statsd exporter on PaaS now and we can route to it
  on apps.internal
- Send metrics there instead so they end up in Prometheus
2019-08-05 13:47:53 +01:00
Leo Hemsted
16da5d8243 Merge pull request #3074 from alphagov/utils-bump
utils bump
2019-08-02 14:51:35 +01:00
Leo Hemsted
1d67c82f0f utils bump
also dont use splitlines on csv data, there might be quoted newlines we dont want to split on
2019-08-02 14:34:05 +01:00
Katie Smith
e72540d3f9 Merge pull request #3065 from alphagov/rename-endpoint
Remove ft from method and url, it doesn't add any meaning.
2019-07-29 10:07:31 +01:00
Katie Smith
691a607ccf Merge pull request #3068 from alphagov/clear-service-cache-when-updating-org
Delete service cache when changing an organisation's sector
2019-07-29 10:06:40 +01:00
Katie Smith
123b769771 Change code order for Redis delete decorator
Before, the delete decorator would delete the keys from Redis and then
we made the request to api to change the data. However, it is possible
that the cache could get re-populated in between these two things
happening, and so would cache outdated data.

This changes the order to send the api request first. We then always
delete the specified keys from Redis. Changing the order of the code in
the decorator changes the order in which the cache keys get deleted, so
the tests have been updated.
2019-07-26 16:29:50 +01:00
Katie Smith
ccad068a48 Change when 'has-jobs-<>' cache key gets set
We should set the cache after the job has been created, in case there
was an HTTP error when creating the job.
2019-07-26 16:26:20 +01:00
Katie Smith
dc1c73c647 Delete service cache when changing an organisation's sector
When we change an organisation's sector we now also change the sector of
all its services, so we need to delete those services from Redis.
2019-07-26 16:26:20 +01:00
Pea (Malgorzata Tyczynska)
eb7504bc0d Merge pull request #3067 from alphagov/new_org_types_part_2
Delete references to 'nhs' generic organisation type
2019-07-26 11:49:15 +01:00