diff --git a/.env.cec-euprd b/.env.cec-euprd index 5fb535f..ce0d31a 100644 --- a/.env.cec-euprd +++ b/.env.cec-euprd @@ -7,4 +7,5 @@ REACT_APP_MAGNA_GROUP_ID=68273225-9da4-4fa7-aea5-38e16ec471fe REACT_APP_OTA_SERVICE_URL=https://gw.cec-euprd.fiskerinc.com/ota_update REACT_APP_SECURITY_DLL_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_32.dll REACT_APP_SECURITY_DLL_64_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_64.dll +REACT_APP_STATIC_DASHBOARDS_URL=https://assets.fiskerdps.com/dashboards REACT_APP_SUPERSET_URL=https://superset.cec-euprd.fiskerinc.com diff --git a/.env.cec-prd b/.env.cec-prd index 67d8f04..dab893b 100644 --- a/.env.cec-prd +++ b/.env.cec-prd @@ -7,4 +7,5 @@ REACT_APP_MAGNA_GROUP_ID=68273225-9da4-4fa7-aea5-38e16ec471fe REACT_APP_OTA_SERVICE_URL=https://gw.cec-prd.fiskerinc.com/ota_update REACT_APP_SECURITY_DLL_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_32.dll REACT_APP_SECURITY_DLL_64_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_64.dll +REACT_APP_STATIC_DASHBOARDS_URL=https://assets.fiskerdps.com/dashboards REACT_APP_SUPERSET_URL=https://superset.cec-prd.fiskerinc.com diff --git a/.env.dev b/.env.dev index 25f1da8..1e54e5b 100644 --- a/.env.dev +++ b/.env.dev @@ -7,4 +7,5 @@ REACT_APP_MAGNA_GROUP_ID=efcc3025-e2d8-4212-8227-805c7be39d2c REACT_APP_OTA_SERVICE_URL=https://dev-gw.cloud.fiskerinc.com/ota_update REACT_APP_SECURITY_DLL_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_32.dll REACT_APP_SECURITY_DLL_64_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_64.dll +REACT_APP_STATIC_DASHBOARDS_URL=https://assets.fiskerdps.com/dashboards REACT_APP_SUPERSET_URL=https://dev-superset-new.cloud.fiskerinc.com diff --git a/.env.local b/.env.local index 3441980..08e6498 100644 --- a/.env.local +++ b/.env.local @@ -7,4 +7,6 @@ REACT_APP_MAGNA_GROUP_ID=efcc3025-e2d8-4212-8227-805c7be39d2c REACT_APP_OTA_SERVICE_URL=http://localhost/ota_update REACT_APP_SECURITY_DLL_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_32.dll REACT_APP_SECURITY_DLL_64_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_64.dll +REACT_APP_STATIC_DASHBOARDS_URL=https://assets.fiskerdps.com/dashboards REACT_APP_SUPERSET_URL=https://dev-superset-new.cloud.fiskerinc.com + diff --git a/.env.prd b/.env.prd index f075c03..e876224 100644 --- a/.env.prd +++ b/.env.prd @@ -7,4 +7,5 @@ REACT_APP_MAGNA_GROUP_ID=68273225-9da4-4fa7-aea5-38e16ec471fe REACT_APP_OTA_SERVICE_URL=https://gw.cloud.fiskerinc.com/ota_update REACT_APP_SECURITY_DLL_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_32.dll REACT_APP_SECURITY_DLL_64_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_64.dll +REACT_APP_STATIC_DASHBOARDS_URL=https://assets.fiskerdps.com/dashboards REACT_APP_SUPERSET_URL=https://superset.cloud.fiskerinc.com diff --git a/.env.stg b/.env.stg index ad05398..33c3843 100644 --- a/.env.stg +++ b/.env.stg @@ -7,4 +7,5 @@ REACT_APP_MAGNA_GROUP_ID=68273225-9da4-4fa7-aea5-38e16ec471fe REACT_APP_OTA_SERVICE_URL=https://stg-gw.cloud.fiskerinc.com/ota_update REACT_APP_SECURITY_DLL_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_32.dll REACT_APP_SECURITY_DLL_64_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_64.dll +REACT_APP_STATIC_DASHBOARDS_URL=https://assets.fiskerdps.com/dashboards REACT_APP_SUPERSET_URL=https://stg-superset.cloud.fiskerinc.com diff --git a/src/components/App/App.test.js b/src/components/App/App.test.js index b118fc8..9e4b062 100644 --- a/src/components/App/App.test.js +++ b/src/components/App/App.test.js @@ -126,6 +126,10 @@ describe("App", () => { await check("/tools/security-dll", "span.MuiButton-label", "Sign In"); }); + it("Route /dashboards/0 unauthenticated", async () => { + await check("/dashboards/0", "span.MuiButton-label", "Sign In"); + }); + it("Route /page-not-found unauthenticated", async () => { await check("/page-not-found", "h1", "Page Not Found"); }); @@ -200,4 +204,15 @@ describe("App", () => { setToken(TEST_AUTH_OBJECT_MAGNA); await sleepAndCheck("/tools/security-dll", "h6", "Security.dll Download"); }); + + it("Route /dashboards/0 authenticated", async () => { + setToken(TEST_AUTH_OBJECT_FISKER); + await check("/dashboards/0", "h6", "Datascope"); + }); + + // test bad dashboard + it("Route /dashboards/1000 authenticated", async () => { + setToken(TEST_AUTH_OBJECT_FISKER); + await check("/dashboards/1000", "span.error", "Invalid Dashboard"); + }); }); diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap index 5d1be1a..804babf 100644 --- a/src/components/App/__snapshots__/App.test.js.snap +++ b/src/components/App/__snapshots__/App.test.js.snap @@ -269,67 +269,95 @@ exports[`App Route / authenticated 1`] = ` /> -
  • -
    + +
  • - -
    -
    - - Datascope - -
    - - - -
  • + class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock" + > + Datascope + + + + + + + +
  • `; +exports[`App Route /dashboards/0 authenticated 1`] = ` +
    +
    +
    +
    + +
    + +
    +
    +
    +