Skip to content

Feature/pickleib improvements - #192

Merged
Umutayb merged 54 commits into
mainfrom
feature/pickleib-improvements
Apr 5, 2026
Merged

Umutayb merged 54 commits into
mainfrom
feature/pickleib-improvements

Conversation

@Umutayb

@Umutayb Umutayb commented Mar 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

Umutayb added 30 commits March 26, 2026 12:50
Documents the plan for RetryPolicy extraction, thread-safe singletons,
god class decomposition, unit tests, dependency updates, and cleanup —
all while preserving the public API.
12 tasks covering RetryPolicy extraction, thread-safe singletons,
helper class decomposition (TDD), dependency updates, and cleanup.
Fixes: StaleElementReferenceException early-exit in elementIs() was silently broken
(FQCN vs simple name comparison). Now uses instanceof check.
…mentAcquisition with RetryPolicy

Fixes: hoverOver() only retried once due to inverted timeout check
- PickleibWebDriver, PickleibAppiumDriver, ServiceFactory now use ThreadLocal
- Remove deprecated BasicAuth initialize method and BouncyCastle import
- Fixes stale driver reference after terminate()
- Fix AppiumDriverFactory.service.get() call for ThreadLocal usage
Narrows clickButtonIfPresent catch to NoSuchElement/StaleElementRef only.
Handles PickleibException wrapping from RetryPolicy for both direct and wrapped exceptions.
Replaces assert with PickleibException for input verification.
Add implementation plan and design spec for Pickleib improvements (docs/superpowers/plans/2026-03-26-pickleib-improvements.md and docs/superpowers/specs/2026-03-26-pickleib-improvements-design.md). Also update .gitignore to exclude .worktrees and keep existing entries.
Replaces the need for a manual CommonSteps class. Steps are auto-available
when 'pickleib.steps' is included in Cucumber's glue path.
- Update page-repository.json for new UI Components Test Suite
- Rewrite page object classes to match new app structure
- Rewrite AppTest with comprehensive API coverage (45 tests)
- Update test URL from 8080 to 7457
- Remove obsolete page objects (ElementsPage, InteractionsPage, AlertAndWindowsPage, DropDownPage)
- Add new page objects (AlertsPage, ButtonsPage, DropdownPage)
Platform.MAC was not handled, causing EnumConstantNotPresent on macOS Chrome.
Default case now returns text() for all non-Android/iOS platforms.
Umutayb and others added 11 commits March 27, 2026 00:03
…ttern

- Add static setElementRepository() method
- Falls back to PickleibRunner registry if not set
- Rename 'Navigate to the test page' to 'Navigate to test url' to avoid collision with environment-specific step patterns
Remove uppercase BACKWARDS/FORWARDS and Mobile/Web from step regex patterns.
All enum-based step parameters now use lowercase consistently.
Comment thread src/main/java/pickleib/annotations/ContextValue.java
Comment thread src/main/java/pickleib/annotations/PageObject.java Outdated
Comment thread src/main/java/pickleib/runner/ClasspathScanner.java Outdated
Comment thread src/main/java/pickleib/runner/ContextValueInjector.java Outdated
Comment thread src/main/java/pickleib/runner/ContextValueInjector.java Outdated
Comment thread src/main/java/pickleib/runner/PickleibRunner.java
Umutayb added 13 commits April 2, 2026 07:39
…tep, logging improvements

- Add Platform enum (web, android, ios, macos, windows) and use in @PageObject/@ScreenObject
- Add FormInput record replacing DataTable Map for form fill steps
- Add "Select option X from Y on Z" built-in step for dropdown elements
- Use contextCheck() in ContextValueInjector for key-value replacement
- Use ObjectMapper.convertValue() for generic type conversion
- Add warning log in ClasspathScanner for unloadable classes
- Suppress Selenium CDP version mismatch warnings
- Clean up RetryPolicy logging: first warning + final status only
- Update README with @Pickleib, @ScreenObject, Platform enum, PickleibRunner docs
… approaches

- Lead with two clear quick-start paths: JSON Repository (low-code) and Page Objects (classic)
- Add complete built-in step library reference table
- Consolidate configuration docs
- Update architecture diagram and step count
…add agent skill

- Add pageRepository attribute to @Pickleib annotation for auto-wiring JSON element repos
- PickleibRunner loads page-repository.json and sets it on BuiltInSteps automatically
- Eliminates need for CommonSteps.java in JSON-based projects
- Add Pickleib agent skill with staged workflow for Cucumber test generation
- Update README to reflect annotation-driven JSON setup
- Bundle SKILL.md in JAR at META-INF/claude/skills/pickleib/
- Consumers extract it via maven-antrun-plugin during initialize phase
- Document plugin config in README
- Remove CommonSteps requirement from skill Stage 3
…XT-key docs

- Move skill extraction from PickleibRunner to BuiltInSteps static init
- Skill auto-extracts to skills/pickleib/SKILL.md when pickleib.steps is in glue path
- No consumer POM config needed — just add Pickleib dependency
- Add comprehensive CONTEXT-key substitution documentation to skill
…to scan

- @Pickleib without params auto-detects: JSON repo at default path, then pages package
- Logs warning with setup instructions if neither is found
- Rename scanPackages to scan for brevity
- Update README and skill docs to reflect zero-config usage
…plicit wiring

- Scan 'pages' package for @PageObject/@ScreenObject on first element access
- Fall back to page-repository.json if no annotated classes found
- Works with JUnit 4 (@RunWith Cucumber) — no @ExtendWith needed
- Update skill and README docs for auto-detection order
…stale driver proxies

- Add PageObjectRegistry.clearInstances() to flush ThreadLocal cache
- Call clearInstances() in BuiltInSteps constructor (runs per scenario)
- Fixes NoSuchSessionException when running multiple scenarios sequentially
…ad code

Critical:
- C1: Use ConcurrentHashMap for PageObjectRegistry metadata (thread-safe parallel execution)
- C2: Make elementRepository/autoDetected volatile, synchronize auto-detection in BuiltInSteps

High:
- H1: Fix resource leak in installSkill() with try-with-resources
- H4: Use actual platform from registry instead of hard-coded "web" in ElementBundle
- H5: Align auto-detection order (page objects first) in both PickleibRunner and BuiltInSteps

Medium:
- M4: Catch IllegalArgumentException in ContextValueInjector for type conversion failures

Low:
- L4: Update Guava from 31.0.1 to 33.2.1 (compatible with Selenium 4.19)
- L5: Make junit-jupiter optional to avoid version conflicts in consumers
- L6: Fix copy-paste comment on org.json dependency

Cleanup:
- Remove unused support package (ChatSupport, SupportGUI)
- Add JaCoCo for code coverage reporting
…n, ContextValueInjector

PageObjectRegistry (13 new):
- clearInstances() safety and registry preservation
- getPlatform() for all platform types + unknown pages
- Concurrent register/lookup thread safety
- Case-insensitive registration and lookup

BuiltInSteps (15 new):
- setElementRepository() priority over auto-detection
- volatile/synchronized fields verified via reflection
- Cross-thread visibility of static fields
- DEFAULT constants match PickleibRunner
- clearInstances() thread-local behavior

ContextValueInjector (7 new):
- Unsupported types handled without crash (IllegalArgumentException caught)
- Private superclass fields injected across class hierarchy
- Non-annotated fields left untouched
- Null/empty context values handled gracefully
- CONTEXT- prefix resolution in values and defaults

Total: 135 tests (was 100), all passing.
@Umutayb
Umutayb merged commit 247eac8 into main Apr 5, 2026
2 checks passed
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.

1 participant