Skip to content
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

Fix skip test filename #12675

Merged

Conversation

07souravkunda
Copy link
Contributor

Proposed changes

If no describe block present, onSuiteStart doesn't get called. This sends filename as undefined to browserstack observability. Use specs list for filename
//: # (Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.)

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

//: # (The current main branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against the v8 branch.)

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #XXXXX

Further comments

Reviewers: @webdriverio/project-committers

@erwinheitzman
Copy link
Member

A describe block is mandatory right now afaik and I do not think you can run without it. Are you able to run a "it" block that does not have a "describe" block after patching this locally?

@07souravkunda
Copy link
Contributor Author

@erwinheitzman Yes I am able to run without describe block. My test file looks like below

it("hello-1", () => {
})

it.skip("hello", () => {
})

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Can we raise a similar PR to the main branch?

I think technically a describe block is not needed but I am sure it will cause issues with many reporters in the WDIO ecosystem, which is why I would recommend to have them. Regardless, I think it is fine to move forward with this change.

@sauravdas1997 sauravdas1997 mentioned this pull request Apr 16, 2024
13 tasks
@christian-bromann christian-bromann added the PR: Polish 💅 PRs that contain improvements on existing features label Apr 18, 2024
@christian-bromann christian-bromann merged commit d4899d4 into webdriverio:v8 Apr 18, 2024
7 of 8 checks passed
@karanshah-browserstack
Copy link

@christian-bromann @erwinheitzman Any plans for release of v8 and v7 in near future?

@christian-bromann
Copy link
Member

Yes, looking into that right now.

JohnJoser3 pushed a commit to JohnJoser3/webdriverio-browserstack-docs that referenced this pull request May 3, 2024
* fix: skip test file outside describe block

* chore: null check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Polish 💅 PRs that contain improvements on existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants