Skip to content
Snippets Groups Projects
Commit 5059b3b9 authored by Aanand Prasad's avatar Aanand Prasad Committed by Jure
Browse files

test(ui): fix test failures

parent 6928c316
No related branches found
No related tags found
No related merge requests found
import React from 'react'
import { MemoryRouter } from 'react-router-dom'
import renderer from 'react-test-renderer'
import 'jest-styled-components'
import AppBar from '../src/molecules/AppBar'
......
import React from 'react'
import { shallow } from 'enzyme'
import { mount } from 'enzyme'
import renderer from 'react-test-renderer'
import 'jest-styled-components'
import Radio from '../src/atoms/Radio'
......@@ -12,7 +13,7 @@ const props = {
value: 'TestValue',
}
const wrapper = shallow(<Radio {...props} />)
const wrapper = mount(<Radio {...props} />)
describe('Radio', () => {
test('is rendered correctly', () => {
......
......@@ -2,6 +2,7 @@ import React from 'react'
import { clone } from 'lodash'
import { shallow } from 'enzyme'
import renderer from 'react-test-renderer'
import 'jest-styled-components'
import Radio from '../src/atoms/Radio'
import RadioGroup from '../src/molecules/RadioGroup'
......
import React from 'react'
import { shallow } from 'enzyme'
import renderer from 'react-test-renderer'
import 'jest-styled-components'
import YesOrNo from '../src/molecules/YesOrNo'
import RadioGroup from '../src/molecules/RadioGroup'
......
......@@ -30,6 +30,14 @@ exports[`AppBar Basic display 1`] = `
`;
exports[`AppBar With admin user 1`] = `
.c0 {
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
width: var(--icon-size);
}
<nav
className="root"
>
......@@ -51,7 +59,7 @@ exports[`AppBar With admin user 1`] = `
className="item"
>
<span
className="root"
className="c0"
>
<svg
height={16}
......@@ -88,7 +96,7 @@ exports[`AppBar With admin user 1`] = `
onClick={[Function]}
>
<span
className="root"
className="c0"
>
<svg
fill="none"
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Radio is rendered correctly 1`] = `
.c1 {
display: none;
}
.c3 {
--local-border-size: 2px;
--local-borderTwo-size: 1px;
display: inline-block;
content: ' ';
width: 0.6em;
height: 0.6em;
vertical-align: center;
margin-left: 0.2em;
margin-right: 0.6em;
border: var(--local-border-size) solid white;
border-radius: 50%;
-webkit-transition: border 0.2s ease;
transition: border 0.2s ease;
}
.c5 {
display: inline-block;
font-family: inherit;
font-size: 1em;
font-style: italic;
}
.c0 {
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
cursor: pointer;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-transition: all 2s;
transition: all 2s;
}
.c0:not(:last-child) {
margin-right: 0;
margin-bottom: 0.5rem;
}
.c0 .c2 {
background: transparent;
box-shadow: 0 0 0 var(--local-borderTwo-size) currentcolor;
}
.c0:hover .c4 {
color: var(--color-primary);
}
.c0:hover .c2 {
-webkit-animation-name: kLnLOV;
animation-name: kLnLOV;
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s;
box-shadow: 0 0 0 var(--local-borderTwo-size) var(--color-primary);
}
<label
className="root"
checked={false}
className="c0"
style={
Object {
"color": "black",
......@@ -11,7 +75,7 @@ exports[`Radio is rendered correctly 1`] = `
>
<input
checked={false}
className="input"
className="c1"
disabled={undefined}
name="TestName"
onChange={undefined}
......@@ -21,7 +85,7 @@ exports[`Radio is rendered correctly 1`] = `
/>
<span
className="pseudoInput"
className="c2 c3"
style={
Object {
"color": "black",
......@@ -30,7 +94,7 @@ exports[`Radio is rendered correctly 1`] = `
/>
<span
className="label"
className="c4 c5"
>
TestLabel
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Radio Group is rendered correctly 1`] = `
.c1 {
display: none;
}
.c3 {
--local-border-size: 2px;
--local-borderTwo-size: 1px;
display: inline-block;
content: ' ';
width: 0.6em;
height: 0.6em;
vertical-align: center;
margin-left: 0.2em;
margin-right: 0.6em;
border: var(--local-border-size) solid white;
border-radius: 50%;
-webkit-transition: border 0.2s ease;
transition: border 0.2s ease;
}
.c5 {
display: inline-block;
font-family: inherit;
font-size: 1em;
font-style: italic;
}
.c0 {
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
cursor: pointer;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-transition: all 2s;
transition: all 2s;
}
.c0:not(:last-child) {
margin-right: 0;
margin-bottom: 0.5rem;
}
.c0 .c2 {
background: transparent;
box-shadow: 0 0 0 var(--local-borderTwo-size) currentcolor;
}
.c0:hover .c4 {
color: var(--color-primary);
}
.c0:hover .c2 {
-webkit-animation-name: kLnLOV;
animation-name: kLnLOV;
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s;
box-shadow: 0 0 0 var(--local-borderTwo-size) var(--color-primary);
}
<div>
<label
className="root"
checked={false}
className="c0"
style={
Object {
"color": "black",
......@@ -12,7 +76,7 @@ exports[`Radio Group is rendered correctly 1`] = `
>
<input
checked={false}
className="input"
className="c1"
disabled={undefined}
name="TestName"
onChange={[Function]}
......@@ -22,7 +86,7 @@ exports[`Radio Group is rendered correctly 1`] = `
/>
<span
className="pseudoInput"
className="c2 c3"
style={
Object {
"color": "black",
......@@ -31,7 +95,7 @@ exports[`Radio Group is rendered correctly 1`] = `
/>
<span
className="label"
className="c4 c5"
>
Yes
......@@ -40,7 +104,8 @@ exports[`Radio Group is rendered correctly 1`] = `
</label>
<label
className="root"
checked={false}
className="c0"
style={
Object {
"color": "black",
......@@ -49,7 +114,7 @@ exports[`Radio Group is rendered correctly 1`] = `
>
<input
checked={false}
className="input"
className="c1"
disabled={undefined}
name="TestName"
onChange={[Function]}
......@@ -59,7 +124,7 @@ exports[`Radio Group is rendered correctly 1`] = `
/>
<span
className="pseudoInput"
className="c2 c3"
style={
Object {
"color": "black",
......@@ -68,7 +133,7 @@ exports[`Radio Group is rendered correctly 1`] = `
/>
<span
className="label"
className="c4 c5"
>
No
......@@ -77,7 +142,8 @@ exports[`Radio Group is rendered correctly 1`] = `
</label>
<label
className="root"
checked={false}
className="c0"
style={
Object {
"color": "black",
......@@ -86,7 +152,7 @@ exports[`Radio Group is rendered correctly 1`] = `
>
<input
checked={false}
className="input"
className="c1"
disabled={undefined}
name="TestName"
onChange={[Function]}
......@@ -96,7 +162,7 @@ exports[`Radio Group is rendered correctly 1`] = `
/>
<span
className="pseudoInput"
className="c2 c3"
style={
Object {
"color": "black",
......@@ -105,7 +171,7 @@ exports[`Radio Group is rendered correctly 1`] = `
/>
<span
className="label"
className="c4 c5"
>
Maybe
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Yes or No is rendered correclty 1`] = `
.c1 {
display: none;
}
.c3 {
--local-border-size: 2px;
--local-borderTwo-size: 1px;
display: inline-block;
content: ' ';
width: 0.6em;
height: 0.6em;
vertical-align: center;
margin-left: 0.2em;
margin-right: 0.6em;
border: var(--local-border-size) solid white;
border-radius: 50%;
-webkit-transition: border 0.2s ease;
transition: border 0.2s ease;
}
.c5 {
display: inline-block;
font-family: inherit;
font-size: 1em;
font-style: italic;
}
.c0 {
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
cursor: pointer;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-transition: all 2s;
transition: all 2s;
}
.c0:not(:last-child) {
margin-right: 0;
margin-bottom: 0.5rem;
}
.c0 .c2 {
background: transparent;
box-shadow: 0 0 0 var(--local-borderTwo-size) currentcolor;
}
.c0:hover .c4 {
color: var(--color-primary);
}
.c0:hover .c2 {
-webkit-animation-name: kLnLOV;
animation-name: kLnLOV;
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s;
box-shadow: 0 0 0 var(--local-borderTwo-size) var(--color-primary);
}
<div>
<label
className="root inline"
checked={false}
className="c0"
style={
Object {
"color": "black",
......@@ -12,7 +76,7 @@ exports[`Yes or No is rendered correclty 1`] = `
>
<input
checked={false}
className="input"
className="c1"
disabled={undefined}
name="TestName"
onChange={[Function]}
......@@ -22,7 +86,7 @@ exports[`Yes or No is rendered correclty 1`] = `
/>
<span
className="pseudoInput"
className="c2 c3"
style={
Object {
"color": "black",
......@@ -31,7 +95,7 @@ exports[`Yes or No is rendered correclty 1`] = `
/>
<span
className="label"
className="c4 c5"
>
Yes
......@@ -40,7 +104,8 @@ exports[`Yes or No is rendered correclty 1`] = `
</label>
<label
className="root inline"
checked={false}
className="c0"
style={
Object {
"color": "black",
......@@ -49,7 +114,7 @@ exports[`Yes or No is rendered correclty 1`] = `
>
<input
checked={false}
className="input"
className="c1"
disabled={undefined}
name="TestName"
onChange={[Function]}
......@@ -59,7 +124,7 @@ exports[`Yes or No is rendered correclty 1`] = `
/>
<span
className="pseudoInput"
className="c2 c3"
style={
Object {
"color": "black",
......@@ -68,7 +133,7 @@ exports[`Yes or No is rendered correclty 1`] = `
/>
<span
className="label"
className="c4 c5"
>
No
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment