Javascript 重复使用Dalek.js编写的测试
我开发了一些UI测试(使用Phantom.js配置运行) 例如,测试本身非常简单(请参见下面的一些示例代码):Javascript 重复使用Dalek.js编写的测试,javascript,node.js,ui-testing,Javascript,Node.js,Ui Testing,我开发了一些UI测试(使用Phantom.js配置运行) 例如,测试本身非常简单(请参见下面的一些示例代码): 浏览页面-确认预期的标题是否正确 单击按钮/项目从列表中选择项目-确认已选择正确的项目 module.exports = { 'NodeCeller home page': function (test) { test .open('http://localhost:3000') .assert.title().is('Node Cella
- 浏览页面-确认预期的标题是否正确
- 单击按钮/项目从列表中选择项目-确认已选择正确的项目
module.exports = { 'NodeCeller home page': function (test) { test .open('http://localhost:3000') .assert.title().is('Node Cellar', 'Node Cellar is now open') .done(); }, 'NodeCeller Start Browsing Click': function (test) { test .click('a[href="#wines"]') .assert.url('http://localhost:3000/#wines', 'Showing wines selection') .done(); }, 'NodeCellar Browse First Wine': function (test) { test .click('#content > div > ul > li > a') .assert.text('legend','Wine Details', 'Showing Wines Details') .done(); }, };