Unit test for DateRange
fixed. Snapshots updated.
This commit is contained in:
parent
5e1115c1f2
commit
e299940cad
3 changed files with 5 additions and 8 deletions
|
@ -43,11 +43,7 @@ exports[`components/properties/dateRange returns default correctly 1`] = `
|
||||||
class="Button "
|
class="Button "
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span>
|
<span />
|
||||||
<span
|
|
||||||
title="Empty"
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -60,6 +60,7 @@ describe('components/properties/dateRange', () => {
|
||||||
<DateRange
|
<DateRange
|
||||||
className='octo-propertyvalue'
|
className='octo-propertyvalue'
|
||||||
value={''}
|
value={''}
|
||||||
|
showEmptyPlaceholder={true}
|
||||||
onChange={callback}
|
onChange={callback}
|
||||||
/>,
|
/>,
|
||||||
)
|
)
|
||||||
|
@ -68,7 +69,7 @@ describe('components/properties/dateRange', () => {
|
||||||
const fifteenth = Date.UTC(date.getFullYear(), date.getMonth(), 15, 12)
|
const fifteenth = Date.UTC(date.getFullYear(), date.getMonth(), 15, 12)
|
||||||
|
|
||||||
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('15')
|
const day = getByText('15')
|
||||||
|
@ -86,13 +87,14 @@ describe('components/properties/dateRange', () => {
|
||||||
<DateRange
|
<DateRange
|
||||||
className='octo-propertyvalue'
|
className='octo-propertyvalue'
|
||||||
value={''}
|
value={''}
|
||||||
|
showEmptyPlaceholder={true}
|
||||||
onChange={callback}
|
onChange={callback}
|
||||||
/>,
|
/>,
|
||||||
)
|
)
|
||||||
|
|
||||||
// open modal
|
// open modal
|
||||||
const {getByText, getByTitle} = render(component)
|
const {getByText, getByTitle} = render(component)
|
||||||
const dayDisplay = getByTitle('Empty')
|
const dayDisplay = getByText('Empty')
|
||||||
userEvent.click(dayDisplay)
|
userEvent.click(dayDisplay)
|
||||||
|
|
||||||
// select start date
|
// select start date
|
||||||
|
|
|
@ -7,7 +7,6 @@ exports[`components/properties/link returns link properties correctly 1`] = `
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
class="Editable octo-propertyvalue"
|
class="Editable octo-propertyvalue"
|
||||||
placeholder=""
|
|
||||||
title="https://github.com/mattermost/focalboard"
|
title="https://github.com/mattermost/focalboard"
|
||||||
value="https://github.com/mattermost/focalboard"
|
value="https://github.com/mattermost/focalboard"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue