-
Notifications
You must be signed in to change notification settings - Fork 2.3k
5.1.0 breaks backwards compatibility with custom frameworks (calling afterEach
is now required)
#4087
Comments
afterEach
is now required)
This change adds support for using Serenity/JS with Protractor 5.0.0, 5.1.0 and 5.1.1: - `ProtractorNotifier` deals with Protractor 5.1.0 requirement for test frameworks to invoke `runner.afterEach` after every test, so that the browser is correctly restarted between the tests. See angular/protractor#4087 - `TestFrameworkDetector` registers `mochaOpts` and `cucumberOpts` as valid command line options, benefiting from angular/protractor#3994 and dealing with a bug introduced in Protractor 5.0.0, which prevents command line arguments from being passed on to custom test frameworks. See angular/protractor#3978 - Updated the examples and documentation to work with Protractor 5.1.x - Enables #18 Related issues: angular/protractor#3978 angular/protractor#3994 angular/protractor#4087 #18
The plan is for it to only be a requirement in 6.0. I am very surprised that 5.1 causes problems. |
Question: The same tests works in 5.0.0? And, in the tests you mentioned, is the control flow disabled? |
Actually, the only question is if the control flow is disabled. I could see how that change could be a problem if the control flow was disabled. |
I tested the same scenario switching between 5.1.1 and 5.0.0, and yes, the same test works with 5.0.0; in both cases:
However, this only happens with custom frameworks that don't invoke the Please let me know if I can be of more help. |
This is very surprising. The behavior shouldn't have changed when the control flow is enabled. |
Hi @sjelin!
It seems like as of this commit custom frameworks have to call
runner.afterEach
after every test, even though the documentation states that this will be a requirement starting from Protractor 6.0.0.We're adding support for this behaviour to Serenity/JS now to allow people to use Protractor 5.1.x, but I suppose the docs should be updated to clearly state that this is now a requirement?
To reproduce the problem, please install a custom framework, such as
protractor-cucumber-framework
and try to run several test scenarios withrestartBrowserBetweenTests
set totrue
.The browser does not get restarted.
Calling
runner.afterEach()
after every test solves the issue.(I see that you've requested support for this in protractor-cucumber-framework/protractor-cucumber-framework#67 by the way).
Best,
Jan
The text was updated successfully, but these errors were encountered: