Skip to content

Commit d2762bd

Browse files
Mario Aguiarravichdev
authored andcommitted
Add api snapshot
1 parent dd2cb51 commit d2762bd

File tree

2 files changed

+146
-0
lines changed

2 files changed

+146
-0
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Settings: Switch matches snapshot 1`] = `
4+
<div>
5+
<div
6+
class="material-settings__api mdc-layout-grid"
7+
>
8+
<div
9+
class="mdc-dialog"
10+
>
11+
<div
12+
class="mdc-dialog__container"
13+
>
14+
<div
15+
aria-describedby="dialog-content-0"
16+
aria-labelledby="dialog-title-0"
17+
aria-modal="true"
18+
class="mdc-dialog__surface"
19+
role="alertdialog"
20+
>
21+
<h2
22+
class="mdc-dialog__title"
23+
id="dialog-title-0"
24+
>
25+
Remove Google API Key?
26+
</h2>
27+
<div
28+
class="mdc-dialog__content"
29+
id="dialog-content-0"
30+
>
31+
This action is permanent and cannot be undone
32+
</div>
33+
<div
34+
class="mdc-dialog__actions"
35+
>
36+
<button
37+
class="mdc-button mdc-dialog__button"
38+
type="button"
39+
>
40+
<div
41+
class="mdc-button__ripple"
42+
/>
43+
<span
44+
class="mdc-button__label"
45+
>
46+
Cancel
47+
</span>
48+
</button>
49+
<button
50+
class="mdc-button mdc-dialog__button"
51+
type="button"
52+
>
53+
<div
54+
class="mdc-button__ripple"
55+
/>
56+
<span
57+
class="mdc-button__label"
58+
>
59+
Remove
60+
</span>
61+
</button>
62+
</div>
63+
</div>
64+
</div>
65+
<div
66+
class="mdc-dialog__scrim"
67+
/>
68+
</div>
69+
<div
70+
class="mdc-layout-grid__inner"
71+
>
72+
<div
73+
class="components-base-control material-settings__api-input mdc-layout-grid__cell"
74+
>
75+
<div
76+
class="components-base-control__field"
77+
>
78+
<input
79+
class="components-text-control__input"
80+
id="inspector-text-control-0"
81+
placeholder="Google API Key"
82+
type="text"
83+
value=""
84+
/>
85+
</div>
86+
</div>
87+
<div
88+
class="mdc-layout-grid__cell"
89+
>
90+
<button
91+
class="mdc-button mdc-button--raised"
92+
disabled=""
93+
>
94+
<span
95+
class="mdc-button__label"
96+
>
97+
Activate
98+
</span>
99+
</button>
100+
</div>
101+
</div>
102+
</div>
103+
</div>
104+
`;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
* Copyright 2020 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* External dependencies
19+
*/
20+
import '@testing-library/jest-dom/extend-expect';
21+
import { render } from '@testing-library/react';
22+
23+
/**
24+
* Internal dependencies
25+
*/
26+
import Api from '../../../../../assets/src/settings/components/integrations/api';
27+
import { SettingsProvider } from '../../../../../assets/src/settings/context';
28+
29+
const setup = () => {
30+
return render(
31+
<SettingsProvider>
32+
<Api />
33+
</SettingsProvider>
34+
);
35+
};
36+
37+
describe( 'Settings: Switch', () => {
38+
it( 'matches snapshot', () => {
39+
const { container } = setup();
40+
expect( container ).toMatchSnapshot();
41+
} );
42+
} );

0 commit comments

Comments
 (0)