Commit Graph

8893 Commits

Author SHA1 Message Date
Rebecca Law
a4fed667e4 Updated to reflect change in API key in json result. 2019-12-27 12:40:12 +00:00
Rebecca Law
4c72efd08a Added tests 2019-12-24 14:33:52 +00:00
Rebecca Law
0273eea0cc Add email address and uploaded_letter 2019-12-24 11:22:12 +00:00
Rebecca Law
729281532d Added returned-letter-summary page.
This page displays a list of available reports, a report is a set of returned lettters that have been reported on the same day.
Each line of the page is a link that can download the report.

I'm not sure the format of the csv is right. The data might be confusing especially if the service has a mix of precompiled templates and jobs.
Units tests are still to come.
2019-12-24 08:44:56 +00:00
Rebecca Law
e2d979f199 New pages to show a summary of all the reports the services has for its returned letters 2019-12-24 08:44:56 +00:00
David McDonald
4a17c461e2 Merge pull request #3232 from alphagov/revert-3228-pip-accel
Revert "Remove pip-accel"
2019-12-23 11:57:04 +00:00
David McDonald
8ce1917740 Revert "Remove pip-accel" 2019-12-23 11:49:32 +00:00
David McDonald
b3cf9e301f Merge pull request #3228 from alphagov/pip-accel
Remove pip-accel
2019-12-23 11:41:45 +00:00
Tom Byers
869bd16536 Merge pull request #3225 from alphagov/fix-details
Add GOV.UK Frontend details component - second attempt
2019-12-23 09:47:56 +00:00
David McDonald
807c83c656 Remove coveralls
We don't use it
2019-12-20 16:58:45 +00:00
David McDonald
4c9c98afb4 Remove forcing of venv
Let's developers do this themselves using virtualenvwrapper
2019-12-20 16:57:25 +00:00
Katie Smith
31a23216aa Merge pull request #3231 from alphagov/pytest-5
More Pytest 5 fixes
2019-12-20 16:56:28 +00:00
Rebecca Law
b6b4e34ecc Merge pull request #3230 from alphagov/remove-analytics
Remove analytics
2019-12-20 16:14:23 +00:00
Rebecca Law
e0f9af8107 Update the javascript to work for www, non-www, and localhost 2019-12-20 16:00:23 +00:00
Katie Smith
3e83638193 Stop calling mock_get_notification fixture as a function
Instead of using `mock_get_notification` to create a notification then
mock it in the tests, a new function, `create_notification`, can be used
to create a custom notification to be mocked. Using this in the
`test_notifications.py` file makes it Pytest 5 compatible.
2019-12-20 15:48:25 +00:00
Katie Smith
6bc4f1898f Fix mock_get_organisation_by_domain and mock_get_service_organisation
This commits stops the `mock_get_organisation_by_domain` and
`mock_get_service_organisation` fixtures from being called like
functions.
2019-12-20 15:02:47 +00:00
Katie Smith
41d33b2995 Stop reply_to address fixtures from being called like functions
This stops most instances of the fixtures which return sms senders,
email reply to addresses or letter contact blocks from being called as
if they were functions in the tests by replacing them with functions
which return the same results.

This change allows a couple of fixtures which are now longer used to be
deleted.
2019-12-20 14:59:44 +00:00
Tom Byers
751cca9f7d Add code to delete old analytics cookies 2019-12-20 14:52:02 +00:00
Tom Byers
53ced660ac Remove analytics cookies from all pages 2019-12-20 14:51:43 +00:00
Katie Smith
ccd245b287 Merge pull request #3229 from alphagov/pytest-5
Increase the number of tests that are Pytest 5 compliant
2019-12-20 10:55:13 +00:00
Katie Smith
e4134072d9 Reduce the errors related to user fixtures
We were using user fixtures in a lot of parameterized tests, but this is
no longer allowed in Pytest 5. To avoid having to split up the parametrized
tests (which would make the test files a lot longer and slightly more
difficult to read) this commit creates functions which return various types
of user json so that we can use these as the test parameters instead.
2019-12-19 16:59:07 +00:00
David McDonald
4ea46f2c71 Remove pip-accel
Not sure how much benefit we are getting from this. Pip-accel has
already not been supported for 3 years now either.
2019-12-19 16:25:01 +00:00
Chris Hill-Scott
e2488ae101 Merge pull request #3227 from alphagov/youtube-no-cookie
Serve video from a domain that doesn’t set cookies
2019-12-19 15:34:51 +00:00
Katie Smith
b62018a8e4 Make a few more test files Pytest 5 compliant 2019-12-19 14:24:25 +00:00
Katie Smith
c6779e6f92 Stop the user fixtures being called as a functions from conftest
Stopped fixtures in conftest.py from calling the fixtures which return
user json as if they were functions. Deleted two fixtures that are now no
longer needed as a result of the changes to conftest.py.
2019-12-19 14:24:25 +00:00
Katie Smith
02253d32c5 Update user_json test function
Since we can't call the `api_user_active` fixture as a function with
Pytest 5, the `user_json` function can be used instead. This updates
the function to
- Stop returning `max_failed_login_count` since this is not a field that
gets returned from the api
- Return fields as strings, not UUIDS, to match the format that api
returns the data in
- Provide a way to use this function to return a user with no
permissions
2019-12-19 14:24:25 +00:00
Katie Smith
aec3ccff3a Fix navigation tests to not call app_() directly 2019-12-19 14:24:25 +00:00
Chris Hill-Scott
eb87548632 Serve video from a domain that doesn’t set cookies
Then it’s one less cookie we have to get users to opt in to. We don’t
derive any value from Youtube setting cookies.

