Five AI-powered demos for the TTACart framework, all clickable. Failure RCA, self-healing locators, prompt
to spec, smart test data and a PR review bot. Every button calls the same Cloudflare Pages proxy
(/api/chat) so the same code path that runs in CI runs here in your browser.
Heads up: demo runs in your browser. AI calls go through the TTA serverless proxy on Cloudflare Pages
(DeepSeek by default). Paste your own key in Settings
if you want to use a different provider. No production secrets here.
0 / 50k tokens
1
Failure RCA
A real Playwright failure trace. Click Explain failure and the model returns a 2-sentence root cause plus the single most likely fix.
trace.txt
[chromium] checkout-flow.spec.ts:42 -> "completes order with default user"
TimeoutError: locator.click: Timeout 5000ms exceeded.
Call log:
- waiting for getByTestId('add-to-cart-tta-practice-backpack')
- locator resolved to hidden <button data-test="add-to-cart-tta-practice-backpack"
class="tta-btn primary"
aria-hidden="true"> Add to Cart </button>
- element is not visible (aria-hidden="true")
- retrying click action
- waiting 20ms
- element is not visible
- retrying click action
- waiting 100ms
... (12 retries elided)
- waiting 500ms
- element is not visible
Snapshot diff (vs last green run on main):
<section data-test="inventory-container">
- <button data-test="add-to-cart-tta-practice-backpack">Add to Cart</button>
+ <button data-test="add-to-cart-tta-practice-backpack" aria-hidden="true">Add to Cart</button>
+ <div class="login-required-mask">Sign in to add items</div>
</section>
Network: GET /api/session -> 401 unauthenticated
Console: [warn] Inventory page rendered in guest mode, action buttons disabled.
Failing test:
await page.getByTestId('add-to-cart-tta-practice-backpack').click();
await expect(page.getByTestId('cart-badge')).toHaveText('1');
Last green: 2 days ago on main (commit a1f2c83)
Recent diff: PR #214 added auth-gated inventory (commit b87ee45)
~ 520 tokens
2
Self-healing locator
A mock inventory tile. The working button uses the right data-test selector. The broken button uses a brittle #id selector that the DOM no longer matches. Ask AI to heal.
B
TTA Practice Backpack$29.99 - durable, water-resistant
~ 380 tokens
3
Prompt to spec
Describe the journey in plain English. AI returns a typed .spec.ts targeting our TTACart Page Objects with stable data-test locators.
~ 900 tokens
4
Smart test data
One click - 10 edge-case checkout rows: a mix of valid ASCII, Unicode names, rare postal-code formats and trick emails Faker rarely produces.
~ 700 tokens
5
PR reviewer bot
Paste a unified diff. AI returns a JSON array of review comments - each one a rule, file, line and message ready for gh pr review.
~ 850 tokens
Where to look while this ships
The static SUT pages, the test users, and the locator conventions are already final. Every test you write today against TTACart will keep working once the AI layer is wired into the upstream framework repo.