Skip to content

Commit 3d3dcd5

Browse files
committed
test: update snap
1 parent 23f5fba commit 3d3dcd5

File tree

2 files changed

+67
-64
lines changed

2 files changed

+67
-64
lines changed

components/date-picker/__tests__/WeekPicker.test.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { mount } from '@vue/test-utils';
2-
import { asyncExpect } from '../../../tests/utils';
2+
import { asyncExpect, setMockDate } from '../../../tests/utils';
33
import DatePicker from '..';
44
import focusTest from '../../../tests/shared/focusTest';
55

66
const { WeekPicker } = DatePicker;
77
jest.mock('../../_util/Portal');
88
describe('WeekPicker', () => {
9+
beforeEach(() => {
10+
setMockDate();
11+
});
912
focusTest(WeekPicker);
1013

1114
it('should support style prop', async () => {

components/date-picker/__tests__/__snapshots__/WeekPicker.test.js.snap

+63-63
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exports[`WeekPicker should support style prop 1`] = `
1212
<div tabindex="-1" class="ant-picker-panel ant-picker-panel-focused">
1313
<div class="ant-picker-week-panel">
1414
<div class="ant-picker-header"><button type="button" tabindex="-1" class="ant-picker-header-super-prev-btn"><span class="ant-picker-super-prev-icon"></span></button><button type="button" tabindex="-1" class="ant-picker-header-prev-btn"><span class="ant-picker-prev-icon"></span></button>
15-
<div class="ant-picker-header-view"><button type="button" tabindex="-1" class="ant-picker-month-btn">Jan</button><button type="button" tabindex="-1" class="ant-picker-year-btn">2022</button></div><button type="button" tabindex="-1" class="ant-picker-header-next-btn"><span class="ant-picker-next-icon"></span></button><button type="button" tabindex="-1" class="ant-picker-header-super-next-btn"><span class="ant-picker-super-next-icon"></span></button>
15+
<div class="ant-picker-header-view"><button type="button" tabindex="-1" class="ant-picker-month-btn">Sep</button><button type="button" tabindex="-1" class="ant-picker-year-btn">2017</button></div><button type="button" tabindex="-1" class="ant-picker-header-next-btn"><span class="ant-picker-next-icon"></span></button><button type="button" tabindex="-1" class="ant-picker-header-super-next-btn"><span class="ant-picker-super-next-icon"></span></button>
1616
</div>
1717
<div class="ant-picker-body">
1818
<table class="ant-picker-content">
@@ -30,148 +30,148 @@ exports[`WeekPicker should support style prop 1`] = `
3030
</thead>
3131
<tbody>
3232
<tr class="ant-picker-week-panel-row">
33-
<td class="ant-picker-cell ant-picker-cell-week">1</td>
34-
<td title="2021-12-26" class="ant-picker-cell">
35-
<div class="ant-picker-cell-inner">26</div>
36-
</td>
37-
<td title="2021-12-27" class="ant-picker-cell">
33+
<td class="ant-picker-cell ant-picker-cell-week">35</td>
34+
<td title="2017-08-27" class="ant-picker-cell">
3835
<div class="ant-picker-cell-inner">27</div>
3936
</td>
40-
<td title="2021-12-28" class="ant-picker-cell">
37+
<td title="2017-08-28" class="ant-picker-cell">
4138
<div class="ant-picker-cell-inner">28</div>
4239
</td>
43-
<td title="2021-12-29" class="ant-picker-cell">
40+
<td title="2017-08-29" class="ant-picker-cell">
4441
<div class="ant-picker-cell-inner">29</div>
4542
</td>
46-
<td title="2021-12-30" class="ant-picker-cell">
43+
<td title="2017-08-30" class="ant-picker-cell">
4744
<div class="ant-picker-cell-inner">30</div>
4845
</td>
49-
<td title="2021-12-31" class="ant-picker-cell ant-picker-cell-end">
46+
<td title="2017-08-31" class="ant-picker-cell">
5047
<div class="ant-picker-cell-inner">31</div>
5148
</td>
52-
<td title="2022-01-01" class="ant-picker-cell ant-picker-cell-start ant-picker-cell-in-view">
49+
<td title="2017-09-01" class="ant-picker-cell ant-picker-cell-start ant-picker-cell-in-view">
5350
<div class="ant-picker-cell-inner">1</div>
5451
</td>
55-
</tr>
56-
<tr class="ant-picker-week-panel-row">
57-
<td class="ant-picker-cell ant-picker-cell-week">2</td>
58-
<td title="2022-01-02" class="ant-picker-cell ant-picker-cell-in-view">
52+
<td title="2017-09-02" class="ant-picker-cell ant-picker-cell-in-view">
5953
<div class="ant-picker-cell-inner">2</div>
6054
</td>
61-
<td title="2022-01-03" class="ant-picker-cell ant-picker-cell-in-view">
55+
</tr>
56+
<tr class="ant-picker-week-panel-row">
57+
<td class="ant-picker-cell ant-picker-cell-week">36</td>
58+
<td title="2017-09-03" class="ant-picker-cell ant-picker-cell-in-view">
6259
<div class="ant-picker-cell-inner">3</div>
6360
</td>
64-
<td title="2022-01-04" class="ant-picker-cell ant-picker-cell-in-view">
61+
<td title="2017-09-04" class="ant-picker-cell ant-picker-cell-in-view">
6562
<div class="ant-picker-cell-inner">4</div>
6663
</td>
67-
<td title="2022-01-05" class="ant-picker-cell ant-picker-cell-in-view">
64+
<td title="2017-09-05" class="ant-picker-cell ant-picker-cell-in-view">
6865
<div class="ant-picker-cell-inner">5</div>
6966
</td>
70-
<td title="2022-01-06" class="ant-picker-cell ant-picker-cell-in-view">
67+
<td title="2017-09-06" class="ant-picker-cell ant-picker-cell-in-view">
7168
<div class="ant-picker-cell-inner">6</div>
7269
</td>
73-
<td title="2022-01-07" class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today">
70+
<td title="2017-09-07" class="ant-picker-cell ant-picker-cell-in-view">
7471
<div class="ant-picker-cell-inner">7</div>
7572
</td>
76-
<td title="2022-01-08" class="ant-picker-cell ant-picker-cell-in-view">
73+
<td title="2017-09-08" class="ant-picker-cell ant-picker-cell-in-view">
7774
<div class="ant-picker-cell-inner">8</div>
7875
</td>
79-
</tr>
80-
<tr class="ant-picker-week-panel-row">
81-
<td class="ant-picker-cell ant-picker-cell-week">3</td>
82-
<td title="2022-01-09" class="ant-picker-cell ant-picker-cell-in-view">
76+
<td title="2017-09-09" class="ant-picker-cell ant-picker-cell-in-view">
8377
<div class="ant-picker-cell-inner">9</div>
8478
</td>
85-
<td title="2022-01-10" class="ant-picker-cell ant-picker-cell-in-view">
79+
</tr>
80+
<tr class="ant-picker-week-panel-row">
81+
<td class="ant-picker-cell ant-picker-cell-week">37</td>
82+
<td title="2017-09-10" class="ant-picker-cell ant-picker-cell-in-view">
8683
<div class="ant-picker-cell-inner">10</div>
8784
</td>
88-
<td title="2022-01-11" class="ant-picker-cell ant-picker-cell-in-view">
85+
<td title="2017-09-11" class="ant-picker-cell ant-picker-cell-in-view">
8986
<div class="ant-picker-cell-inner">11</div>
9087
</td>
91-
<td title="2022-01-12" class="ant-picker-cell ant-picker-cell-in-view">
88+
<td title="2017-09-12" class="ant-picker-cell ant-picker-cell-in-view">
9289
<div class="ant-picker-cell-inner">12</div>
9390
</td>
94-
<td title="2022-01-13" class="ant-picker-cell ant-picker-cell-in-view">
91+
<td title="2017-09-13" class="ant-picker-cell ant-picker-cell-in-view">
9592
<div class="ant-picker-cell-inner">13</div>
9693
</td>
97-
<td title="2022-01-14" class="ant-picker-cell ant-picker-cell-in-view">
94+
<td title="2017-09-14" class="ant-picker-cell ant-picker-cell-in-view">
9895
<div class="ant-picker-cell-inner">14</div>
9996
</td>
100-
<td title="2022-01-15" class="ant-picker-cell ant-picker-cell-in-view">
97+
<td title="2017-09-15" class="ant-picker-cell ant-picker-cell-in-view">
10198
<div class="ant-picker-cell-inner">15</div>
10299
</td>
103-
</tr>
104-
<tr class="ant-picker-week-panel-row">
105-
<td class="ant-picker-cell ant-picker-cell-week">4</td>
106-
<td title="2022-01-16" class="ant-picker-cell ant-picker-cell-in-view">
100+
<td title="2017-09-16" class="ant-picker-cell ant-picker-cell-in-view">
107101
<div class="ant-picker-cell-inner">16</div>
108102
</td>
109-
<td title="2022-01-17" class="ant-picker-cell ant-picker-cell-in-view">
103+
</tr>
104+
<tr class="ant-picker-week-panel-row">
105+
<td class="ant-picker-cell ant-picker-cell-week">38</td>
106+
<td title="2017-09-17" class="ant-picker-cell ant-picker-cell-in-view">
110107
<div class="ant-picker-cell-inner">17</div>
111108
</td>
112-
<td title="2022-01-18" class="ant-picker-cell ant-picker-cell-in-view">
109+
<td title="2017-09-18" class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today">
113110
<div class="ant-picker-cell-inner">18</div>
114111
</td>
115-
<td title="2022-01-19" class="ant-picker-cell ant-picker-cell-in-view">
112+
<td title="2017-09-19" class="ant-picker-cell ant-picker-cell-in-view">
116113
<div class="ant-picker-cell-inner">19</div>
117114
</td>
118-
<td title="2022-01-20" class="ant-picker-cell ant-picker-cell-in-view">
115+
<td title="2017-09-20" class="ant-picker-cell ant-picker-cell-in-view">
119116
<div class="ant-picker-cell-inner">20</div>
120117
</td>
121-
<td title="2022-01-21" class="ant-picker-cell ant-picker-cell-in-view">
118+
<td title="2017-09-21" class="ant-picker-cell ant-picker-cell-in-view">
122119
<div class="ant-picker-cell-inner">21</div>
123120
</td>
124-
<td title="2022-01-22" class="ant-picker-cell ant-picker-cell-in-view">
121+
<td title="2017-09-22" class="ant-picker-cell ant-picker-cell-in-view">
125122
<div class="ant-picker-cell-inner">22</div>
126123
</td>
127-
</tr>
128-
<tr class="ant-picker-week-panel-row">
129-
<td class="ant-picker-cell ant-picker-cell-week">5</td>
130-
<td title="2022-01-23" class="ant-picker-cell ant-picker-cell-in-view">
124+
<td title="2017-09-23" class="ant-picker-cell ant-picker-cell-in-view">
131125
<div class="ant-picker-cell-inner">23</div>
132126
</td>
133-
<td title="2022-01-24" class="ant-picker-cell ant-picker-cell-in-view">
127+
</tr>
128+
<tr class="ant-picker-week-panel-row">
129+
<td class="ant-picker-cell ant-picker-cell-week">39</td>
130+
<td title="2017-09-24" class="ant-picker-cell ant-picker-cell-in-view">
134131
<div class="ant-picker-cell-inner">24</div>
135132
</td>
136-
<td title="2022-01-25" class="ant-picker-cell ant-picker-cell-in-view">
133+
<td title="2017-09-25" class="ant-picker-cell ant-picker-cell-in-view">
137134
<div class="ant-picker-cell-inner">25</div>
138135
</td>
139-
<td title="2022-01-26" class="ant-picker-cell ant-picker-cell-in-view">
136+
<td title="2017-09-26" class="ant-picker-cell ant-picker-cell-in-view">
140137
<div class="ant-picker-cell-inner">26</div>
141138
</td>
142-
<td title="2022-01-27" class="ant-picker-cell ant-picker-cell-in-view">
139+
<td title="2017-09-27" class="ant-picker-cell ant-picker-cell-in-view">
143140
<div class="ant-picker-cell-inner">27</div>
144141
</td>
145-
<td title="2022-01-28" class="ant-picker-cell ant-picker-cell-in-view">
142+
<td title="2017-09-28" class="ant-picker-cell ant-picker-cell-in-view">
146143
<div class="ant-picker-cell-inner">28</div>
147144
</td>
148-
<td title="2022-01-29" class="ant-picker-cell ant-picker-cell-in-view">
145+
<td title="2017-09-29" class="ant-picker-cell ant-picker-cell-in-view">
149146
<div class="ant-picker-cell-inner">29</div>
150147
</td>
151-
</tr>
152-
<tr class="ant-picker-week-panel-row">
153-
<td class="ant-picker-cell ant-picker-cell-week">6</td>
154-
<td title="2022-01-30" class="ant-picker-cell ant-picker-cell-in-view">
148+
<td title="2017-09-30" class="ant-picker-cell ant-picker-cell-in-view">
155149
<div class="ant-picker-cell-inner">30</div>
156150
</td>
157-
<td title="2022-01-31" class="ant-picker-cell ant-picker-cell-in-view">
158-
<div class="ant-picker-cell-inner">31</div>
159-
</td>
160-
<td title="2022-02-01" class="ant-picker-cell ant-picker-cell-start">
151+
</tr>
152+
<tr class="ant-picker-week-panel-row">
153+
<td class="ant-picker-cell ant-picker-cell-week">40</td>
154+
<td title="2017-10-01" class="ant-picker-cell ant-picker-cell-start">
161155
<div class="ant-picker-cell-inner">1</div>
162156
</td>
163-
<td title="2022-02-02" class="ant-picker-cell">
157+
<td title="2017-10-02" class="ant-picker-cell">
164158
<div class="ant-picker-cell-inner">2</div>
165159
</td>
166-
<td title="2022-02-03" class="ant-picker-cell">
160+
<td title="2017-10-03" class="ant-picker-cell">
167161
<div class="ant-picker-cell-inner">3</div>
168162
</td>
169-
<td title="2022-02-04" class="ant-picker-cell">
163+
<td title="2017-10-04" class="ant-picker-cell">
170164
<div class="ant-picker-cell-inner">4</div>
171165
</td>
172-
<td title="2022-02-05" class="ant-picker-cell">
166+
<td title="2017-10-05" class="ant-picker-cell">
173167
<div class="ant-picker-cell-inner">5</div>
174168
</td>
169+
<td title="2017-10-06" class="ant-picker-cell">
170+
<div class="ant-picker-cell-inner">6</div>
171+
</td>
172+
<td title="2017-10-07" class="ant-picker-cell">
173+
<div class="ant-picker-cell-inner">7</div>
174+
</td>
175175
</tr>
176176
</tbody>
177177
</table>

0 commit comments

Comments
 (0)