`youtube-nocookie.com` is a domain provided by Google for this purpose.
2019-12-19 13:43:44 +00:00
Chris Hill-Scott
1925f78cec Merge pull request #3226 from alphagov/strip-whitespace-sms
Strip extra newlines from text messages
2019-12-19 13:20:56 +00:00
Chris Hill-Scott
b9ba95daf2 Strip extra newlines from text messages
Brings in:
- [x] https://github.com/alphagov/notifications-utils/pull/680
2019-12-18 10:33:18 +00:00
Tom Byers
d55b3caa46 Disable tel number detection on IOS
Any string pattern identifiable as a telephone
number is turned into a link on IOS devices by
default.

We use telephone numbers in several ways, in
particular to link to sms notifications, so need
this behaviour turned off unless specifically
required.
2019-12-17 12:29:51 +00:00
Chris Hill-Scott
21b85d7343 Merge pull request #3223 from alphagov/tell-api-users-they-can-search-by-reference
Tell API users they can search by reference
2019-12-17 11:32:31 +00:00
Tom Byers
afd3fe5781 Include details JS 2019-12-17 10:28:14 +00:00
Tom Byers
84f90a7e1c Remove redundant details polyfill
We're now using the GOV.UK Frontend one.
2019-12-17 10:27:15 +00:00
Tom Byers
5dce31fc55 Correct platform admin details summary text 2019-12-17 10:27:15 +00:00
Tom Byers
146d5cc07a Fix test broken by HTML changes on API page
I moved the meta for each message into the
`<h3>` in each `<summary>` to make the heading
unique. This broke the test.
2019-12-17 10:27:10 +00:00
Tom Byers
d13db305c1 Convert <details> on API page to macro HTML
The GOV.UK Frontend details component macro
  wraps its `<summary>` text in a `<span>`.

  We put a `<h3>` in the `<summary>` (actually valid
  use, based on the spec) so this breaks when the
  `<span>` wraps it.

  This converts the existing `<details>` tag to use
  all the class names the macro creates, but with
  all the `<summary>` contents in the `<h3>`.

  Also adds font-smoothing to the messages on the
  API page. This was previously set globally for
  all fonts in the GOV.UK Template CSS but is now
  just set for the New Transport 'nta' font.
  Included because the messages use the monospace
  font so don't have it by default.
2019-12-17 10:26:16 +00:00
Tom Byers
810e880bb5 Update all, but one, <details> to component
Includes:

- in gulpfile.js:
  - add details macro to list of those copied from GOVUK Frontend
  - remove existing details polyfill
- convert all, but one, <details> tags to use GOVUK Frontend details component
- add jinja boolean filter to help setting 'open' attribute of <details> tags

Notes on the `<details>` not included in this:

The `<details>` used for notifications items on
the API integration page is not possible to
reproduce with the GOV.UK Frontend macro so I'm
splitting the resulting work out into it's own
commit.
2019-12-17 10:26:16 +00:00
Chris Hill-Scott
4da9c44919 Tell users that they can search by reference
Users who have an API integration (and therefore have a way of passing
in a reference for each notification) can now search by that reference
(see https://github.com/alphagov/notifications-api/pull/2682)

This commit changes the label on the search box to tell these users that
this is possible, without changing the label for users without an API
integration, who might get confused by what ‘reference’ means.

It also makes the label consistently say ‘email address or phone number’
(ie email address is first) because this is our content style.
2019-12-17 10:19:19 +00:00
Tom Byers
fe0ad50466 Merge pull request #3224 from alphagov/revert-3209-add-govuk-frontend-details
Revert "Add GOVUK Frontend details component"
2019-12-16 16:28:00 +00:00
Tom Byers
de6281bc0e Revert "Add GOVUK Frontend details component" 2019-12-16 16:20:03 +00:00
Tom Byers
60fe9d3400 Merge pull request #3209 from alphagov/add-govuk-frontend-details
Add GOVUK Frontend details component
2019-12-16 15:22:15 +00:00
Chris Hill-Scott
9c47a2ce8f Merge pull request #3222 from alphagov/fix-days-provider-history
Fix off-by-one dates on provider history
2019-12-13 13:29:56 +00:00
Chris Hill-Scott
581296b95e Fix off-by-one dates on provider history
We chunk history entries by their YYYY-MM-DD date representation to
display them day-by-day.

However trying to convert a YYYY-MM-DD string into a timestamp is
unpredictable, and was causing our dates to be one day out (probably
because of midnight/daylight savings/general datetime horrors).

This commit changes the code to do the same thing as the history page,
which is look at the `updated_at` field on the first entry to get a
datetime object and from that the formatted date we show in the headings
on the page.
2019-12-13 13:20:56 +00:00
Chris Hill-Scott
1e233f1167 Merge pull request #3217 from alphagov/provider-priority
Display and set provider priority in a non-independent way
2019-12-13 10:19:44 +00:00
Tom Byers
96bc4d2fd7 Remove redundant details polyfill
We're now using the GOV.UK Frontend one.
2019-12-13 09:50:04 +00:00
Tom Byers
fba4c173ff Correct platform admin details summary text 2019-12-13 09:41:34 +00:00
Chris Hill-Scott
1bd27b97f6 Remove change link from international SMS provider
We don’t want to set it independently from the other SMS providers.
2019-12-12 14:34:04 +00:00
Chris Hill-Scott
292b7df5a8 Add named variables for clarity 2019-12-12 14:16:38 +00:00
Chris Hill-Scott
b1e9dd3fb2 Remove redundant class 2019-12-12 13:58:57 +00:00