Skip to content

feat: add focused empty and regex assertions (#136) - #151

Draft
adity982 wants to merge 1 commit into
seleniumboot:masterfrom
adity982:feat/locator-assertions
Draft

adity982 wants to merge 1 commit into
seleniumboot:masterfrom
adity982:feat/locator-assertions

Conversation

@adity982

Copy link
Copy Markdown
Contributor

Closes #136

Summary

  • add auto-retrying isFocused() and isEmpty() assertions
  • add Pattern overloads for full text/value matching and partial text matching
  • re-resolve stale or late elements on every poll and include the locator plus last observed value in regex/empty/focus failures
  • document the assertion surface and add the changelog entry

Validation

  • mvn -q -Dtest=LocatorAssertBehaviorTest,SeleniumAssertTest test (11 passed)
  • mvn -q test (642 passed, 0 failed/error/skipped)
  • mvn -q verify completed compilation and all tests, then stopped at the release-only GPG signing goal because GPG is not installed on this host
  • git diff --check

No browser-backed sample was needed: the focused tests exercise WebDriver polling, focus ownership, form emptiness, regex semantics, stale-element re-resolution, and failure diagnostics directly.

@shossain786

Copy link
Copy Markdown
Contributor

Thanks, Aditya, this is a clean piece of work. I checked out the branch and ran the full suite: 642 run, 0 failures, matching your numbers.

Review notes:

Two things before it can merge:

  1. It's still marked as a draft. Mark it ready for review whenever you're happy with it.
  2. feat(locator): waitFor, allTextContents, element screenshot (#135) #150 (Pushpak's Locator additions) touches the same lines of docs-site/docs/changelog.md and semantic-locators.md, so whichever lands second will need a quick rebase. Nothing to do yet; I'll tell you if it ends up being yours.

I found nothing blocking in the code itself. Thanks for picking this one up!

This branch has not been deployed

No deployments
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.

feat(assert): isFocused, isEmpty, and regex overloads for text/value

2 participants