Commit Graph

8983 Commits

Author SHA1 Message Date
Chris Hill-Scott
4552587829 Merge pull request #3256 from alphagov/fix-session-bug-change-user-email
Fix session bug when changing user’s email address
2020-01-14 13:46:03 +00:00
Chris Hill-Scott
578f0c2d56 Merge pull request #3257 from alphagov/overlay-only-bad-pages
Only put the overlay on bad pages
2020-01-14 13:45:56 +00:00
karlchillmaid
727db50a1a Merge pull request #3258 from alphagov/update-footer-and-get-started
Update footer and get started
2020-01-14 11:00:33 +00:00
karlchillmaid
d0ee3c45b7 Move 'performance' to the Support column 2020-01-14 10:45:10 +00:00
karlchillmaid
3dab5ca73e Update list of organisations that can use Notify
Update list of organisations that can use Notify to remove 'housing associations' and rephrase 'companies owned by local or central government that deliver services on their behalf'.
2020-01-14 10:38:34 +00:00
Chris Hill-Scott
e9ad2e9c42 Only put the overlay on bad pages
This will make it easier to find errors in your file, because you won’t
spent time looking for them on pages which are OK.
2020-01-13 17:42:44 +00:00
Chris Hill-Scott
bf56a9bac1 Merge pull request #3255 from alphagov/fix-import-make-command
Add a command to fix import order
2020-01-13 15:58:47 +00:00
Rebecca Law
e7928512e8 Merge pull request #3240 from alphagov/recipient-address
Show the first line of the address from the to field.
2020-01-13 14:29:33 +00:00
Rebecca Law
68bf013a0c Removed method from conftest, that's not being used. 2020-01-13 14:19:20 +00:00
Chris Hill-Scott
72eb6ef99a Fix session bug when changing user’s email address
The session key we use is global.

This means if you open the edit page for two different users in two
different tabs the session for the first tab is overwritten with the
session from the second tab. This means the two users are both set to
the same email address, which causes an exception (email addresses are
unique).

This commit fixes that bug by including the user ID in the session ID.
2020-01-13 12:03:39 +00:00
Chris Hill-Scott
c391729dc0 Merge pull request #3247 from alphagov/buttony
Make create account button more buttony
2020-01-13 10:35:34 +00:00
Chris Hill-Scott
0fc1ae63e9 Add a command to fix import order
We check import order as part of our automated tests. But fixing them
means:
- manually editing them and rechecking
- remembering the parameters to `isort`
- looking up the `isort` command from the last time you ran it

Putting it in the Makefile should make life a bit easier.
2020-01-13 10:26:11 +00:00
Rebecca Law
8067634447 Fix merge conflict 2020-01-10 16:16:11 +00:00
Rebecca Law
40575bbb75 Rebase pytest 5 changes
Add to field in creation of notification
2020-01-10 16:06:04 +00:00
Rebecca Law
9d1f92a752 Strip the trailing comma on the first line of an address block. 2020-01-10 16:06:04 +00:00
Rebecca Law
f7b3f9b06a - Remove the trailing comma from the first line of the "to" field
- Add client_reference to the activity CSV report
- Show the recipient on the CSV report the same way as the view activity page.
2020-01-10 16:00:40 +00:00
Rebecca Law
57b4fa0397 Use splitlines instead of split 2020-01-10 16:00:40 +00:00
Rebecca Law
f8e7635a1d Show the first line of the address from the to field.
Now persisting the address to the "to" field of the Notification, after the notification has been validated.
If the letter is pending validation, then "Checking..." will appear as the identifier for the letter.
If the letter has passed validation, then the first line of the address (now persisted in the "to" field) will be displayed, with the client reference underneath.
If the letter has failed validation the "Provided as PDF" will show be displayed, which is now the initial value of the "to" field.
2020-01-10 16:00:40 +00:00
Rebecca Law
47ec4912db Merge pull request #3253 from alphagov/new-no-address-message
Added a new error message when the letter is missing an address block.
2020-01-10 15:44:47 +00:00
Katie Smith
72b02f27e9 Merge pull request #3252 from alphagov/test-refactor
Refactor conftest.py
2020-01-10 15:17:09 +00:00
Rebecca Law
70276cb526 Added a new error message when the letter is mising an address block.
Before deploying a change to template-preview to return a validation error for letters that are missing the address block, we need to add the new erorr message to admin.

