Browse Source

test: update snap

pull/5147/head
tangjinzhou 3 years ago
parent
commit
3d3dcd5c44
  1. 5
      components/date-picker/__tests__/WeekPicker.test.js
  2. 126
      components/date-picker/__tests__/__snapshots__/WeekPicker.test.js.snap

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

@ -1,11 +1,14 @@
import { mount } from '@vue/test-utils';
import { asyncExpect } from '../../../tests/utils';
import { asyncExpect, setMockDate } from '../../../tests/utils';
import DatePicker from '..';
import focusTest from '../../../tests/shared/focusTest';
const { WeekPicker } = DatePicker;
jest.mock('../../_util/Portal');
describe('WeekPicker', () => {
beforeEach(() => {
setMockDate();
});
focusTest(WeekPicker);
it('should support style prop', async () => {

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

@ -12,7 +12,7 @@ exports[`WeekPicker should support style prop 1`] = `
<div tabindex="-1" class="ant-picker-panel ant-picker-panel-focused">
<div class="ant-picker-week-panel">
<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>
<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>
<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>
</div>
<div class="ant-picker-body">
<table class="ant-picker-content">
@ -30,148 +30,148 @@ exports[`WeekPicker should support style prop 1`] = `
</thead>
<tbody>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">1</td>
<td title="2021-12-26" class="ant-picker-cell">
<div class="ant-picker-cell-inner">26</div>
</td>
<td title="2021-12-27" class="ant-picker-cell">
<td class="ant-picker-cell ant-picker-cell-week">35</td>
<td title="2017-08-27" class="ant-picker-cell">
<div class="ant-picker-cell-inner">27</div>
</td>
<td title="2021-12-28" class="ant-picker-cell">
<td title="2017-08-28" class="ant-picker-cell">
<div class="ant-picker-cell-inner">28</div>
</td>
<td title="2021-12-29" class="ant-picker-cell">
<td title="2017-08-29" class="ant-picker-cell">
<div class="ant-picker-cell-inner">29</div>
</td>
<td title="2021-12-30" class="ant-picker-cell">
<td title="2017-08-30" class="ant-picker-cell">
<div class="ant-picker-cell-inner">30</div>
</td>
<td title="2021-12-31" class="ant-picker-cell ant-picker-cell-end">
<td title="2017-08-31" class="ant-picker-cell">
<div class="ant-picker-cell-inner">31</div>
</td>
<td title="2022-01-01" class="ant-picker-cell ant-picker-cell-start ant-picker-cell-in-view">
<td title="2017-09-01" class="ant-picker-cell ant-picker-cell-start ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">1</div>
</td>
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">2</td>
<td title="2022-01-02" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-02" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">2</div>
</td>
<td title="2022-01-03" class="ant-picker-cell ant-picker-cell-in-view">
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">36</td>
<td title="2017-09-03" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">3</div>
</td>
<td title="2022-01-04" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-04" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">4</div>
</td>
<td title="2022-01-05" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-05" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">5</div>
</td>
<td title="2022-01-06" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-06" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">6</div>
</td>
<td title="2022-01-07" class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today">
<td title="2017-09-07" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">7</div>
</td>
<td title="2022-01-08" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-08" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">8</div>
</td>
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">3</td>
<td title="2022-01-09" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-09" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">9</div>
</td>
<td title="2022-01-10" class="ant-picker-cell ant-picker-cell-in-view">
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">37</td>
<td title="2017-09-10" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">10</div>
</td>
<td title="2022-01-11" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-11" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">11</div>
</td>
<td title="2022-01-12" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-12" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">12</div>
</td>
<td title="2022-01-13" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-13" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">13</div>
</td>
<td title="2022-01-14" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-14" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">14</div>
</td>
<td title="2022-01-15" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-15" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">15</div>
</td>
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">4</td>
<td title="2022-01-16" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-16" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">16</div>
</td>
<td title="2022-01-17" class="ant-picker-cell ant-picker-cell-in-view">
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">38</td>
<td title="2017-09-17" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">17</div>
</td>
<td title="2022-01-18" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-18" class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today">
<div class="ant-picker-cell-inner">18</div>
</td>
<td title="2022-01-19" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-19" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">19</div>
</td>
<td title="2022-01-20" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-20" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">20</div>
</td>
<td title="2022-01-21" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-21" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">21</div>
</td>
<td title="2022-01-22" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-22" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">22</div>
</td>
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">5</td>
<td title="2022-01-23" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-23" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">23</div>
</td>
<td title="2022-01-24" class="ant-picker-cell ant-picker-cell-in-view">
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">39</td>
<td title="2017-09-24" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">24</div>
</td>
<td title="2022-01-25" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-25" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">25</div>
</td>
<td title="2022-01-26" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-26" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">26</div>
</td>
<td title="2022-01-27" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-27" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">27</div>
</td>
<td title="2022-01-28" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-28" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">28</div>
</td>
<td title="2022-01-29" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-29" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">29</div>
</td>
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">6</td>
<td title="2022-01-30" class="ant-picker-cell ant-picker-cell-in-view">
<td title="2017-09-30" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">30</div>
</td>
<td title="2022-01-31" class="ant-picker-cell ant-picker-cell-in-view">
<div class="ant-picker-cell-inner">31</div>
</td>
<td title="2022-02-01" class="ant-picker-cell ant-picker-cell-start">
</tr>
<tr class="ant-picker-week-panel-row">
<td class="ant-picker-cell ant-picker-cell-week">40</td>
<td title="2017-10-01" class="ant-picker-cell ant-picker-cell-start">
<div class="ant-picker-cell-inner">1</div>
</td>
<td title="2022-02-02" class="ant-picker-cell">
<td title="2017-10-02" class="ant-picker-cell">
<div class="ant-picker-cell-inner">2</div>
</td>
<td title="2022-02-03" class="ant-picker-cell">
<td title="2017-10-03" class="ant-picker-cell">
<div class="ant-picker-cell-inner">3</div>
</td>
<td title="2022-02-04" class="ant-picker-cell">
<td title="2017-10-04" class="ant-picker-cell">
<div class="ant-picker-cell-inner">4</div>
</td>
<td title="2022-02-05" class="ant-picker-cell">
<td title="2017-10-05" class="ant-picker-cell">
<div class="ant-picker-cell-inner">5</div>
</td>
<td title="2017-10-06" class="ant-picker-cell">
<div class="ant-picker-cell-inner">6</div>
</td>
<td title="2017-10-07" class="ant-picker-cell">
<div class="ant-picker-cell-inner">7</div>
</td>
</tr>
</tbody>
</table>

Loading…
Cancel
Save