Skip to content

Commit

Permalink
SWED-2339 update jest test snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
goldenraphti committed May 7, 2024
1 parent b8a69a8 commit 100626f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 237 deletions.
Original file line number Diff line number Diff line change
@@ -1,237 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Documentation: Dialog Example renders 1`] = `
Array [
<h2
id="overview"
>
Example
</h2>,
<div
className="showcase-panel"
>
<button
className="btn btn-primary"
data-dialog-open="demo-dialog"
type="button"
>
Open dialog
</button>
<dialog
aria-describedby="aria-describe-dia"
aria-labelledby="aria-label-dia"
aria-modal="true"
id="demo-dialog"
open={false}
>
<header>
<h4>
Delete
</h4>
<button
aria-label="Close dialog"
className="dialog-close"
data-dialog-close={true}
type="button"
/>
</header>
<div
className="dialog-body"
>
<p>
You’re about to permanently delete
<i>
German Swashbuckle (456)?
</i>
</p>
</div>
<footer>
<button
className="btn btn-secondary"
data-dialog-close={true}
type="button"
>
Cancel
</button>
<button
className="btn btn-primary"
type="button"
>
Delete
</button>
</footer>
</dialog>
</div>,
<figure>
<div
className="code-view"
>
<header
className="code-view-header"
>
HTML
<button
aria-describedby="tooltipCopy"
className="tooltip"
onClick={[Function]}
>
<i
aria-hidden="true"
className="at-clipboard small"
/>
<div
id="tooltipCopy"
role="tooltip"
>
Copy to clipboard
</div>
</button>
</header>
<table
className="code-view-table"
>
<tbody>
<tr>
<td
className="code-view-numbers"
>
<pre>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre>
</td>
<td
className="code-view-code"
>
<pre>
&lt;button class="btn btn-primary" type="button" data-dialog-open="demo-dialog"&gt;
Open dialog
&lt;/button&gt;
&lt;dialog id="demo-dialog" aria-modal="true" aria-labelledby="aria-label-dia" aria-describedby="aria-describe-dia"&gt;
&lt;header&gt;
&lt;h4&gt;Delete&lt;/h4&gt;
&lt;button type="button" class="dialog-close" aria-label="Close dialog" data-dialog-close="true"&gt;&lt;/button&gt;
&lt;/header&gt;
&lt;div class="dialog-body"&gt;
&lt;p&gt;You’re about to permanently delete &lt;i&gt;German Swashbuckle (456)?&lt;/i&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;footer&gt;
&lt;button class="btn btn-secondary" type="button" data-dialog-close="true"&gt;Cancel&lt;/button&gt;
&lt;button class="btn btn-primary" type="button"&gt;Delete&lt;/button&gt;
&lt;/footer&gt;
&lt;/dialog&gt;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</figure>,
]
`;

exports[`Documentation: Dialog HowItWorks renders 1`] = `
Array [
<h2
Expand Down
2 changes: 1 addition & 1 deletion src/App/ComponentsDocumentation/components/Dialog/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from "react";
import React, { useState, useEffect } from "react";
import { Link } from "react-router-dom";

import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import renderer from "react-test-renderer";

import Dialog, { HowItWorks, Example, JavascriptMethods } from "./index";
import Dialog, { HowItWorks, Overview, JavascriptMethods } from "./index";

describe("Documentation: Dialog", () => {
it("is defined", () => {
Expand All @@ -26,13 +26,13 @@ describe("Documentation: Dialog", () => {
});
});

describe("Example", () => {
describe("Overview", () => {
it("is defined", () => {
expect(Example).toBeDefined();
expect(Overview).toBeDefined();
});

it("renders", () => {
const wrapper = renderer.create(<Example />);
const wrapper = renderer.create(<Overview />);

expect(wrapper.toJSON()).toMatchSnapshot();
});
Expand Down

0 comments on commit 100626f

Please sign in to comment.