Some content changes have been made to other messages.
The format of the message has changed.
2020-01-10 14:42:56 +00:00
Katie Smith
8e9b7ae368 Remove arguments from fixtures
These can't be used, since we fixtures can no longer be called as if
they were functions, so we can simply the code by removing them.
2020-01-10 12:17:56 +00:00
Katie Smith
17f72dc4cd Delete unused fixtures 2020-01-10 10:52:40 +00:00
Pea M. Tyczynska
b3380ad7b5 Merge pull request #3250 from alphagov/fix-re-upload-button
Fix exception in track-error js module that broke our re-upload button
2020-01-09 16:36:44 +00:00
Pea Tyczynska
a2220f6929 Fix exception in track-error js module that broke our re-upload button 2020-01-09 16:08:44 +00:00
Katie Smith
9c62615acb Merge pull request #3248 from alphagov/pytest-5
Upgrade Pytest to version 5.3.2
2020-01-09 14:44:20 +00:00
Katie Smith
1c23784767 Pytest 5 🎉
Also updates the Pytest command in `run_tests.sh` to remove junit,
which we stopped using.
2020-01-09 09:50:37 +00:00
Katie Smith
0ec086cd24 Use fixtures for templates in a Pytest 5 compatible way 2020-01-09 09:48:16 +00:00
Katie Smith
9e3f21cd39 Stop calling mock_get_notications as if it's a function
By creating a new function in conftest.py, `create_notifications`, which
can be used instead.
2020-01-09 09:48:16 +00:00
Katie Smith
68983a21d2 Use fixtures for callbacks in a Pytest 5 compatible way 2020-01-09 09:48:16 +00:00
Katie Smith
a3978f8a5f Use fixtures that get services in Pytest 5 compatible way 2020-01-09 09:48:16 +00:00
Katie Smith
f93df53ed3 Stop calling more fixtures as functions
This commits stops calling more fixtures as if they were functions in
order to reduce the number of errors with Pytest 5.
2020-01-09 09:48:16 +00:00
Katie Smith
a602ce5937 Stop calling mock_get_no_api_keys and api_keys_mock like functions 2020-01-09 09:48:16 +00:00
Chris Hill-Scott
c270895c7f Merge pull request #3235 from alphagov/job-page-for-expired-jobs
Customise the job page for jobs whose notifications have been purged
2020-01-09 09:46:19 +00:00
Chris Hill-Scott
5bf29495ae Merge pull request #3242 from alphagov/fix-incorrect-assertion
Fix incorrect assertion for letter job CSV link
2020-01-08 09:57:26 +00:00
Chris Hill-Scott
82a71c67df Make button more buttony
`role=button` for users of voice control software

`draggable=false` as per https://github.com/alphagov/govuk-frontend/pull/1020
2020-01-08 09:50:50 +00:00
karlchillmaid
91d39b3fdf Merge pull request #3246 from alphagov/update-roadmap
Update roadmap content
2020-01-07 15:38:36 +00:00
karlchillmaid
c889801f4f Update content 2020-01-07 15:32:12 +00:00
karlchillmaid
adededcf21 Update content 2020-01-07 15:18:03 +00:00
karlchillmaid
ee9c36c102 Update roadmap content 2020-01-07 15:03:13 +00:00
Tom Byers
aca999a94c Merge pull request #3245 from alphagov/remove-govuk-template-compatibility-flag
Remove govuk_template compatibility flag
2020-01-07 14:03:40 +00:00
Leo Hemsted
ac9517f8a7 Merge pull request #3244 from alphagov/func-tests-fix
functional tests email reply to flakiness
2020-01-07 13:55:33 +00:00
Tom Byers
d939c19222 Remove govuk_template compatibility flag
We removed govuk_template when we moved to the
GOVUK Frontend template.njk for our base layout.

The flag was originally turned on under the
assumption that the global CSS govuk_template adds
would be present in our cascade. It fixes issues
that CSS causes with the GOVUK Frontend CSS
further down.

This was mostly wrong, as we did remove the
govuk_template code, but our situation is a bit
different because when we removed it, we copied
across some global styles it introduces to prevent
problems with our own CSS.

One of the side-effects of turning on this flag
was that the Transport font was not being applied.

This turns the flag off again, which replaces the
font, and hard-codes in the fix having this flag
would have brought in: a darker colour for link
text when focused.
2020-01-07 12:55:21 +00:00
Leo Hemsted
e5b2d81d22 increase reply to address validation timeout on preview
Celery/SQS underperforms in low-traffic environments. Tasks will sit on
celery queues for several seconds before getting picked up if they're
the only thing on the queue. This is observable in our test environments
like preview and staging, but we've got enough load on production that
this isn't an issue.

When we validate reply to email addresses, we expect a delivery receipt
to have been processed within 45 seconds of the button being pressed. On
preview, we often observe times over that, possibly due to the several
queues involved in sending an email and processing its receipt. So, to
ensure that functional tests can pass (when we don't really care how
fast things are, just that the flow doesn't break), bump this timeout up
to 120 seconds on preview. The functional tests were waiting for 120
seconds for the reply to address to be validated anyway.
2020-01-07 12:03:32 +00:00
Leo Hemsted
91adadfed0 dont reassign os.environ
os.environ is an `environ` object, not a dict. by only interacting with
it through builtin functions we can ensure it remains properly
accessible to third party libraries which might interact with it in
different ways.

See https://github.com/alphagov/notifications-api/commit/d2441466 for
more detail
2020-01-07 12:03:30 +00:00
Tom Byers
39ec952c45 Merge pull request #3243 from alphagov/turn-on-compatibility-mode-for-govuk-frontend
Turn on compatibility mode for GOVUK Frontend
2020-01-07 11:01:24 +00:00
Tom Byers
024812b49a Turn on compatibility mode for GOVUK Frontend
Automatically fixes a load of known issues that
arise when you use GOVUK Frontend at the same time
as GOVUK Frontend Toolkit, GOVUK Template and
GOVUK Elements.
2020-01-07 10:00:08 +00:00
Chris Hill-Scott
1bb0b6b2f1 Fix incorrect assertion for letter job CSV link
The statement `page.select('[download=download]')` was returning an
empty list because the link on the page has an empty `download`
attribute, rather than it being set to the string `download`.

This commit:
- updates the assertion to find the element on the page
- makes the test more specific by checking where the link goes to, not
  just its exists or lack thereof
2020-01-06 12:56:43 +00:00
Tom Byers
b7af288be2 Merge pull request #3241 from alphagov/fix-logo-svg-fallback-image
Send asset path to Header component
2020-01-06 11:56:17 +00:00
Tom Byers
6726ad31b9 Add test for SVG fallback image path
It's the only resource that uses the `asset_path`
template variable in `template.njk` so this checks
that works as expected.

From feedback on the associated pull request:

https://github.com/alphagov/notifications-admin/pull/3241#issuecomment-571102394
2020-01-06 11:40:12 +00:00