Fix unit tests.

This commit is contained in:
Andrey Eremchenko 2021-09-12 21:00:43 +07:00
parent 719a9ea447
commit c2ca0a9e8a
3 changed files with 14 additions and 15 deletions

View file

@ -3,16 +3,14 @@
exports[`components/propertyValueElement should match snapshot, date, array value 1`] = ` exports[`components/propertyValueElement should match snapshot, date, array value 1`] = `
<div> <div>
<div <div
class="DateRange " class="DateRange empty"
> >
<button <button
class="Button " class="Button "
type="button" type="button"
> >
<span> <span>
<span Empty
title="Empty"
/>
</span> </span>
</button> </button>
</div> </div>
@ -44,7 +42,7 @@ exports[`components/propertyValueElement should match snapshot, person, array va
<div> <div>
<input <input
class="Editable octo-propertyvalue" class="Editable octo-propertyvalue"
placeholder="" placeholder="Empty"
spellcheck="true" spellcheck="true"
title="" title=""
value="" value=""
@ -107,7 +105,7 @@ exports[`components/propertyValueElement should match snapshot, url, array value
> >
<input <input
class="Editable octo-propertyvalue" class="Editable octo-propertyvalue"
placeholder="" placeholder="Empty"
title="http://localhost" title="http://localhost"
value="http://localhost" value="http://localhost"
/> />
@ -132,7 +130,7 @@ exports[`components/propertyValueElement should match snapshot, url, array value
> >
<input <input
class="Editable octo-propertyvalue" class="Editable octo-propertyvalue"
placeholder="" placeholder="Empty"
title="http://localhost" title="http://localhost"
value="http://localhost" value="http://localhost"
/> />

View file

@ -251,6 +251,7 @@ describe('components/properties/dateRange', () => {
<DateRange <DateRange
className='octo-propertyvalue' className='octo-propertyvalue'
value={''} value={''}
showEmptyPlaceholder={true}
onChange={callback} onChange={callback}
/>, />,
) )
@ -263,7 +264,7 @@ describe('components/properties/dateRange', () => {
const today = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) const today = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())
const {getByText, getByTitle} = render(component) const {getByText, getByTitle} = render(component)
const dayDisplay = getByTitle('Empty') const dayDisplay = getByText('Empty')
userEvent.click(dayDisplay) userEvent.click(dayDisplay)
const day = getByText('Today') const day = getByText('Today')

View file

@ -39,7 +39,7 @@ describe('components/propertyValueElement', () => {
contents={[]} contents={[]}
comments={[comments]} comments={[comments]}
propertyTemplate={propertyTemplate || board.fields.cardProperties[0]} propertyTemplate={propertyTemplate || board.fields.cardProperties[0]}
emptyDisplayValue={'empty'} showEmptyPlaceholder={true}
/>, />,
) )
@ -57,7 +57,7 @@ describe('components/propertyValueElement', () => {
contents={[]} contents={[]}
comments={[comments]} comments={[comments]}
propertyTemplate={propertyTemplate || board.fields.cardProperties[0]} propertyTemplate={propertyTemplate || board.fields.cardProperties[0]}
emptyDisplayValue={'empty'} showEmptyPlaceholder={true}
/>, />,
) )
@ -91,7 +91,7 @@ describe('components/propertyValueElement', () => {
contents={[]} contents={[]}
comments={[comments]} comments={[comments]}
propertyTemplate={propertyTemplate} propertyTemplate={propertyTemplate}
emptyDisplayValue={'empty'} showEmptyPlaceholder={true}
/>, />,
) )
@ -116,7 +116,7 @@ describe('components/propertyValueElement', () => {
contents={[]} contents={[]}
comments={[comments]} comments={[comments]}
propertyTemplate={propertyTemplate} propertyTemplate={propertyTemplate}
emptyDisplayValue={'empty'} showEmptyPlaceholder={true}
/>, />,
) )
@ -141,7 +141,7 @@ describe('components/propertyValueElement', () => {
contents={[]} contents={[]}
comments={[comments]} comments={[comments]}
propertyTemplate={propertyTemplate} propertyTemplate={propertyTemplate}
emptyDisplayValue={'empty'} showEmptyPlaceholder={true}
/>, />,
) )
@ -166,7 +166,7 @@ describe('components/propertyValueElement', () => {
contents={[]} contents={[]}
comments={[comments]} comments={[comments]}
propertyTemplate={propertyTemplate} propertyTemplate={propertyTemplate}
emptyDisplayValue={'empty'} showEmptyPlaceholder={true}
/>, />,
) )
@ -191,7 +191,7 @@ describe('components/propertyValueElement', () => {
contents={[]} contents={[]}
comments={[comments]} comments={[comments]}
propertyTemplate={propertyTemplate} propertyTemplate={propertyTemplate}
emptyDisplayValue={'empty'} showEmptyPlaceholder={true}
/>, />,
) )
const {container} = render(component) const {container} = render(component)