mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-27 04:41:48 +00:00
* Add Security Warning Bar for untrusted notebooks * Update * Another update * Add a snapshot test * UX updates * More updates * Add tests * Update test snapshot * Update string * Update security message
32 lines
784 B
TypeScript
32 lines
784 B
TypeScript
import { shallow } from "enzyme";
|
|
import React from "react";
|
|
import { SecurityWarningBar } from "./SecurityWarningBar";
|
|
|
|
describe("SecurityWarningBar", () => {
|
|
it("renders if notebook is untrusted", () => {
|
|
const wrapper = shallow(
|
|
<SecurityWarningBar
|
|
contentRef={"contentRef"}
|
|
isNotebookUntrusted={true}
|
|
markNotebookAsTrusted={undefined}
|
|
saveNotebook={undefined}
|
|
/>
|
|
);
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
|
|
it("renders if notebook is trusted", () => {
|
|
const wrapper = shallow(
|
|
<SecurityWarningBar
|
|
contentRef={"contentRef"}
|
|
isNotebookUntrusted={false}
|
|
markNotebookAsTrusted={undefined}
|
|
saveNotebook={undefined}
|
|
/>
|
|
);
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|