here is my testing stack:
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"cucumber": "^1.3.3",
"protractor": "~5.1.2",
"protractor-cucumber-framework": "^3.1.0",
+ selenium-server-standalone-3.4.0.jar
When I run my scenario and an element is not found (the DOM have changed since last time I ran the tests), all steps are green, but the test ends with an exception:
[15:51:49] E/launcher - No element found using locator: by.cssContainingText("checkbox", "énergie")
[15:51:49] E/launcher - NoSuchElementError: No element found using locator: by.cssContainingText("checkbox", "énergie")
I expect the test to fail with a red result and the failing step should throw an exception message. It was the behavior when I was using Behat. Is there something bad configured with protractor or cucumber-js?
EDIT:
here is my implementation:
this.When(/^I fill "([^"]*)" step$/, function (step) {
element(by.cssContainingText("checkbox", "Électricité")).click();
element(by.cssContainingText("checkbox-multi", "Chauffage")).click();
element(by.buttonText("Suivant")).click();
});