CEC-1230 Datascope opens iframe dashboard (#174)

* CEC-1230 Datascope opens iframe dashboard

* Clean up
This commit is contained in:
John Wu
2022-08-04 11:59:02 -07:00
committed by GitHub
parent 00af90902e
commit 93926d3c01
82 changed files with 1219 additions and 1008 deletions

View File

@@ -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(() => {
@@ -134,7 +111,7 @@ describe("App", () => {
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");

File diff suppressed because it is too large Load Diff