Skip to content

Commit 9c7022b

Browse files
Mario Aguiarravichdev
authored andcommitted
Add snapshot for never updated
1 parent 2aa9e5a commit 9c7022b

File tree

2 files changed

+76
-5
lines changed

2 files changed

+76
-5
lines changed

plugin/tests/js/settings/components/integrations/__snapshots__/updater.test.js.snap

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exports[`Settings: Updater matches snapshot 1`] = `
2222
<p
2323
class="mdc-typography--body1"
2424
>
25-
Last update on Apr 6, 2021, 11:14 PM
25+
Last update on Apr 6, 2021, 11:23 PM
2626
</p>
2727
</div>
2828
<div
@@ -109,7 +109,68 @@ exports[`Settings: Updater matches snapshot when disabled 1`] = `
109109
<p
110110
class="mdc-typography--body1"
111111
>
112-
Last update on Apr 6, 2021, 11:14 PM
112+
To enable Google Fonts updates please
113+
<a
114+
href="https://developers.google.com/fonts/docs/developer_api#APIKey"
115+
rel="noopener noreferrer"
116+
target="_blank"
117+
>
118+
activate Google API Key
119+
</a>
120+
first
121+
</p>
122+
</div>
123+
<div
124+
class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3 mdc-layout-grid__cell--align-middle material-settings__cell--justify-end"
125+
/>
126+
<div
127+
class="mdc-layout-grid__cell mdc-layout-grid__cell--span-2 mdc-layout-grid__cell--align-middle material-settings__cell--justify-end"
128+
>
129+
<div
130+
class="material-settings__message material-settings__message--error"
131+
>
132+
<i
133+
aria-hidden="true"
134+
class="material-icons mdc-button__icon leading-icon"
135+
>
136+
error
137+
</i>
138+
<span
139+
class="material-settings__message-text"
140+
>
141+
Updates disabled
142+
</span>
143+
</div>
144+
</div>
145+
</div>
146+
</div>
147+
</div>
148+
</div>
149+
`;
150+
151+
exports[`Settings: Updater matches snapshot when never updated 1`] = `
152+
<div>
153+
<div
154+
class="material-settings__updater"
155+
>
156+
<div
157+
class="mdc-layout-grid"
158+
>
159+
<div
160+
class="mdc-layout-grid__inner"
161+
>
162+
<div
163+
class="mdc-layout-grid__cell mdc-layout-grid__cell--span-7 mdc-layout-grid__cell--align-middle"
164+
>
165+
<h3
166+
class="mdc-typography--headline6"
167+
>
168+
Google Fonts
169+
</h3>
170+
<p
171+
class="mdc-typography--body1"
172+
>
173+
Last update on never
113174
</p>
114175
</div>
115176
<div
@@ -134,15 +195,15 @@ exports[`Settings: Updater matches snapshot when disabled 1`] = `
134195
aria-checked="true"
135196
checked=""
136197
class="mdc-switch__native-control"
137-
id="updater-2"
198+
id="updater-3"
138199
role="switch"
139200
type="checkbox"
140201
/>
141202
</div>
142203
</div>
143204
<label
144-
for="updater-2"
145-
id="label-updater-2"
205+
for="updater-3"
206+
id="label-updater-3"
146207
>
147208
Auto-updates enabled
148209
</label>

plugin/tests/js/settings/components/integrations/updater.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ describe( 'Settings: Updater', () => {
5858
const { container } = setup( props );
5959
expect( container ).toMatchSnapshot();
6060
} );
61+
62+
it( 'matches snapshot when never updated', () => {
63+
const props = {
64+
...baseProps,
65+
lastUpdated: null,
66+
};
67+
68+
const { container } = setup( props );
69+
expect( container ).toMatchSnapshot();
70+
} );
6171
} );

0 commit comments

Comments
 (0)