Commit Graph

273 Commits

Author SHA1 Message Date
Beverly Nguyen
34ea3812d6 added new test table to dashboard 2024-01-09 15:48:16 -08:00
Beverly Nguyen
653c7d8624 fix style checks 2024-01-08 15:33:24 -08:00
Beverly Nguyen
ec1d9a49bf updated dashboard 2024-01-08 14:53:34 -08:00
Beverly Nguyen
751947c421 updated dashboard.py def 2024-01-05 12:45:21 -08:00
Kenneth Kehl
d218fd2178 notify-admin-529 remove provider view 2023-12-06 13:40:15 -08:00
Kenneth Kehl
7e33178b1c Merge pull request #929 from GSA/notify-admin-861
Change timezone displays to Eastern time
2023-11-22 10:49:16 -08:00
Jonathan Bobel
e4c97e925f Adding a test for the dashboard usage area 2023-11-21 15:38:41 -05:00
Kenneth Kehl
36987e7202 notify-api-861 show eastern time 2023-11-16 12:24:27 -08:00
Jonathan Bobel
6cee00929e Fixed tests 2023-11-16 12:26:35 -05:00
Carlo Costino
26031cb1b2 Merge pull request #892 from GSA/800-combine-and-style-quota-displays
800 - combine and style quota displays
2023-11-02 17:16:39 -04:00
Andrew Shumway
591961413a Added mock api call to appropriate tests 2023-11-02 16:28:09 -04:00
Jonathan Bobel
600114fa4f Fixing tests 2023-11-01 10:38:50 -04:00
Carlo Costino
d2411e6cbe Updated a few more tests
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2023-10-12 10:24:49 -04:00
Jonathan Bobel
c7e05246b1 808 - formatted annual usage section 2023-10-02 15:12:36 -04:00
Jonathan Bobel
3ed4af79c7 Small content change for this test 2023-09-15 14:55:01 -04:00
Jonathan Bobel
2e16d8d31b Updates after merging black 2023-08-28 12:12: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
d9e5709a0f Removing the section that calculated the count bar for templates and simplified 2023-08-04 14:23:19 -04:00
Jonathan Bobel
27a193160f 619 - Removing all mention of emails from the pilot (#615) 2023-07-28 11:03:37 -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
7168309fbb fix all tests 2023-06-26 14:07:28 -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
7d08e9e0d4 Upgrade flask and install newrelic package 2023-01-19 17:29:21 -05:00
Ryan Ahearn
2ad21a6f4f Replace UK phone numbers in tests with US numbers 2023-01-06 11:19:56 -05:00
stvnrlly
944715ac46 big commit with letters removal 2022-12-05 15:33:44 -05:00
stvnrlly
33eaa60e5b mock the api call 2022-12-02 11:27:41 -05:00
stvnrlly
a8b8d09fb7 post-gray test updates 2022-12-02 10:30:37 -05:00
Ryan Ahearn
dd90d82942 Use naive datetimes for format_delta math 2022-11-30 16:42:42 -05:00
stvnrlly
a2b58c926e more test fixes & letter trimming 2022-11-22 22:50:47 -05:00
stvnrlly
44e8c0fe89 post-merge flake8 fix 2022-10-17 13:42:36 +00:00
Steven Reilly
3cabdf4f38 Merge branch 'main' into stvnrlly-hide-letters 2022-10-14 15:33:01 -04:00
stvnrlly
38fa1286b2 clean up admin ui & update tests 2022-10-14 18:58:55 +00:00
stvnrlly
067b4b3742 swap dollar symbols for pound symbols 2022-10-12 20:16:22 +00:00
jimmoffet
b7435aefed clean up comments 2022-09-13 13:18:25 -07:00
jimmoffet
24c9854ca6 testing for get_jobs in service dashboard 2022-09-13 13:16:17 -07:00
jimmoffet
69abec0bb3 change dashboard test to reflect demo changes to uploads view 2022-09-09 17:02:48 -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
Ben Thorner
bb0fb73bc8 Minor tweaks in response to PR comments
In response to [^1] and [^2].

[^1]: https://github.com/alphagov/notifications-admin/pull/4229#discussion_r869181152
[^2]: https://github.com/alphagov/notifications-admin/pull/4229#discussion_r869186063
2022-05-10 17:00:51 +01:00
Ben Thorner
3449ccd923 Support multiple SMS rates per month on usage page 2022-05-03 16:01:13 +01:00
Ben Thorner
75e0d53e76 Simplify test for only showing historic months
This goal wasn't clear from the original test, which was checking
the entire return value, even though this is covered implicitly by
tests of the usage page itself.
2022-05-03 16:01:12 +01:00
Ben Thorner
c05502835b Simplify monthly letter breakdown ordering test
This doesn't need to test variable rates for every postage class,
which is more an aspect of grouping. It only needs to check that
some out-of-order usage gets reordered appropriately.
2022-05-03 16:01:11 +01:00
Ben Thorner
63c35ec3d9 Remove redundant test for letter usage breakdown
This is covered sufficiently by the main "test_usage" assertions,
which prove the usage is broken down by postage.

I don't think we need to explicitly test the usage is broken down
by month as we already prove this for SMS and we also check the
usage is associated with the correct month in the "ordering" test.
2022-05-03 16:01:10 +01:00
Ben Thorner
fb7c116046 Finish migration from billing_units to API fields
This is now only used for letters and represents the number sent
[^1].  We could use the chargeable_units field, but using "_sent"
is more consistent with the annual attributes [^2].

In fact, chargeable_units isn't actually used anywhere, but I've
kept it in the test data as it is part of the real API and helps
clarify the other values for SMS - free vs. charged.

Note: for SMS I've used an arbitrary "1234" for "chargeable_units"
to indicate it's not used and may be different to the number sent -
for SMS it's related to the number of fragments.

[^1]: bb62d22f25/app/dao/fact_billing_dao.py (L339)
[^2]: 3a1ac189ff/app/main/views/dashboard.py (L339)
2022-05-03 16:01:08 +01:00
Ben Thorner
c0ee24ff19 Migrate letter cost calculation to use API field
The values in the tests are calculated manually from other fields
in the mocked API response.
2022-05-03 16:01:07 +01:00
Ben Thorner
d798a0d60f Replace manual SMS monthly calculations with API
This starts using the sms_{cost, charged, free_allowance_used}
fields in the new API to replace the "get_free_paid_breakdown"
function we had before, which could not support multiple rates.

In order to use "get_free_paid_breakdown" the calling method had
to store a "cumulative" variable to calculate the free allowance
used so far, which is now done by the API.

To calculate the data for conftest.py, I had to start from the
bottom ("April") and manually calculate the free allowance used
to emulate the API - this is what "cumulative" used to do.
2022-05-03 16:01:06 +01:00
Ben Thorner
f6dc30665f Reorder monthly usage assertions (group by month)
This also removes an extremely confusing assertion of "40" free
messages, which was passing because we have "140" free messages.
2022-05-03 16:01:04 +01:00