Skip to content

Commit b7b5dd9

Browse files
Mario Aguiarravichdev
authored andcommitted
Add updater snapshot
1 parent d2762bd commit b7b5dd9

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Settings: Updater matches snapshot 1`] = `
4+
<div>
5+
<div
6+
class="material-settings__updater"
7+
>
8+
<div
9+
class="mdc-layout-grid"
10+
>
11+
<div
12+
class="mdc-layout-grid__inner"
13+
>
14+
<div
15+
class="mdc-layout-grid__cell mdc-layout-grid__cell--span-7 mdc-layout-grid__cell--align-middle"
16+
>
17+
<h3
18+
class="mdc-typography--headline6"
19+
>
20+
Google Fonts
21+
</h3>
22+
<p
23+
class="mdc-typography--body1"
24+
>
25+
To enable Google Fonts updates please
26+
<a
27+
href="https://developers.google.com/fonts/docs/developer_api#APIKey"
28+
rel="noopener noreferrer"
29+
target="_blank"
30+
>
31+
activate Google API Key
32+
</a>
33+
first
34+
</p>
35+
</div>
36+
<div
37+
class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3 mdc-layout-grid__cell--align-middle material-settings__cell--justify-end"
38+
/>
39+
<div
40+
class="mdc-layout-grid__cell mdc-layout-grid__cell--span-2 mdc-layout-grid__cell--align-middle material-settings__cell--justify-end"
41+
>
42+
<div
43+
class="material-settings__message material-settings__message--error"
44+
>
45+
<i
46+
aria-hidden="true"
47+
class="material-icons mdc-button__icon leading-icon"
48+
>
49+
error
50+
</i>
51+
<span
52+
class="material-settings__message-text"
53+
>
54+
Updates disabled
55+
</span>
56+
</div>
57+
</div>
58+
</div>
59+
</div>
60+
</div>
61+
</div>
62+
`;
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 Updater from '../../../../../assets/src/settings/components/integrations/updater';
27+
import { SettingsProvider } from '../../../../../assets/src/settings/context';
28+
29+
const baseProps = {
30+
title: 'Google Fonts',
31+
type: 'FONTS',
32+
lastUpdated: parseInt( Date.now(), 10 ),
33+
needsKey: true,
34+
checked: true,
35+
};
36+
37+
const setup = props => {
38+
return render(
39+
<SettingsProvider>
40+
<Updater { ...props } />
41+
</SettingsProvider>
42+
);
43+
};
44+
45+
describe( 'Settings: Updater', () => {
46+
it( 'matches snapshot', () => {
47+
const { container } = setup( baseProps );
48+
expect( container ).toMatchSnapshot();
49+
} );
50+
} );

0 commit comments

Comments
 (0)