- Added `convertStatus` in `wdio-cucumber-framework` to map `PENDING` to 'pending'
- Updated `CucumberFormatter` to emit `test:pending` for PENDING steps
- Modified `WDIOReporter` to track and handle pending tests
- Extended `SpecReporter` to display pending count
- Updated types and added unit/smoke tests
Fixes [#5359](https://github.com/webdriverio/webdriverio/issues/5359)
* fix(@wdio/runner): Respect excludes in capabilities in multiremote case.
Fixes#13875.
When a spec is excluded from some capability there is no point of starting the browser session for it.
* squash: Fix comments.
* squash: Adds smoke test.
* Update packages/wdio-runner/src/index.ts
---------
Co-authored-by: Christian Bromann <git@bromann.dev>
* chore(build): ignore stale package directories
Switching between major versions where packages were added/removed
causes build failures because git does not remove empty directories.
* test: correct cucumber feature file execution
* test: run cucumber feature with line number only once
* test: add dummy scenario to verify line number execution
If the dummy scenario were to ever execute, it would break the
previously introduced test logic.
* test: move "once"-check into assertExecutingFeatureFile
This simplifies the smoke test a lot.
* fix(wdio-cucumber-framework): filter cucumberFeaturesWithLineNumbers (webdriverio#13560)
While `_specs` has already been filtered here, `cucumberFeaturesWithLineNumbers`,
which just exists to retain the line numbers, still contains all specs as passed
on the cmdline or in the config. Therefore, just passing these to cucumber will
inevitably execute all feature lines in every worker. To fix this, we only retain
those entries in `cucumberFeaturesWithLineNumbers`, for which we can find a cor-
responding entry in the list of already filtered `_spec`s.
* style: replace some deep imports with package imports
---------
Co-authored-by: Christian Bromann <git@bromann.dev>
* fix(infra): retry type generation
* remove link
* remove package linking in pipelines
* fix path in smoke tests
* remove another link call
* better resolve wdio modules in browser-runner
* fixes
* make it work on Windows
* more fixes
* more windows fixes
* unit test fix
* another windows fix
* fix e2e commands
* remove shx dep
* e2e memory leak test (#13209)
* fix(@wdio/reporter): deduplicate long scripts in TestStats (#13209)
* fix(@wdio/reporter): transform scripts in TestStats (#13209)
To avoid leaking memory due to execution of large scripts, we transform
them for internal use, similiar to `transformCommandLogResult`. Other
registered event handlers will still receive the full scripts (we're actually
copying the `payload.body`, instead of modifying it in-place).
* `execute` memory leak smoke test (#13209)
* Copy test improvements to e2e test
* avoid single last script leak via RegExp.input
While the global static properties on `RegExp` are deprecated, they are still populated by NodeJS and it is prudent to clear them when
matching against potentially large inputs.
* remove e2e memory leak tests (#13209)
* fix smoke test memory leak due to nock timers (#13209)
This does **not** resolve an additional memory leak
of the last request+response pair happening in the
nock interceptor. Neither abortPendingRequests, nor
cleanAll, clears that leak. Since it's only one 2MB
request+response pair, just accept it.
* fix typo
---------
Co-authored-by: Christian Bromann <git@bromann.dev>
* dynamically collect test results in global var
* improve testFnWrapper for Jasmine
* create error message for 'after-hook' variable
* fix
* Update packages/wdio-utils/src/test-framework/testFnWrapper.ts
* Update packages/wdio-utils/src/test-framework/testFnWrapper.ts
* Update packages/wdio-utils/src/test-framework/testFnWrapper.ts
* add files with expected results
* add tests
* add config and write test results to files in afterTest()
* fix: assign test results to 'result' to avoid 'undefined'
* add smoke test and optimize assertions counting dynamic values
* fix
---------
Co-authored-by: Christian Bromann <git@bromann.dev>
* add method for filtering test specs
* add method for checking CLI --spec arg is a path or not
* create methods for handling CLI --spec arg as glob-pattern
* make glob-pattern from CLI --spec arg (only single test spec name)
* remove glob-pattern from CLI --spec arg before filtering
* get filtered specs by CLI --spec arg
* typo correction
* add test specs
* add config-files
* add tests to smoke.runner
* revert previous changes
* fix --spec arg issue
* revert previous changes
* change param name in merge() and delete outputDir from config
* optimize method cliSpecArgContainsPathstoSpecs
* update test spec name
* update jsdoc
* refactoring
* improve tests
* refactoring
* update configs
* fix path resolving in the Launcher interface
* update launch() and tests structure
---------
Co-authored-by: Christian Bromann <git@bromann.dev>
* Adopt latest Cucumber API interface
* enabling scenarioLevelReporter back
* fix smoke test on windows
* enable failAmbiguous,ignoreUndefined & tagsInTitle
* enabling step retries
* fix unit test
* enabling unit test for cucumberFormatter
* updating reporter params
* Adding support for skip test based on caps
* fix unit test & remove unused packages
* incorporating review comments
* add deprecated message & closing stream
* escape reserved char of tag expression
* add: cwd param and relative uri pathing for getPickleIds
* add:update cucumber test steps to reflect changes to Github.com
* add:update cucumber test steps to reflect changes to Github.com
* Update examples/wdio/cucumber/step-definitions.js
Co-authored-by: Christian Bromann <git@bromann.dev>
* Update packages/wdio-cucumber-framework/src/cucumberEventListener.ts
Co-authored-by: Christian Bromann <git@bromann.dev>
* Update packages/wdio-cucumber-framework/src/cucumberEventListener.ts
Co-authored-by: Christian Bromann <git@bromann.dev>
* Update packages/wdio-cucumber-framework/src/cucumberEventListener.ts
Co-authored-by: Christian Bromann <git@bromann.dev>
* fix: use node:path
* add:smoke test for running scenario by line number
---------
Co-authored-by: Christian Bromann <git@bromann.dev>
* (jasmine): bring back jasmine assertions
* add unit and smoke tests
* add smoke tests for different matcher types
* add smoke test for expectationResultHandler
* fix unit test
* fix type generation in windows
* fix import
- Remove spacial Jasmine error handling in testFnWrapper.ts and relevent types.
- Added a smoke test to ensure this bug is fixed
Co-authored-by: Hagai Shatz <hagai.shatz@gmail.com>
Co-authored-by: Christian Bromann <git@bromann.dev>