Commit Graph

316 Commits

Author SHA1 Message Date
Kenneth Kehl
c67407f090 fix some tests 2024-08-23 12:59:00 -07:00
Jonathan Bobel
8ca32f476c 810 - Content updates to link area in Send Message flow 2024-03-26 11:23:39 -04:00
Carlo Costino
d5daab67cf Fixes tests to match recent notifications-utils updates
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-01-24 15:35:09 -05:00
Kenneth Kehl
bc32c62dc6 flake8 2023-12-15 07:20:34 -08:00
Carlo Costino
56b3cd9fd5 Fixed failing test given new character handling in utils update
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2023-12-13 12:04:56 -05:00
Carlo Costino
93d5e0a124 Merge pull request #965 from GSA/893-copy-existing-template
893 copy existing template
2023-12-04 16:33:51 -05:00
Jonathan Bobel
bf10a2bc53 Fixing the tests to pass 2023-12-04 12:42:15 -05:00
Kenneth Kehl
da3fa99c52 merge from main 2023-11-29 07:26:43 -08:00
Kenneth Kehl
1cacd3b850 update warning message, fix tests 2023-11-28 07:42:33 -08:00
Kenneth Kehl
d10d3f7c00 maybe fix tests? Or else calculations are all wrong 2023-11-22 12:37:57 -08:00
Kenneth Kehl
36987e7202 notify-api-861 show eastern time 2023-11-16 12:24:27 -08:00
Kenneth Kehl
bd2ea81081 more fixes 2023-10-26 11:38:03 -07:00
Carlo Costino
72c8a46b8c Reformatted a handful more tests
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2023-10-12 10:24:48 -04:00
Jonathan Bobel
57ec11d7c5 816 - Change "Prepare to send" button text 2023-10-06 13:13:18 -04:00
Jonathan Bobel
d6205bc1ff 835 - Change "new template" wording 2023-10-03 11:14:21 -04:00
Kenneth Kehl
8c9721d8e2 notify-api-412 use black to enforce python coding style 2023-08-25 09:12:23 -07:00
Jonathan Bobel
6b22c347da Got the tests to pass, so doing a commit 2023-08-15 13:22:39 -04:00
Jonathan Bobel
ff33c7c7f9 Fixing tests 2023-08-14 15:29:10 -04:00
Jonathan Bobel
242c7acd34 Changing U.S. Notify to Notify.gov (#656) 2023-07-28 11:12:46 -04:00
Andrew Shumway
34fef6954c Added UTC to formatter return strings and appropriate tests (#617)
Co-authored-by: Andrew Shumway <ashumway@flexion.us>
2023-07-27 11:22:05 -04:00
Steven Reilly
13d0e46b52 blunt rename of org (#620) 2023-07-12 12:09:44 -04:00
Kenneth Kehl
20a0bd5c99 merge from main 2023-07-05 15:07:38 -07:00
Carlo Costino
9f88af0ac2 Fix create and update template method calls
The removal of the process_type argument was causing a couple of the method calls to break since they were still sending in the argument.  This commit fixes that and updates the corresponding tests as well.

h/t @terrazoon for uncovering the touchpoints originally!

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2023-07-03 15:06:06 -04:00
Kenneth Kehl
7168309fbb fix all tests 2023-06-26 14:07:28 -07:00
Kenneth Kehl
aa0f15c1b2 notify-552 remove option to use priority queue from UI 2023-06-20 08:37:56 -07:00
Carlo Costino
92d25f5a69 Convert frontend display to be just UTC (#540)
This changeset converts the display of dates and times to be just UTC to match the recent changes in the backend.  This unwinds a bit of work that was done previously and allows us to start with a clean slate in how we want to approach displaying dates and times going forward. It also adds a bit of explanatory text to help users.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
Co-authored-by: stvnrlly <steven.reilly@gsa.gov>
2023-06-12 15:49:48 -04:00
Jonathan Bobel
e0d2d74067 Update dashboard and template flow (#514)
* Updated header and footer
* Moved files around and updated gulpfile to correct the build process when it goes to production
* Updated fonts
* Adjusted grid templating
* Adding images to assets
* Updated account pages, dashboard, and pages in message sending flow
* Updated the styling for the landing pages in the account section once logged in
2023-06-08 13:12:00 -04:00
Jonathan Bobel
68e94dd650 Addressing most of the low-lift items from the Notify content audit (#491) 2023-05-08 10:49:30 -04:00
Ryan Ahearn
73a3511ef2 Remove uses of inline-styles 2023-03-08 09:08:07 -05:00
Ryan Ahearn
7d08e9e0d4 Upgrade flask and install newrelic package 2023-01-19 17:29:21 -05:00
Tim Lowden
f8daea1879 Updating for US English
Words found:
personalis*
customis*
organis*
colour
behaviour
2022-12-20 09:44:33 -05:00
stvnrlly
40368fe819 Merge branch 'main' into stvnrlly-paperless 2022-12-09 12:33:16 -05:00
stvnrlly
b6bc02eb6b us → u.s. 2022-12-06 11:03:47 -05:00
stvnrlly
944715ac46 big commit with letters removal 2022-12-05 15:33:44 -05:00
stvnrlly
244c524809 test updates for no-email template creation 2022-12-02 14:04:54 -05:00
Ryan Ahearn
dd90d82942 Use naive datetimes for format_delta math 2022-11-30 16:42:42 -05:00
stvnrlly
77c0faf4e5 more test fixes, one test remaining 2022-11-28 13:51:37 -05:00
stvnrlly
f16b5dd1c4 remove broadcast-related code 2022-10-04 03:04:13 +00:00
Ryan Ahearn
68129bc9f4 Address flake8 issues 2022-08-09 14:14:49 +00:00
jimmoffet
dad051a662 2767 passing 2022-08-05 00:25:03 -07:00
Chris Hill-Scott
8b7f2fbf04 Stop using _external=True in tests
It looks like, by default, Flask no longer makes full URLs, for example
`https://example.com/path`. Instead it does `/path`. This will still
work fine, and if anything is better because it reduces the number of
bytes of HTML we are sending.

It won’t mean that requests go over `http` instead of `https` without
the protocol because we set the appropriate HSTS header here:
0c57da7781/ansible/roles/paas-proxy/templates/admin.conf.j2 (L11)

This commit changes all our tests to reflect that URLs no longer have
the protocol and domain in them. `_external=True` is Flask’s way of
saying whether a URL should be generated with the domain and protocol
(`True`) or without it (`False`).

Again, I can’t find the changelog or diff where this was introuduced,
but if you’d like to go spelunking then here’s a starting point:
50374e3cfe/src/flask/helpers.py (L192)
2022-06-06 12:12:52 +01:00
Katie Smith
b5fa270cd2 Bump all test dependencies
This results in some new errors from flake8-bugbear:
```
B020: Loop control variable overrides iterable it iterates
```
I can't see an issue with the places that we do this, so have ignored
these warnings. If we keep getting these and they look fine, we can
create a global rule to ignore B020.
2022-04-06 12:17:09 +01:00
Katie Smith
4226193346 Split up the branding_request endpoint
The endpoint used to handle both email and letter branding, but this
replaces `.branding_request` with `.email_branding_request` and
`.letter_branding_request` instead. This is in preparation for changing
how email branding works.

The `from_template` arg was only possible for letter branding, so I've
removed that from the `.email_branding_request` endpoint.
2022-02-03 09:59:21 +00:00
Chris Hill-Scott
6540701aa7 Replace uses of client to set request context
Some tests use the `client` fixture but don’t call any of its methods.
The reason for doing this is because the test depends on something in
the request context.

This commit replaces all those instances with `client_request`, which
also sets the request context.

These tests are the last ones that still use the `client` fixture. By
replacing it with `client_request` we will be able to say that no tests
should be using the `client` fixture directly.
2022-01-10 14:39:46 +00:00
Chris Hill-Scott
07318b2d11 Replace instances of client.login with client_request
We have a `client_request` fixture which does a bunch of useful stuff
like:
- checking the status code of the response
- returning a `BeautifulSoup` object

Lots of our tests still use an older fixture called `client`. This is
not as good because it:
- returns a raw `Response` object
- doesn’t do the additional checks
- means our tests contain a lot of repetetive boilerplate like `page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')`

This commit converts all the tests which had a `client.login(…)`
statement to use `client_request` (which is already logged in by
default).

Subsequent commits will remove uses of `client` in other tests, but
doing it this way means the work can be broken up into more manageable
chunks.
2022-01-10 14:39:45 +00:00
Chris Hill-Scott
8b93a977a0 Remove temporary raw_response argument
We added a new argument to `client_request.get` and
`client_request.post` to specify that it should return a raw `Response`
object rather than an instance of `BeautifulSoup`.

This is useful because sometimes we need to look at stuff like the
response headers.

However it turns out we already have a separate method for this, so
rather than invent something new I think it’s better to stick with the
thing we already have.
2022-01-10 14:39:45 +00:00
Chris Hill-Scott
0706664be4 Stop using logged_in_client fixture
We have a `client_request` fixture which does a bunch of useful stuff
like:
- checking the status code of the response
- returning a `BeautifulSoup` object

Lots of our tests still use an older fixture called `logged_in_client`.
This is not as good because:
- it returns a raw `Response` object
- doesn’t do the additional checks
- means our tests contain a lot of repetetive boilerplate like `page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')`

This commit converts all the tests using `logged_in_client` to:
use `client_request` instead.
2022-01-10 14:39:44 +00:00
Chris Hill-Scott
50eae6f935 Stop using platform_admin_client fixture
We have a `client_request` fixture which does a bunch of useful stuff
like:
- checking the status code of the response
- returning a `BeautifulSoup` object

For most tests of a platform admin view we used `platform_admin_client`
instead. This is not as good because it returns a raw `Response` object
and doesn’t do the additional checks.

This commit converts all the tests using `platform_admin_client` to:
use new `client_request` and log in as `platform_admin_user` before
making any requests.

This is also nice because it makes any test easy to parametrize with
additional users, for example to test differences in behaviour dependant
on being platform admin or not.
2022-01-10 14:39:40 +00:00
Chris Hill-Scott
3df49acb73 Add test coverage for link button on template page 2021-11-24 16:35:34 +00:00
Leo Hemsted
85f6881a56 rename api key component to copy_to_clipboard
does what it says on the tin, and is also consistent with prior art:
https://components.publishing.service.gov.uk/component-guide/copy_to_clipboard
2021-09-08 10:18:17 +01:00