Skip to content

Commit

Permalink
test(toast): first basic toast
Browse files Browse the repository at this point in the history
Signed-off-by: Machiko Yasuda <[email protected]>
  • Loading branch information
Machiko Yasuda committed Sep 25, 2019
1 parent 6e0192c commit 4d6ccbf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package/src/components/Toast/Toast.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { render } from "../../tests/index.js";
import Toast from "./Toast";

test("basic snapshot - only default props", () => {
const { asFragment } = render(<Toast message="Test message"/>);
const { asFragment } = render(<Toast message="Test message" open/>);
expect(asFragment()).toMatchSnapshot();
});
22 changes: 21 additions & 1 deletion package/src/components/Toast/__snapshots__/Toast.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`basic snapshot - only default props 1`] = `<DocumentFragment />`;
exports[`basic snapshot - only default props 1`] = `
<DocumentFragment>
<div
class="MuiSnackbar-root MuiSnackbar-anchorOriginBottomCenter"
>
<div
class="MuiTypography-root MuiPaper-root MuiPaper-elevation6 MuiSnackbarContent-root makeStyles-info-10 MuiTypography-body2"
direction="up"
props="[object Object]"
role="alertdialog"
style="opacity: 1; transform: scale(1, 1); transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
>
<div
class="MuiSnackbarContent-message"
>
Test message
</div>
</div>
</div>
</DocumentFragment>
`;

0 comments on commit 4d6ccbf

Please sign in to comment.