Commit graph

81 commits

Author SHA1 Message Date
Luis Zurro
0c77bb1791
feat(cucumber): Fix skipping tests with skip tag (#14672)
Fixes #14671
2025-07-30 22:21:52 -07:00
Christian Bromann
072e551378
fix(@wdio/jasmine-framework): fix smoke tests 2025-06-18 16:22:45 -07:00
Christian Bromann
edefdd23b4
fix(@wdio/jasmine-framework): fix smoke tests 2025-06-18 14:20:20 -07:00
Siarhei Kliushnikau
948a387dd0
[WDIO9] added wildcards for cli (#14243)
* added wildcards for cli

* added filterDublicationArrayItems

* regression fixes

* added condition to utils

* added guard for wildcard values

* added type guard

* added isValidRegex

* linter fixes
2025-03-05 09:45:41 -08:00
Avron Souto
4757d7e50d
feat(cucumber): Distinguish Cucumber PENDING status in reporters (#14234)
- 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)
2025-03-02 13:17:38 -08:00
Christian Bromann
a2ae35332f
chore: upgrade to Eslint v9 (#13867)
* chore: upgrade to Eslint v9

* fix remaining issues

* more type fixes

* resolve remaining issues

* use wdio eslint package

* PR feedback
2024-12-18 11:55:43 -08:00
Дамян Минков
6d146cd332
fix(@wdio/runner): Respect excludes in capabilities in multiremote case. (#13878)
* 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>
2024-11-14 10:10:24 -08:00
Christian Bromann
943a698a5a
fix(webdriverio): improve switchFrame behavior (#13781)
* fix(webdriverio): improve switchFrame behavior

* progress

* fix tests

* resolve race conditions

* fix unit test

* minor tweak

* minor tweaks to test
2024-10-26 19:25:23 -07:00
Christian Bromann
62a9645953
fix(webdriver): restore request retries (#13649) 2024-09-23 23:05:02 -07:00
Chanatan Charnkijtawarush
335fdf7c4b
Add file to cucumber options (#13616) 2024-09-20 07:19:32 -07:00
Johannes Pfrang
d6c0af67c6
fix(wdio-cucumber-framework): filter cucumberFeaturesWithLineNumbers (#13564)
* 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>
2024-09-17 02:57:43 -07:00
Christian Bromann
b84bcf6d76
fix(infra): retry type generation (#13385)
* 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
2024-08-18 19:06:55 -07:00
Johannes Pfrang
7867ac7391
fix(@wdio/reporter): transform scripts in TestStats (#13209) (#13219)
* 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>
2024-08-16 15:19:23 -07:00
Christian Bromann
80779bb429
breaking(build): migrate to Esbuild for bundling (#13338)
* breaking(build): migrate to Rollup for bundling

* migrate more packages

* progress

* delete unnecessary tsconfigs

* migrate to esbuild

* revert npmignore changes

* more tweaks

* update pnpm-lock

* more tweaks

* compile scripts within browser environment

* fix ts issue in webdriverio

* add infra/compiler to readme

* fix lock file

* remove virtual:wdio from lock file

* update docs

* fix tests

* fix component tests

* fix unit tests

* clean up

* remove original build script

* more cleanups

* more cleanups

* last cleanup
2024-08-08 23:47:30 -07:00
Christian Bromann
6a3ecd9d82
fix(testing): fix smoke tests 2024-07-18 21:00:29 -07:00
goosewobbler
963ddb914d
feat: replace ts-node with tsx, remove autoCompileOpts (#12752)
* feat: replace `ts-node` with `tsx`, remove autoCompileOpts

* chore: update lockfile

* fix: remove autoCompileOpts munging

* chore: remove comment pertaining to ts-node

* refactor: remove unused

* test: fix windows path

* refactor: rename `tsxTsconfigPath` to `tsConfigPath`

* feat: add loader flag switching to support lower node versions

* fix: reinstate setupTypescript

* fix: replace ts-node ref

* refactor: remove unused module mocking

* refactor: remove unused `@ts-expect-error`

* docs: update for `tsx`

* fix: ts-node log reference

* fix: use `tsx` instead of `tsx/esm`

* fix: accept TSCONFIG_PATH env var alongside TSX_TSCONFIG_PATH

* docs: update for TSCONFIG_PATH

* Update packages/wdio-local-runner/src/worker.ts

* Update packages/wdio-local-runner/src/worker.ts

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2024-05-07 17:26:38 -07:00
Christian Bromann
00ad7174aa
(fix): smoke tests 2024-02-16 20:26:21 -08:00
Dmytro Klymenko
e8aae21a3b
Feat: Add free text search to '--exclude' param (#12077)
* feat: add free text search to '--exclude' param

* add configs and test specs

* add smoke tests

* update docs

* add suggestions

* Update packages/wdio-config/src/node/ConfigParser.ts

* Update packages/wdio-config/src/node/ConfigParser.ts

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2024-01-30 11:26:22 -08:00
Dmytro Klymenko
17c74bdbd2
Fix #11684: Improve AfterTest() for Jasmine (#11957)
* 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>
2024-01-19 08:03:53 -08:00
tech-dm-klymenko
d7e4b20dba
Fix filtering test specs by part of their name using CLI --spec arg (#11771)
* 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>
2023-12-20 10:39:36 -08:00
DOA
58eb3c2914
fix for issue #11834 - fixing skip test for jasmine on beforeTest hook (#11835)
* Update shim.ts

* Update shim.ts

* adding tests

* Update tests/jasmine/test-skipped-hooks.ts

updated according to comment

Co-authored-by: Christian Bromann <git@bromann.dev>

* Update tests/helpers/jasmine-hooks.conf.js

adding comment

* fix smoke test

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2023-12-18 09:44:19 -08:00
Christian Bromann
194bda204b
(@wdio/jasmine-framework): attach asymmetric matchers to expect object (#11820) 2023-12-06 21:52:30 +01:00
Tamil Selvan
d63ef70ae8
mocha: skip test in custom hooks (#11158)
* mocha: skip test in custom hooks

* adding smoke test
2023-09-13 07:56:16 +02:00
Tamil Selvan
e975deaa3d
Adopt latest Cucumber API interface (#11010)
* 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
2023-09-01 17:31:46 +02:00
Chanatan Charnkijtawarush
2a3178cc95
add parallel multiremote capability (#10803)
* add parallel multiremote capability

* Update e2e/wdio/wdio-multiremote.conf.ts

* Update e2e/wdio/wdio-multiremote.conf.ts

* Update e2e/wdio/wdio-multiremote.conf.ts

* Update e2e/wdio/wdio-multiremote.conf.ts

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2023-08-15 02:16:08 +02:00
Zachary Hamm
b8f481159d
Dev/issue 7735 (#10772)
* 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>
2023-07-22 17:44:57 +02:00
Christian Bromann
30ef65835d
(@wdio/jasmine-framework): fix matcher (#10727)
* (@wdio/jasmine-framework): fix matcher

* update unit test
2023-07-14 05:51:49 +02:00
Christian Bromann
710f905896
(@wdio/jasmine-framework): support addMatcher (#10686)
* (@wdio/jasmine-framework): support addMatcher

* fix unit test
2023-07-07 21:59:39 +02:00
Christian Bromann
a3a3363666
(@wdio/jasmine-framework): support sync negative matchers (#10685)
* (@wdio/jasmine-framework): support sync negative matchers

* fix smoke test
2023-07-07 21:59:09 +02:00
Christian Bromann
8cb10cdd52
update setup 2023-06-13 00:05:36 +02:00
Christian Bromann
2fe1dcc2dd
(jasmine): Bring back Jasmine assertions (#10533)
* (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
2023-06-11 22:10:29 +02:00
Hagai Shatz
87e0234046
Bug 8979 - Failures in test body are propagated to subsequent blocks and unexpectedly fails afterAll (#9579)
- 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>
2023-01-23 19:09:47 +01:00
Christian Bromann
62e24d4dd9
Adding new EsLint rules (#9445)
* enforce dot notation

* enforce eqeqeq

* fix unit tests

* enforce const

* enforce consistent-type-imports

* enable no-var rule (#9446)

Co-authored-by: SCG82 <scg082+github@gmail.com>
2022-12-24 17:15:27 +01:00
Christian Bromann
9156ec0f42
support for CJS services written in TS (#9195) 2022-11-16 03:40:52 +01:00
Christian Bromann
c2761a1759
Make spec location relative from config file path and add ability to define project root (#9159)
* new testrunner option: rootDir

* some unit test fixes

* fix test and updated docs

* minor unit test improvements
2022-11-11 07:39:36 +01:00
Christian Bromann
b4c149ded9
skip more smoke tests on windows 2022-11-03 22:35:00 -07:00
Christian Bromann
428a9d729a
also skip jasmine smoke in Windows 2022-11-03 11:42:52 -07:00
Christian Bromann
8dbf50cc28 fix smoke tests for windows 2022-11-03 11:40:39 -07:00
Christian Bromann
ef7dc131fd
update expect-webdriverio and initiate it in @wdio/globals (#8698)
* update expect-webdriverio and initiate it in @wdio/globals

* update expect-webdriverio

* overwrite expect when run jasmine tests

* remove matcher typing

* remove matcher typing
2022-08-12 13:58:51 +02:00
Christian Bromann
fc457c0bf0
add unit and smoke tests 2022-08-09 09:06:54 +02:00
Christian Bromann
b3b77906b5 resolve to file url paths 2022-07-19 11:32:40 +00:00
Christian Bromann
dde8900ddc transform imports into file urls 2022-07-19 11:32:40 +00:00
Christian Bromann
0d7fcbaa3f make smoke test work 2022-07-19 11:31:33 +00:00
Christian Bromann
7245a0664c run smoke tests more efficient 2022-07-19 11:31:33 +00:00
Christian Bromann
71356f7a70 get all smoke tests passing 2022-07-19 11:31:33 +00:00
Christian Bromann
cdea52ad9b more progress on smoke tests 2022-07-19 11:31:33 +00:00
Christian Bromann
e508920d95 progress on smoke tests 2022-07-19 11:31:33 +00:00
Christian Bromann
1526bec923 partial esm support for smoke tests 2022-07-19 11:31:33 +00:00
Christian Bromann
944f7afa1a fix eslint issues 2022-07-19 11:16:33 +00:00
Christian Bromann
80337515a4 good by fibers and @wdio/sync 👋 2022-07-19 11:16:00 +00:00