Fixing tests
This commit is contained in:
parent
aafc159248
commit
951e85ef32
2 changed files with 23 additions and 24 deletions
|
@ -10,13 +10,12 @@ exports[`components/content/CheckboxElement should match snapshot 1`] = `
|
|||
type="checkbox"
|
||||
value="off"
|
||||
/>
|
||||
<div
|
||||
class="octo-editable"
|
||||
contenteditable="true"
|
||||
<input
|
||||
class="Editable undefined"
|
||||
placeholder="Edit text..."
|
||||
>
|
||||
test-title
|
||||
</div>
|
||||
title="test-title"
|
||||
value="test-title"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -31,13 +30,14 @@ exports[`components/content/CheckboxElement should match snapshot on change titl
|
|||
type="checkbox"
|
||||
value="off"
|
||||
/>
|
||||
<div
|
||||
class="octo-editable"
|
||||
contenteditable="true"
|
||||
<input
|
||||
class="Editable undefined"
|
||||
placeholder="Edit text..."
|
||||
title="test-title"
|
||||
value="test-title"
|
||||
>
|
||||
changed name
|
||||
</div>
|
||||
</input>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -53,13 +53,13 @@ exports[`components/content/CheckboxElement should match snapshot on read only 1
|
|||
type="checkbox"
|
||||
value="off"
|
||||
/>
|
||||
<div
|
||||
class="octo-editable"
|
||||
contenteditable="false"
|
||||
<input
|
||||
class="Editable undefined"
|
||||
placeholder="Edit text..."
|
||||
>
|
||||
test-title
|
||||
</div>
|
||||
readonly=""
|
||||
title="test-title"
|
||||
value="test-title"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -74,13 +74,12 @@ exports[`components/content/CheckboxElement should match snapshot on toggle 1`]
|
|||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<div
|
||||
class="octo-editable"
|
||||
contenteditable="true"
|
||||
<input
|
||||
class="Editable undefined"
|
||||
placeholder="Edit text..."
|
||||
>
|
||||
test-title
|
||||
</div>
|
||||
title="test-title"
|
||||
value="test-title"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -56,8 +56,8 @@ describe('components/content/CheckboxElement', () => {
|
|||
readonly={false}
|
||||
/>,
|
||||
)
|
||||
const {container, getByText} = render(component)
|
||||
const input = getByText(/test-title/i)
|
||||
const {container, getByTitle} = render(component)
|
||||
const input = getByTitle(/test-title/i)
|
||||
fireEvent.blur(input, {target: {textContent: 'changed name'}})
|
||||
expect(container).toMatchSnapshot()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue