Skip to content
Snippets Groups Projects
Commit c55c3b6f authored by Alf Eaton's avatar Alf Eaton
Browse files

Update tests

parent a5e9927d
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@
},
"jest": {
"moduleNameMapper": {
"\\.css$": "<rootDir>/test/setup/styleMock.js"
"\\.s?css$": "<rootDir>/test/setup/styleMock.js"
},
"transform": {
"\\.js$": "<rootDir>/test/config/transform.js"
......
......@@ -80,7 +80,7 @@ describe('AppBar', () => {
expect(rightArea.children()).toHaveLength(2)
const userName = rightArea.childAt(0)
expect(userName.text()).toBe(props.userName)
expect(userName.text()).toBe("<Icon />some name")
})
test('Should display the login link if no username is given', () => {
......
......@@ -30,9 +30,9 @@ describe('Radio', () => {
expect(input.is('input')).toBeTruthy()
expect(input.children()).toHaveLength(0)
const labelText = wrapper.childAt(1)
expect(labelText.text()).toBe(props.label)
expect(labelText.children()).toHaveLength(0)
const labelSpan = wrapper.childAt(1)
expect(labelSpan.text()).toBe(props.label)
expect(labelSpan.children()).toHaveLength(1)
})
test('Input gets the correct props', () => {
......
......@@ -5,7 +5,7 @@ exports[`AppBar Snapshot 1`] = `
className={undefined}
>
<a
className={undefined}
className=""
onClick={[Function]}
style={Object {}}
>
......@@ -15,7 +15,38 @@ exports[`AppBar Snapshot 1`] = `
<span
className={undefined}
>
some name
<span>
<svg
height={16}
viewBox="0 0 24 24"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
fill="none"
stroke="black"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
<circle
cx="12"
cy="7"
fill="none"
r="4"
stroke="black"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
</svg>
</span>
<span
className={undefined}
>
some name
</span>
</span>
<a
className=""
......
......@@ -2,12 +2,15 @@
exports[`Menu Snapshot 1`] = `
<div
className={undefined}
className=""
>
<div>
<div
className={undefined}
>
<button
className={undefined}
onClick={[Function]}
type="button"
>
<span>
Foo
......
......@@ -2,16 +2,26 @@
exports[`Radio Snapshot 1`] = `
<label
className={undefined}
className=""
style={
Object {
"color": undefined,
}
}
>
<input
checked={false}
className={undefined}
name="TestName"
onChange={undefined}
required={true}
type="radio"
value="TestValue"
/>
TestLabel
<span
className={undefined}
>
TestLabel
</span>
</label>
`;
......@@ -3,43 +3,73 @@
exports[`Radio Group Snapshot 1`] = `
<div>
<label
className={undefined}
className=""
style={
Object {
"color": undefined,
}
}
>
<input
checked={false}
className={undefined}
name="TestName"
onChange={[Function]}
required={true}
type="radio"
value="yes"
/>
Yes
<span
className={undefined}
>
Yes
</span>
</label>
<label
className={undefined}
className=""
style={
Object {
"color": undefined,
}
}
>
<input
checked={false}
className={undefined}
name="TestName"
onChange={[Function]}
required={true}
type="radio"
value="no"
/>
No
<span
className={undefined}
>
No
</span>
</label>
<label
className={undefined}
className=""
style={
Object {
"color": undefined,
}
}
>
<input
checked={false}
className={undefined}
name="TestName"
onChange={[Function]}
required={true}
type="radio"
value="maybe"
/>
Maybe
<span
className={undefined}
>
Maybe
</span>
</label>
</div>
`;
......@@ -3,30 +3,50 @@
exports[`Yes or No Snapshot 1`] = `
<div>
<label
className={undefined}
className=""
style={
Object {
"color": undefined,
}
}
>
<input
checked={false}
className={undefined}
name="TestName"
onChange={[Function]}
required={undefined}
type="radio"
value="yes"
/>
Yes
<span
className={undefined}
>
Yes
</span>
</label>
<label
className={undefined}
className=""
style={
Object {
"color": undefined,
}
}
>
<input
checked={false}
className={undefined}
name="TestName"
onChange={[Function]}
required={undefined}
type="radio"
value="no"
/>
No
<span
className={undefined}
>
No
</span>
</label>
</div>
`;
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