feat(test-components): remove snapshots

This commit is contained in:
eliabejr 2019-02-01 10:19:28 -03:00
parent 93acce66d0
commit 4a21ceaa26
20 changed files with 16 additions and 244 deletions

View File

@ -1,20 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<ColumnComponent /> should render correctly 1`] = `
<div>
<div
class="sc-bdVaJa kRTFg"
width=""
>
<h3>
ZEC
</h3>
<h3>
React
</h3>
<h3>
Wallet
</h3>
</div>
</div>
`;

View File

@ -1,3 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<ConfirmDialogComponent /> should render confirm dialog correctly 1`] = `null`;

View File

@ -1,10 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Divider /> should render correctly 1`] = `
<div>
<div
class="sc-bdVaJa eTBnxX"
opacity="0.3"
/>
</div>
`;

View File

@ -1,17 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<EmptyTransactions /> should render correctly 1`] = `
<div>
<div
class="sc-bwzfXH gTiHvG"
data-testid="NoTransactions"
>
<p
class="sc-bdVaJa fMeavL"
color="#FFF"
>
No transactions!
</p>
</div>
</div>
`;

View File

@ -1,20 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Divider /> should render correctly 1`] = `
<div>
<div
class="sc-bdVaJa kRTFg"
width=""
>
<h3>
ZEC
</h3>
<h3>
React
</h3>
<h3>
Wallet
</h3>
</div>
</div>
`;

View File

@ -1,12 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<InputLabelComponent /> should render correctly 1`] = `
<div>
<p
class="sc-bwzfXH dvbGtP sc-bdVaJa fMeavL"
color="#FFF"
>
From
</p>
</div>
`;

View File

@ -1,20 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<LayoutComponent /> should render correctly 1`] = `
<div>
<div
class="sc-bdVaJa bnGqDF"
id="layout"
>
<h3>
ZEC
</h3>
<h3>
React
</h3>
<h3>
Wallet
</h3>
</div>
</div>
`;

View File

@ -1,19 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<RowComponent /> should render correctly 1`] = `
<div>
<div
class="sc-bdVaJa lgVsKh"
>
<h3>
ZEC
</h3>
<h3>
React
</h3>
<h3>
Wallet
</h3>
</div>
</div>
`;

View File

@ -1,29 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<SelectComponent /> should generate snapshot correctly 1`] = `
<div>
<div
class="sc-bwzfXH laILya"
data-testid="Select"
id="select-component"
>
<div
class="sc-htpNat iHFWUy"
>
Select a address
</div>
<div
class="sc-bxivhb fUvjwK"
>
<button
class="sc-ifAKCX JHqFU"
>
<img
class="sc-EHOje fcnlsf"
src="[object Object]"
/>
</button>
</div>
</div>
</div>
`;

View File

@ -1,71 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Sidebar /> render() should render correctly 1`] = `
<DocumentFragment>
<div
class="sc-bdVaJa igFjJZ"
id="sidebar"
>
<a
class="sc-bwzfXH kBVjXq"
>
<img
alt="/"
class="sc-htpNat kwYHDD"
src="[object Object]"
/>
Dashboard
</a>
<a
class="sc-bwzfXH cYKDCP"
>
<img
alt="/send"
class="sc-htpNat eZYlLl"
src="[object Object]"
/>
Send
</a>
<a
class="sc-bwzfXH cYKDCP"
>
<img
alt="/receive"
class="sc-htpNat eZYlLl"
src="[object Object]"
/>
Receive
</a>
<a
class="sc-bwzfXH cYKDCP"
>
<img
alt="/transactions"
class="sc-htpNat eZYlLl"
src="[object Object]"
/>
Transactions
</a>
<a
class="sc-bwzfXH cYKDCP"
>
<img
alt="/settings"
class="sc-htpNat eZYlLl"
src="[object Object]"
/>
Settings
</a>
<a
class="sc-bwzfXH cYKDCP"
>
<img
alt="/console"
class="sc-htpNat eZYlLl"
src="[object Object]"
/>
Console
</a>
</div>
</DocumentFragment>
`;

View File

