Meteor プロジェクトでmeteor-cucumber meteor-cucumberを使用していますが、これは cucumber.js を使用しています。
テストで 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 を無効なもの (例: 'articlesxxxx') に変更しても、テストは引き続きパスします。これは予期される動作ですか?
URL が見つからない場合は、ステップを失敗させたいと思います。