Skip to content

v1.4.2 — Exact POM imports & factory-function extraction

Choose a tag to compare

@cport1 cport1 released this 16 Apr 16:52
· 10 commits to main since this release

What changed

This release consolidates v1.4.0 and v1.4.1 into a clean release with no vendor-specific references in the test suite.

Exact import statements in LLM prompts

The prompt now shows copy-pasteable import statements so the LLM can't rename classes:

### InvestigationsPage
`import { InvestigationsPage } from '../../pages/investigations.page';`
Methods: goto(), waitForTable()
Locators: getSearchInput = this.page.getByTestId('search'), ...

Previously the LLM would abbreviate class names (e.g., Investigations instead of InvestigationsPage).

Arrow-function & factory-function POM extraction

The scanner now handles three additional element patterns common in real-world POM classes:

Arrow functions in objects — getButton: (): Locator => this.page.getByTestId('btn')

Nested objects — advancedSection: { getToggle: (): Locator => ... } → extracted as advancedSection.getToggle

Factory functions — getFilters: () => { const x = ...; return { x } } → extracted as getFilters().x

Trace injection safety

test.use({ trace: ... }) is no longer inserted inside class bodies when the LLM emits stray imports mid-file.

Conditional anti-hallucination prompts

When the scanner finds no artifacts (e.g., naming conventions don't match defaults), the prompt no longer says "do NOT invent page objects" with an empty list — which was confusing the LLM into creating POMs inline.

Documentation

README now documents Project Structure Discovery: pom_patterns, utility_patterns, project_context_budget, default patterns, and a diagnostic tip for Action logs.