Meteor 验证Cucumber.js中是否遵循url

Meteor 验证Cucumber.js中是否遵循url,meteor,cucumber,cucumberjs,Meteor,Cucumber,Cucumberjs,我在meteor项目中使用meteor Cumber,该项目反过来使用cumber.js 我希望测试导航到url,但如果url无效,则可能会出现错误。在这种情况下,有效的url是/articles this.When(/^I navigate to '\/articles'$/, function () { this.browser.url(process.env.ROOT_URL, 'articles'; }); 这将产生一个合格的测试 Scenario: View list of a

我在meteor项目中使用meteor Cumber,该项目反过来使用cumber.js

我希望测试导航到url,但如果url无效,则可能会出现错误。在这种情况下,有效的url是/articles

this.When(/^I navigate to '\/articles'$/, function () {
  this.browser.url(process.env.ROOT_URL, 'articles'; 
});
这将产生一个合格的测试

Scenario: View list of articles                     #   features/articles/read_article.feature:8
  Given I am logged in                              # features/articles/read_article.feature:9
  When I navigate to '/articles'                    # features/articles/read_article.feature:10
  Then I should see a list of articles in tile view # features/articles/read_article.feature:11


1 scenario (1 pending)
3 steps (1 pending, 2 passed)
当我将url更改为无效内容(例如:“Articlesxxx”)时,测试仍然通过。这是预期的行为吗

如果找不到url,我希望该步骤失败

相关的: