New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug #7739] Fix preferScenarioName logic #7740
[Bug #7739] Fix preferScenarioName logic #7740
Conversation
… status different of skipped.
|
@christian-bromann Could you please verify these checks that failed? I fixed the tests related to wdio-browserstack-service package and all passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you find out who implemented this in the first place and what the intention behind that implementation was?
@@ -121,7 +121,7 @@ export default class BrowserstackService implements Services.ServiceInstance { | |||
*/ | |||
afterScenario (world: Frameworks.World) { | |||
const status = world.result?.status.toLowerCase() | |||
if (status === 'skipped') { | |||
if (status !== 'skipped') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems odd to me. Someone before made this code intentionally check for skipped
. I am afraid with this patch that we introduce a regression for something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christian-bromann as I said in the bug #7740 , the option preferScenarioName
that has the purpose of display the scenario's name as session name in Browserstack is not working with the previous code, since it works just when scenario has status skipped, that no make sense. I checked in the history of this code and the change was made when you change the code to typescript, maybe you made a mistake when changed this part of the code.
Hi @christian-bromann . Any updates to this PR? |
I haven't found any time to investigate the change. I still find it odd that the current implementation is completely getting turned around. I want to make sure we don't run into any regressions. |
ok! Just to make it clear, the code that I changed is in the same way that original code from this file (see history e20be1f#diff-e44d73826b5a9f951211dcb5b02f9462e3c489fd708d091f881b78cc86d2f724) . The operator was changed to a wrong way when the file was migrated to typescript (see history 1a7d262#diff-e44d73826b5a9f951211dcb5b02f9462e3c489fd708d091f881b78cc86d2f724). I tested it in my project locally and the |
Hey @webdriverio/project-committers Could we listen to @denise-maia-ribeiro and merge this? Appreciate it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nextlevelbeard thanks for bumping and sorry @denise-maia-ribeiro that this took so long.
I digged into the change history and found indeed the commit that caused the regression: https://github.com/webdriverio/webdriverio/pull/6302/files#diff-e44d73826b5a9f951211dcb5b02f9462e3c489fd708d091f881b78cc86d2f724L105-L108
With a second recommendation I am happy to move forward and merge. Thanks all for your contribution to this!
Thank you @nextlevelbeard for support it! Finally it was merged, thank you @christian-bromann! Do you have a prevision about when it will be applied in a new @wdio/browserstack-service version? |
@denise-maia-ribeiro running a release now, so any second. |
preferScenarioName set to true is not working in webdriverio. |
Hey @Awukam , thanks for your comment. Just saying something doesn't work really doesn't help to understand what you are going for. I recommend to provide your expected behavior and show what the current behavior is. Furthermore it is always a good idea in Open Source to be pro active and contribute by eventually propose a pull request rather than demanding to look into something that has been resolved. Thank you! |
Proposed changes
Updating if method from
afterScenario
method to put scenario's name intothis._scenariosThatRan
only if test status is different from 'skipped' to make optionpreferScenarioName
works when enabled. Fix bug #7739Types of changes
Checklist
Further comments
Reviewers: @webdriverio/project-committers