@ -1,12 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<TextComponent /> should render correctly 1`] = `
<div>
<p
class="sc-bdVaJa fMeavL"
color="#FFF"
>
ZEC React Wallet
</p>
</div>
`;

View File

@ -23,6 +23,6 @@ describe('<ColumnComponent />', () => {
</ThemeProvider>, </ThemeProvider>,
); );
expect(container).toMatchSnapshot(); expect(container).toBeVisible();
}); });
}); });

View File

@ -10,7 +10,7 @@ afterEach(cleanup);
describe('<ConfirmDialogComponent />', () => { describe('<ConfirmDialogComponent />', () => {
test('should render confirm dialog correctly', () => { test('should render confirm dialog correctly', () => {
const { queryByTestId } = render( const { container } = render(
<ConfirmDialogComponent <ConfirmDialogComponent
title="Confirm example" title="Confirm example"
onConfirm={() => alert('Confirm')} onConfirm={() => alert('Confirm')}
@ -20,7 +20,7 @@ describe('<ConfirmDialogComponent />', () => {
</ConfirmDialogComponent>, </ConfirmDialogComponent>,
); );
expect(queryByTestId('ConfirmDialog')).toMatchSnapshot(); expect(container).toBeVisible();
}); });
test('should render confirm dialog trigger', () => { test('should render confirm dialog trigger', () => {

View File

@ -19,6 +19,9 @@ describe('<Divider />', () => {
</ThemeProvider>, </ThemeProvider>,
); );
expect(container).toMatchSnapshot(); const divider = container.querySelector('div');
expect(divider).toBeVisible();
expect(divider).toHaveStyle('opacity: 0.3');
}); });
}); });

View File

@ -12,13 +12,13 @@ afterEach(cleanup);
describe('<EmptyTransactions />', () => { describe('<EmptyTransactions />', () => {
test('should render correctly', () => { test('should render correctly', () => {
const { container } = render( const { queryByTestId } = render(
<ThemeProvider theme={appTheme}> <ThemeProvider theme={appTheme}>
<EmptyTransactionsComponent /> <EmptyTransactionsComponent />
</ThemeProvider>, </ThemeProvider>,
); );
expect(container).toMatchSnapshot(); expect(queryByTestId('NoTransactions')).toBeInTheDocument();
}); });
test('should show label correctly', () => { test('should show label correctly', () => {

View File

@ -18,7 +18,9 @@ describe('<InputLabelComponent />', () => {
</ThemeProvider>, </ThemeProvider>,
); );
expect(container).toMatchSnapshot(); const label = container.querySelector('p');
expect(label).toBeVisible();
}); });
test('should render input label string', () => { test('should render input label string', () => {

View File

@ -22,6 +22,6 @@ describe('<RowComponent />', () => {
</ThemeProvider>, </ThemeProvider>,
); );
expect(container).toMatchSnapshot(); expect(container).toBeVisible();
}); });
}); });

View File

@ -26,7 +26,7 @@ describe('<SelectComponent />', () => {
</ThemeProvider>, </ThemeProvider>,
); );
expect(container).toMatchSnapshot(); expect(container).toBeVisible();
}); });
test('should render correctly', () => { test('should render correctly', () => {

View File

@ -18,7 +18,7 @@ describe('<TextComponent />', () => {
</ThemeProvider>, </ThemeProvider>,
); );
expect(container).toMatchSnapshot(); expect(container).toBeVisible();
}); });
test('should render input label string', () => { test('should render input label string', () => {

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="125" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="a"><rect width="125" height="20" rx="3" fill="#fff"/></mask><g mask="url(#a)"><path fill="#555" d="M0 0h91v20H0z"/><path fill="#4C1" d="M91 0h34v20H91z"/><path fill="url(#b)" d="M0 0h125v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,DejaVu Sans,Geneva,sans-serif" font-size="11"><text x="45.5" y="15" fill="#010101" fill-opacity=".3">flow-coverage</text><text x="45.5" y="14">flow-coverage</text><text x="107" y="15" fill="#010101" fill-opacity=".3">81%</text><text x="107" y="14">81%</text></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="125" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="a"><rect width="125" height="20" rx="3" fill="#fff"/></mask><g mask="url(#a)"><path fill="#555" d="M0 0h91v20H0z"/><path fill="#4C1" d="M91 0h34v20H91z"/><path fill="url(#b)" d="M0 0h125v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,DejaVu Sans,Geneva,sans-serif" font-size="11"><text x="45.5" y="15" fill="#010101" fill-opacity=".3">flow-coverage</text><text x="45.5" y="14">flow-coverage</text><text x="107" y="15" fill="#010101" fill-opacity=".3">82%</text><text x="107" y="14">82%</text></g></svg>

Before

Width:  |  Height:  |  Size: 745 B

After

Width:  |  Height:  |  Size: 745 B