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

feat(locator): add withAttrEndsWith, withAttrStartsWith, withAttrContains #4334

Conversation

Maksym-Artemenko
Copy link
Contributor

Motivation/Description of the PR

Adding methods to locator.js - withAttrEndsWith, withAttrStartsWith, withAttrContains
I believe those methods are needed for many CodeceptJS users

All methods are compartible with XPath 1.0,
All methods tested - working as expected.

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium
  • TestCafe

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • stepTimeout
  • wdio
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 🧹 Chore
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

Copy link
Collaborator

@kobenguyent kobenguyent left a comment

Choose a reason for hiding this comment

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

@Maksym-Artemenko would be nice to add tests and docs for those new methods, please check https://github.com/codeceptjs/CodeceptJS/pull/4321/files to see how to add them. Thanks!

@DavertMik
Copy link
Contributor

I agree with @kobenguyent
Please add tests

@kobenguyent kobenguyent changed the title Adding methods to locator.js - withAttrEndsWith, withAttrStartsWith, withAttrContains feat(locator): add withAttrEndsWith, withAttrStartsWith, withAttrContains Aug 13, 2024
@kobenguyent
Copy link
Collaborator

  • Merged with main branch.
  • Added UTs.

@kobenguyent kobenguyent merged commit 7790354 into codeceptjs:3.x Aug 13, 2024
13 checks passed
@kobenguyent kobenguyent mentioned this pull request Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants