Commit Graph

7170 Commits

Author SHA1 Message Date
Chris Hill-Scott
1008d19963 Merge pull request #2086 from alphagov/wealden.gov.uk
Record agreement signed by Wealden Council
2018-05-16 14:28:43 +01:00
Chris Hill-Scott
6ac2302476 Record agreement signed by Wealdon Council 2018-05-16 14:24:04 +01:00
Rebecca Law
c721c40ec7 Ignore temporary endpoint in navigation test 2018-05-16 13:23:49 +01:00
Leo Hemsted
8864901690 add id to big received messages box 2018-05-16 12:31:54 +01:00
Rebecca Law
d8c8b6a454 Temporary endpoint to test the new usage page updates.
This code will go away once we are happy the results match.
2018-05-16 12:26:11 +01:00
Chris Hill-Scott
2de17bd415 Make precompiled template name bold
To match template link.
2018-05-15 13:06:36 +01:00
Chris Hill-Scott
5910f127d3 Merge pull request #2082 from alphagov/stirling.gov.uk
Record agreement signed by Stirling Council
2018-05-14 15:58:19 +01:00
Chris Hill-Scott
82727cea63 Record agreement signed by Stirling Council 2018-05-14 15:43:39 +01:00
Chris Hill-Scott
d3bf1ac8a2 Merge pull request #2081 from alphagov/page-break-guidance
Add guidance on how to use page breaks in letters
2018-05-14 15:41:49 +01:00
Chris Hill-Scott
7b759963b7 Merge pull request #2073 from alphagov/back-to-only-authed
Only show ‘back to service name’ link if signed in
2018-05-14 15:36:16 +01:00
Chris Hill-Scott
fc87ec70a7 Merge pull request #2072 from alphagov/test-domains
Check that all domains in our lists are valid
2018-05-14 15:36:07 +01:00
Chris Hill-Scott
e5c1c68942 Merge pull request #2074 from alphagov/sign-in-for-agreement
Let people choose which agreement to download if signed in
2018-05-14 15:35:57 +01:00
Chris Hill-Scott
228a5f47ce Merge pull request #2079 from alphagov/pyup-update-pyexcel-xls-0.5.6-to-0.5.7
Update pyexcel-xls to 0.5.7
2018-05-14 15:35:40 +01:00
Chris Hill-Scott
fffcac1682 Add guidance on how to use page breaks in letters
Useful generally, but especially since we’ve edited some team’s
templates to use this new feature, they could probably do with knowing
how it works.
2018-05-14 15:21:49 +01:00
Chris Hill-Scott
77f2f27103 Refactor how we decide to set metadata
We want to set the metadata on a file when rendering the check page, but
not when rendering the preview of a letter. So let’s put the code that
does that only in the place where we’re rendering the check page. This
means not having to pass a variable around.

Refactoring only; no functional changes.
2018-05-11 08:46:42 +01:00
pyup-bot
a2d9cbfde8 Update pyexcel-xls from 0.5.6 to 0.5.7 2018-05-10 23:26:16 +01:00
Chris Hill-Scott
e6627786cc Merge pull request #2078 from alphagov/fix-overwritten-filename
Stop overwriting S3 metadata with empty filename
2018-05-10 17:22:13 +01:00
Chris Hill-Scott
a827f2e2b4 Remove redundant call to .get_template
Every call to the API is a blocking network request.
2018-05-10 17:02:41 +01:00
Chris Hill-Scott
3a471e2f61 Stop overwriting S3 metadata with empty filename
When you upload a CSV the check page takes the file name from the URL
and writes it to the S3 metadata for that file.

This also happens when you go to the .png version of this page.

The .png version of the page doesn’t have the filename in the URL. So it
re-writes the S3 metadata with an empty filename.

This means that all letter jobs sent recently have no file names. This
commit fixes this problem.
2018-05-10 17:01:03 +01:00
Chris Hill-Scott
bb88bc462a Add Barnet council to the list of domains
Not sure why they weren’t on there already…
2018-05-10 11:13:28 +01:00
Chris Hill-Scott
661a1ca47f Update content based on Thom’s feedback
On the page where signed in users can download the agreement:

> The second sentence of that could probably just be 'You can [download
> a copy]'. And could go at the end of the previous paragraph. (We try
> to avoid 'here', and the 'if you need to' is probably unnecessary).

On the page where we give users a choice of agreement to sign:

> We could probably edit that callout down a bit to: '[Contact us] if
> you're not sure whether your organisation is a crown or non-crown
> body.'
>
> (Try to keep callouts to a single sentence if we can)
2018-05-09 16:02:02 +01:00
Chris Hill-Scott
f9421789d0 Only show ‘back to service name’ link if signed in
When you’re not signed in you can still have a service in your session.
But there’s no point trying to get to its dashboard until you’re signed
in – you’ll just be sent back to the ‘sign in’ page.
2018-05-09 15:32:46 +01:00
Leo Hemsted
5f4d9a60da Merge pull request #2075 from alphagov/statistics-endpoint
use service statistics endpoint instead of detailed service
2018-05-09 14:46:56 +01:00
Leo Hemsted
78a6f86043 use service statistics endpoint instead of detailed service
we're not actually looking at the detailed service aspects - just
the stats. We're doing this in three places:

* dashboard
* notification activity page
* when checking jobs to see if we're over the daily limit

change these places to use a new api endpoint (service/id/statistics),
which hopefully be a little more performant, and will definitely be a
little more organised - moving away from generic endpoints with loads
of optional parameters.

We still need the detailed endpoints for the platform admin page tho.

Depends on https://github.com/alphagov/notifications-api/pull/1865
2018-05-09 14:00:24 +01:00
Chris Hill-Scott
f8546c8611 Refactor to be more DRY 2018-05-09 13:44:42 +01:00
Chris Hill-Scott
220e11ccdd Customise download page if agreement signed
If the user’s organisation has already signed the agreement we shouldn’t
give them the instructions for how to sign it.
2018-05-09 13:44:33 +01:00
Chris Hill-Scott
dc6d66daba Make people sign in to get the agreement
Currently we have a bunch of users who aren’t signed in asking us for
the agreement.

This is bad because:
- it’s slower (for them) than just being able to download it
- it creates work for us

We can’t just offer the agreement to anyone, but we can offer to it to
anyone who’s signed in because we now let people self-select which
version to download when we can’t tell which one to give them.
2018-05-09 13:41:51 +01:00
Chris Hill-Scott
947b67ee1a Let people choose which agreement to download
If we don’t know whether people belong to a crown organisation we should
give them the option of self-selecting, because they might themselves
know.

This commit adds a new version of the ‘agreement’ page which gives
people exactly that choice. It doesn’t link to it yet.
2018-05-09 13:40:21 +01:00
Chris Hill-Scott
e19e68396f Merge pull request #2057 from alphagov/whitespace
move strip_whitespace to utils
2018-05-08 16:55:02 +01:00
Chris Hill-Scott
d261c556d0 Merge pull request #2065 from alphagov/email-complete-sign-in
Improve email address input on sign in
2018-05-08 16:54:06 +01:00
Chris Hill-Scott
952a83f23a Merge pull request #2068 from alphagov/2fa-input
Improve 2fa code input
2018-05-08 16:53:54 +01:00
Chris Hill-Scott
060b93c4d4 Check that all domains in our lists are valid
Since we have too many to add individual tests every time we add a new
one now.
2018-05-08 15:25:41 +01:00
Chris Hill-Scott
3aa688d1e5 Merge pull request #2071 from alphagov/public-agreement
Add URLs to download the agreement without login
2018-05-08 14:56:47 +01:00
Chris Hill-Scott
771f916630 Add URLs to download the agreement without login
So that we can share these URLs in an email we’re sending out.
2018-05-08 14:49:06 +01:00
Chris Hill-Scott
7aec58728e Make confirm page consistent with 2fa page 2018-05-08 14:46:07 +01:00
Chris Hill-Scott
2066b039d8 Merge pull request #2069 from alphagov/209-229-and-75-79
Updating service count to 229 and Org count to 79
2018-05-08 14:30:02 +01:00
Chris Hill-Scott
0e1e5ccecc Merge pull request #2070 from alphagov/manheadschool
Adding mansheadschool to the whitelist of domains
2018-05-08 14:29:53 +01:00
Pete Herlihy
bb7973f753 Adding a test for mansheadschool whitelisting domain 2018-05-08 11:42:04 +01:00
Pete Herlihy
653e3fcd52 Adding Manshead School to allowed domains 2018-05-08 11:40:19 +01:00
Leo Hemsted
e47a459757 Merge pull request #2066 from alphagov/mock-tests
Make sure we always mock endpoints in tests
2018-05-08 11:37:51 +01:00
Pete Herlihy
712600c617 Updating service count to 229 and Org count to 79 2018-05-08 11:25:23 +01:00
Leo Hemsted
4ddd3aa155 use client_request to always check the response
this'll avoid us accidentally 503ing and ignoring it in tests where we
check for "assert my_content not present"
2018-05-08 11:16:12 +01:00
Chris Hill-Scott
02907afce1 Refactor sms_code functionality into the class
So it’s all in one place, not two.
2018-05-08 11:03:01 +01:00
Chris Hill-Scott
60c56be048 Remove ConfirmMobileNumberForm
It’s exactly the same code as `TwoFactorForm` was.
2018-05-08 11:02:28 +01:00
Chris Hill-Scott
063f9cc081 Enable numeric keypad for text message code
If you’re signing in on a phone, it’s easier to type the two factor code
with a numeric keypad. The most reliable way to get the numeric keypad
to show up on multiple devices is:
- `type='tel'` (not `type='number'` because that’s only meant for
  numbers, not string of digits, ie `01234` is not a number)
- `pattern='[0-9]*'`, without which it doesn’t work on iOS

Based on the guidance here:
- https://github.com/alphagov/govuk-design-system-backlog/issues/74
- https://docs.google.com/document/d/1wozIhOdt6wvlgqVReauUnlsJI-3fqUlNuQFwUI7tqAA/edit
2018-05-08 10:55:42 +01:00
Chris Hill-Scott
4d678aec93 Give better error messages for incorrect code
If we know the code won’t pass the validation on the API side, we might
as well tell the user before even passing it to the API.

So this commit:
- adds some more validators to the field
- rewrites the validation function on the form to actually call the
  field-level validators before hitting the API 🤦‍♂️
- refactors the tests to be parametrize, which means they can be
  shorter, easier to read, and more comprehensive
2018-05-08 10:53:22 +01:00
Leo Hemsted
e1b71e546b move strip_whitespace to utils
see https://github.com/alphagov/notifications-utils/pull/471
2018-05-03 17:17:32 +01:00
Chris Hill-Scott
d9e7aa9059 Merge pull request #2064 from alphagov/pyup-update-pyexcel-io-0.5.6-to-0.5.7
Update pyexcel-io to 0.5.7
2018-05-03 17:01:11 +01:00
Leo Hemsted
7656d3d567 ensure create_email_branding is mocked in tests
also fix asserts to check status codes (to make sure it's not 500)
2018-05-03 16:33:37 +01:00
Leo Hemsted
236339435c conversations only looks for 404 errors from inbound sms
stops masking some 503s in tests
2018-05-03 16:33:37 +01:00