-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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]: v9: Deprecated function expect(...).toHaveTextContaining(...) used in the sample WDIO project #13413
Comments
@christian-bromann I have a simple fix and a branch I can push, ready to raise a PR, but I don't have permissions |
…13413) Execution of newly created project using the config wizard reports an error due to the usage of toHaveTextContaining() function. This fix replaces it with toContain() called on a string.
thanks @BorisOsipov will do my best, first contribution to OS project 😃 |
Thanks for reporting! We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers! |
) * fix(webdriverio): issue generating sample project on V9 (#13413) Execution of newly created project using the config wizard reports an error due to the usage of toHaveTextContaining() function. This fix replaces it with toContain() called on a string. * Addressed PR comments
Fixed with #13416. |
@giuseppe-salvatore Congratulations on your first PR! Tips: You can write "fixes #13413" or "closes #13413" in the PR text description, where 13413 is the issue number, and when the PR is merged, Github will automatically close the linked issue 😃 |
Have you read the Contributing Guidelines on issues?
WebdriverIO Version
9.0.4
Node.js Version
22.6
Mode
Standalone Mode
Which capabilities are you using?
What happened?
Selecting cucumber/typescript from the config wizard results in generation of broken code. That's because the function
toHaveTextContaining
has been removed.I found this works
await expect(await SecurePage.flashAlert.getText()).toContain(message);
What is your expected behavior?
Initialisation and execution of the sample should complete with success (assuming the target website does't have any issues)
How to reproduce the bug.
yarn create wdio .
Select the following config
? A project named "webdriverio-autoinit" was detected at "/home/workspace/webdriver.io/webdriverio-autoinit", correct? yes
? What type of testing would you like to do? E2E Testing - of Web or Mobile Applications
? Where is your automation backend located? On my local machine
? Which environment you would like to automate? Web - web applications in the browser
? With which browser should we start?
? Which framework do you want to use? Cucumber (https://cucumber.io/)
? Do you want to use Typescript to write tests? yes
? Do you want WebdriverIO to autogenerate some test files? yes
? What should be the location of your feature files? /home/workspace/webdriver.io/webdriverio-autoinit/features//*.feature
? What should be the location of your step definitions? /home/workspace/webdriver.io/webdriverio-autoinit/features/step-definitions/steps.ts
? Do you want to use page objects (https://martinfowler.com/bliki/PageObject.html)? yes
? Where are your page objects located? /home/workspace/webdriver.io/webdriverio-autoinit/features/pageobjects//*.ts
? Which reporter do you want to use?
? Do you want to add a plugin to your test setup?
? Would you like to include Visual Testing to your setup? For more information see https://webdriver.io/docs/visual-testing! no
? Do you want to add a service to your test setup?
? Do you want me to run
npm install
noThen run
yarn wdio
Relevant log output
Code of Conduct
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: