lee-tanghui / vue-testing-demo Goto Github PK
View Code? Open in Web Editor NEWVue单元测试实战教程(Mocha/Karma + Vue-Test-Utils + Chai)
Vue单元测试实战教程(Mocha/Karma + Vue-Test-Utils + Chai)
// 定义 Bing 页面中的节点.
const searchInput = '#sb_form_q'
const searchBtn = '#sb_form_go'
const question = '平安银行'
// 启动浏览器并打开 bing.com.
client.url('http://bing.com').maximizeWindow()
// 确保 "body" 和输入框可以使用.
client.expect.element('body').to.be.present
client.expect.element(searchInput).to.be.visible
client.pause(2000) // 稍等两秒.
// client.waitForElementPresent('body', 8000);
// 输入 "what is microsoft" 然后搜索.
client.setValue(searchInput, question)
client.click(searchBtn)
client.pause(2000)
// 截一张图然后保存到 "reports/answer.png".
client.expect.element('body').to.be.present
client.saveScreenshot('reports/answers.png')
client.pause(10000)
client.end()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.