谁能建议滚动功能的测试用例?

时间:2019-07-23 06:15:27

标签: vue.js vue-test-utils

我想为window.onscroll编写测试用例。

scroll () {
  window.onscroll = () => {
    if (this.contentType.toLowerCase() != this.allContentTypes.all.toLowerCase()) {
      if (((window.innerHeight+window.scrollY) >= document.body.scrollHeight-100) && (this.allSearchResults.length < this.searchResultsCount) && this.loading >= 0) {
        this.pageNumber = this.pageNumber+1
        this.getAllSearchResultForContentType()
      }
    }
  }
},

0 个答案:

没有答案