diff --git a/.env.dev b/.env.dev index add2ed2..b51cbe0 100644 --- a/.env.dev +++ b/.env.dev @@ -2,4 +2,4 @@ REACT_APP_CERT_SERVICE_URL=https://dev-gw.cloud.fiskerinc.com/certificate REACT_APP_AUTH_SERVICE_URL=https://dev-gw.cloud.fiskerinc.com/compute_auth REACT_APP_UPLOAD_SERVICE_URL=https://dev-gw.cloud.fiskerinc.com/ota_update REACT_APP_AUTH_CALLBACK_URL=https://dev-ota-admin.cloud.fiskerinc.com -REACT_APP_SUPERSET_URL=https://dev-superset.cloud.fiskerinc.com +REACT_APP_SUPERSET_URL=https://superset-dev.cloud.fiskerinc.com/superset/dashboard/8/?native_filters_key=KPnPthpLQ8rT--6PUdsPzQAcwnleRGHk_3dg0PVYfrXc3SE6zZ2x0p7JuerAZ0Pg diff --git a/.env.local b/.env.local index e8d2226..5b55344 100644 --- a/.env.local +++ b/.env.local @@ -2,4 +2,4 @@ REACT_APP_AUTH_SERVICE_URL=http://localhost/compute_auth REACT_APP_CERT_SERVICE_URL=http://localhost/certificate REACT_APP_UPLOAD_SERVICE_URL=http://localhost/ota_update REACT_APP_AUTH_CALLBACK_URL=http://localhost:3000 -REACT_APP_SUPERSET_URL=https://dev-superset.cloud.fiskerinc.com +REACT_APP_SUPERSET_URL=https://superset-dev.cloud.fiskerinc.com/superset/dashboard/8/?native_filters_key=KPnPthpLQ8rT--6PUdsPzQAcwnleRGHk_3dg0PVYfrXc3SE6zZ2x0p7JuerAZ0Pg diff --git a/.env.prd b/.env.prd index d8ce7fe..b8da28c 100644 --- a/.env.prd +++ b/.env.prd @@ -2,4 +2,4 @@ REACT_APP_AUTH_SERVICE_URL=https://gw.cloud.fiskerinc.com/compute_auth REACT_APP_CERT_SERVICE_URL=https://gw.cloud.fiskerinc.com/certificate REACT_APP_UPLOAD_SERVICE_URL=https://gw.cloud.fiskerinc.com/ota_update REACT_APP_AUTH_CALLBACK_URL=https://ota-admin.cloud.fiskerinc.com -REACT_APP_SUPERSET_URL=https://superset.cloud.fiskerinc.com +REACT_APP_SUPERSET_URL=https://superset.cloud.fiskerinc.com/superset/dashboard/9/?native_filters_key=mfJ1VjGTcLUKz7gQs_DgClZhjcdNucYMrPruNibcyDnhkDwdHbAumBRVTpA5tFH_ diff --git a/.env.stg b/.env.stg index 70fac71..224b2c2 100644 --- a/.env.stg +++ b/.env.stg @@ -2,4 +2,4 @@ REACT_APP_AUTH_SERVICE_URL=https://stg-gw.cloud.fiskerinc.com/compute_auth REACT_APP_CERT_SERVICE_URL=https://stg-gw.cloud.fiskerinc.com/certificate REACT_APP_UPLOAD_SERVICE_URL=https://stg-gw.cloud.fiskerinc.com/ota_update REACT_APP_AUTH_CALLBACK_URL=https://stg-ota-admin.cloud.fiskerinc.com -REACT_APP_SUPERSET_URL=https://stg-superset.cloud.fiskerinc.com +REACT_APP_SUPERSET_URL=https://stg-superset.cloud.fiskerinc.com/superset/dashboard/6/?native_filters_key=XBwRgJIvmxhqBhqlz45kuTnXc1iUY_M_ovzXCzXy5_l-AOFAXEaGLWpYIsfrEHGR diff --git a/src/components/App/App.test.js b/src/components/App/App.test.js index b78ce25..1c40617 100644 --- a/src/components/App/App.test.js +++ b/src/components/App/App.test.js @@ -17,6 +17,7 @@ import { import { setToken } from "../Contexts/UserContext"; import { TEST_AUTH_OBJECT } from "../../utils/testing"; import App from "."; +import addSnapshotSerializer from "../../utils/snapshot"; const LOADING_STATUS = "Loading..."; @@ -43,32 +44,8 @@ const sleepAndCheck = async (path, selector, compare) => { }; describe("App", () => { - const rxMakeStyles = /makeStyles-(\w+)-(\d+)/gi; - beforeAll(() => { - // Stablize Table Pagination control ids - expect.addSnapshotSerializer({ - test: function (val) { - return val && typeof val === "string" && val.indexOf("mui-") > -1; - }, - print: function (val) { - let str = val; - str = str.replace(/mui-\d*/g, "mui-00000"); - - return `"${str}"`; - }, - }); - expect.addSnapshotSerializer({ - test: (val) => { - return val && typeof val === "string" && val.search(rxMakeStyles) > -1; - }, - print: function (val) { - let str = val; - str = str.replace(rxMakeStyles, "makeStyles-$1-0000"); - - return `"${str}"`; - }, - }); + addSnapshotSerializer(expect); }, 60000); afterEach(() => { @@ -132,6 +109,10 @@ describe("App", () => { await check("/tools/certificates/add", "span.MuiButton-label", "Sign In"); }); + it("Route /tools/sms/send unauthenticated", async () => { + await check("/tools/sms/send", "span.MuiButton-label", "Sign In"); + }); + it("Route /page-not-found unauthenticated", async () => { await check("/page-not-found", "h1", "Page Not Found"); }); @@ -189,4 +170,9 @@ describe("App", () => { setToken(TEST_AUTH_OBJECT); await check("/tools/certificates/add", "h6", "Create Certificate"); }); + + it("Route /tools/sms/send authenticated", async () => { + setToken(TEST_AUTH_OBJECT); + await check("/tools/sms/send", "h6", "Send SMS"); + }); }); diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap index e5d83d8..ed2846f 100644 --- a/src/components/App/__snapshots__/App.test.js.snap +++ b/src/components/App/__snapshots__/App.test.js.snap @@ -6,10 +6,10 @@ exports[`App Route / authenticated 1`] = ` data-testid="mocked-userprovider" >