【发布时间】:2017-05-15 14:43:42
【问题描述】:
我刚刚开始使用名为 testcafe 的东西。我希望断言我已收到带有选择器“#audit > h4”的列表。它需要 >= 1。我不确定 >= 1 使用的语法,或者它应该放在哪里作为 JS 的新手。
到目前为止,这是我的代码,第二个测试需要建议:
fixture `UI Tests`
.page `http://localhost:8080/`;
test('Clicking the search button', async t => {
await t
.click ('#search-result > div > div > button');
});
test('Asserting a list of audits', async t => {
await t
.expect('#audit > h4')
});
【问题讨论】:
-
是的,我昨天一整天都在营业,但我最初的问题仍然没有帮助我。
标签: javascript testing automated-tests e2e-testing testcafe