提交 20a34348 编写于 作者: F fengweiyao

chore: update unit test

上级 95c6ed24
......@@ -191,11 +191,13 @@ describe('IndexList', () => {
pageY: 327
}, 0)
// scroll
const fixedEle = vm.$el.querySelector('.cube-index-list-fixed')
const fixedEle = vm.$el.querySelector('.cube-sticky-fixed .cube-index-list-anchor')
expect(fixedEle.textContent.trim())
.to.equal('B')
const el = vm.$el.querySelector('.cube-index-list-content')
vm.$refs.scroll.scroll.on('scrollEnd', () => {
const fixedEle = vm.$el.querySelector('.cube-sticky-fixed .cube-index-list-anchor')
expect(fixedEle.textContent.trim())
.to.equal('C')
done()
......@@ -257,10 +259,9 @@ describe('IndexList', () => {
}
], 100)
setTimeout(() => {
const fixedEl = vm.$el.querySelector('.cube-index-list-fixed')
const fixedEl = vm.$el.querySelector('.cube-sticky-fixed .cube-index-list-anchor')
expect(fixedEl.textContent.trim())
.to.equal('★热门城市')
dispatchSwipe(bEl, [
{
pageX: 300,
......@@ -272,6 +273,7 @@ describe('IndexList', () => {
}
], 100)
setTimeout(() => {
const fixedEl = vm.$el.querySelector('.cube-sticky-fixed .cube-index-list-anchor')
expect(fixedEl.textContent.trim())
.to.equal('Z')
done()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册