Commit 1d37197f authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

fix unlink-panels test

parent 343e9fa4
...@@ -1140,10 +1140,10 @@ describe('DatePicker', () => { ...@@ -1140,10 +1140,10 @@ describe('DatePicker', () => {
setTimeout(_ => { setTimeout(_ => {
const left = panels[0].querySelector('.el-date-range-picker__header'); const left = panels[0].querySelector('.el-date-range-picker__header');
const right = panels[1].querySelector('.is-right .el-date-range-picker__header'); const right = panels[1].querySelector('.is-right .el-date-range-picker__header');
const leftText = left.textContent.match(/\d+/g); const leftText = left.textContent.match(/\d+/g).map(i => Number(i));
const rightText = right.textContent.match(/\d+/g); const rightText = right.textContent.match(/\d+/g).map(i => Number(i));
expect(rightText[0] - leftText[0]).to.equal(1); expect((rightText[1] <= 2 ? rightText[0] - 1 : rightText[0]) - leftText[0]).to.equal(1);
expect((rightText[1] <= 2 ? rightText[1] + 12 : rightText[1]) - leftText[1]).to.equal(2); expect((rightText[1] <= 2 ? rightText[1] + 12 : rightText[1]) - leftText[1]).to.equal(2);
done(); done();
......
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