Commit 8189d0be authored by Eulyeon Ko's avatar Eulyeon Ko

Apply maintainer suggestions

Use toMatchObject for succinct testing
Simply pass down autocomplete="off"
parent 3746c284
......@@ -287,7 +287,7 @@ export default {
class="gl-relative"
:default-date="parsedDate"
show-clear-button
:autocomplete="'off'"
autocomplete="off"
@input="setDate"
@clear="setDate(null)"
/>
......
......@@ -120,9 +120,11 @@ describe('Sidebar date Widget', () => {
});
it('uses a correct prop to set the initial date for GlDatePicker', () => {
expect(findDatePicker().props('value')).toBe(null);
expect(findDatePicker().props('defaultDate')).toEqual(wrapper.vm.parsedDate);
expect(findDatePicker().props('autocomplete')).toEqual('off');
expect(findDatePicker().props()).toMatchObject({
value: null,
autocomplete: 'off',
defaultDate: expect.any(Object),
});
});
it('renders GlDatePicker', async () => {
......
Markdown is supported
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