From 3456bb47a1e2c6b73b98dc5d4bf0d4ebe04b91dd Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 23 Aug 2024 14:01:51 -0700 Subject: [PATCH] move file around --- app/assets/{javascripts => js}/setTimezone.js | 0 app/templates/views/dashboard/dashboard.html | 3 ++- gulpfile.js | 10 ++++++++-- tests/app/main/views/test_dashboard.py | 8 +++++++- 4 files changed, 17 insertions(+), 4 deletions(-) rename app/assets/{javascripts => js}/setTimezone.js (100%) diff --git a/app/assets/javascripts/setTimezone.js b/app/assets/js/setTimezone.js similarity index 100% rename from app/assets/javascripts/setTimezone.js rename to app/assets/js/setTimezone.js diff --git a/app/templates/views/dashboard/dashboard.html b/app/templates/views/dashboard/dashboard.html index 12c0df12f..87299de13 100644 --- a/app/templates/views/dashboard/dashboard.html +++ b/app/templates/views/dashboard/dashboard.html @@ -1,4 +1,4 @@ -

{{ session['timezone'] }}

+ {% extends "withnav_template.html" %} @@ -141,3 +141,4 @@ {% endblock %} + diff --git a/gulpfile.js b/gulpfile.js index 22fcbb487..4d2571eae 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -61,7 +61,6 @@ const javascripts = () => { paths.src + 'javascripts/fileUpload.js', paths.src + 'javascripts/radioSelect.js', paths.src + 'javascripts/updateContent.js', - paths.src + 'javascripts/setTimezone.js', paths.src + 'javascripts/listEntry.js', paths.src + 'javascripts/liveSearch.js', paths.src + 'javascripts/errorTracking.js', @@ -98,6 +97,13 @@ const copyGtmHead = () => { .pipe(dest(paths.dist + 'js/')); }; +// Task to copy `setTimezone.js` +const copySetTimezone = () => { + return src(paths.src + 'js/setTimezone.js') + .pipe(dest(paths.dist + 'js/')); +}; + + // Task to copy images const copyImages = () => { return src(paths.src + 'images/**/*', { encoding: false }) @@ -123,4 +129,4 @@ const copyAssets = async () => { await uswds.copyAssets(); }; -exports.default = series(styles, javascripts, copyGtmHead, copyImages, copyAssets); +exports.default = series(styles, javascripts, copyGtmHead, copySetTimezone, copyImages, copyAssets); diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index 8703adf3a..c04c578f4 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -1757,11 +1757,13 @@ def test_org_breadcrumbs_show_if_user_is_platform_admin( platform_admin_user, client_request, ): + print("ENTER TESET") service_one_json = service_json( SERVICE_ONE_ID, users=[platform_admin_user["id"]], organization_id=ORGANISATION_ID, ) + print("GOT SERVICE ONE") mocker.patch( "app.service_api_client.get_service", return_value={"data": service_one_json} @@ -1783,10 +1785,14 @@ def test_org_breadcrumbs_show_if_user_is_platform_admin( "app.main.views.dashboard.get_daily_stats_by_user", return_value=mock_daily_stats_by_user, ) + print("DID ALL PATCHES") client_request.login(platform_admin_user, service_one_json) + print("LOGGED IN") page = client_request.get("main.service_dashboard", service_id=SERVICE_ONE_ID) - + print("HERE IS THE PAGE") + print(page) + print("XXXXXXXXXXXXXXXXX") assert page.select_one(".navigation-organization-link")["href"] == url_for( "main.organization_dashboard", org_id=ORGANISATION_ID,