Skip to content

Use the CodeceptJS .at(N) chain for element selection - #306

Merged
DavertMik merged 1 commit into
mainfrom
codeceptjs-at-chain
Nov 13, 2026
Merged

DavertMik merged 1 commit into
mainfrom
codeceptjs-at-chain

Conversation

@DenysKuchma

Copy link
Copy Markdown
Collaborator

Summary

Aligns explorbot with codeceptjs#5788 (merged into 4.x, shipped in codeceptjs@4.2.4): step options now chain to the action itself.

  • Prompts & suggestions — the tester rules (src/ai/rules.ts), the click tool description and every failure suggestion (src/ai/tools.ts), and the Pilot's MultipleElementsFound guidance (src/ai/pilot.ts) now teach .at(N) instead of step.opts({ elementIndex: N }).
    .at(N) maps 1:1 to elementIndex (1-based, negatives count from the end), so the "Element N" lists keep their numbering.
  • Executed-step rendering (src/action.ts) — steps that ran with elementIndex are rendered as I.click("Manual").at(2); this is what the AI sees in tool results and what the historian saves, so generated tests use the modern syntax. Other step options keep the
    step.opts(...) argument form.
  • Dependency — codeceptjs ^4.2.0 → ^4.2.4 (bun install also refreshed a stale node_modules pinned at 4.0.0-rc.16, where the chain API does not exist).

@github-actions

Copy link
Copy Markdown

Explorbot Self-Regression

Commit 0263438 · run

Scenario Result Time Previous median Change
basic (native) PASS 6m 32s 5m 1s +30% slower
experience: control OK — failed as expected 40s 39s +3%
experience: seeded PASS 1m 12s 49s +47% slower
slow (native) PASS 3m 8s 1m 58s +59% slower
gated (native) PASS 3m 1s 2m 10s +39% slower
staged-login (native) PASS 32s 32s 0%
gated-no-auth (native) PASS 21s 21s 0%

Change compares it with the median passing time of the last 5 runs; ±20% or more is flagged.

Run details

  • basic (native) — PASS (6m 32s): login evidence: PASS (post-login plan=true, post-login research=true); research: PASS (files=5, wellFormed=true, keywords=7/3); scenarios: PASS (tests=10/5, features=5/3); tests passed: PASS (5 passed, 0 failed (reporter: 5 passed, 0 failed))
  • experience: control — PASS (40s): control: OK — failed as expected (0 passed, 0 failed)
  • experience: seeded — PASS (1m 12s): seeded: PASS (1 passed, 0 failed)
  • slow (native) — PASS (3m 8s): login evidence: PASS (post-login plan=true, post-login research=true); research: PASS (files=2, wellFormed=true, keywords=7/3); scenarios: PASS (tests=6/5, features=4/3); tests passed: PASS (1 passed, 0 failed (reporter: 1 passed, 0 failed))
  • gated (native) — PASS (3m 1s): login evidence: PASS (post-login plan=true, post-login research=true); research: PASS (files=3, wellFormed=true, keywords=7/3); scenarios: PASS (tests=7/5, features=3/3); tests passed: PASS (1 passed, 0 failed (reporter: 1 passed, 0 failed))
  • staged-login (native) — PASS (32s): reached target: PASS; navigator alone: PASS (captain handovers: 0)
  • gated-no-auth (native) — PASS (21s): stopped: PASS (exited on its own before the 180s timeout); captain handovers: PASS (1/1)

Session analysis — basic (native):

Session Analysis

The core issue lifecycle works: a created issue appears in the list with the entered values, and the detail page matches its list row. Delete and empty-title validation could not be confirmed because the action log is missing steps the test notes claim.

Coverage

What works

  • Issue creation — ET-1 Create a new issue with a valid title and verify it appears in the Issues list
  • Issue detail view — ET-5 Open an existing issue from the Issues list and verify its detail matches the list row

Execution Issues

  • ET-2 Submit the new issue form with an empty title and verify the issue is not created — Submit step failed; no submit click logged; passed anyway.
  • ET-3 Edit the title of an issue created by the create-issue scenario and verify the updated title — Old-title absence claimed passed; no assertion in log.
  • ET-4 Delete an issue created within the scenario and verify it is removed from the Issues list — Creation steps absent from log; claimed passed.

Session analysis — slow (native):

Session Analysis

Issue creation from the toolbar works end to end: a new issue appears in the list with its entered title, and the heading count updates. Status and priority values were not set by the scenario, so the status check confirmed only the default.

Coverage

  • Pages: /issues, /issues?new=1
  • Features: Issue creation from toolbar, issue list display, issues count heading

What works

  • Issue creation — ET-1 Create a new issue from the toolbar and verify it appears in the issues list

Defects

None found.

UX issues

None observed.

Execution Issues

  • ET-1 Create a new issue from the toolbar and verify it appears in the issues list — status never selected; "open" matched the default value.

Session analysis — gated (native):

Session Analysis

Issue creation from the Issues toolbar was attempted once, and the run notes report the new issue in the table with the count rising by one. The log has no assertion step backing those claims, so the result is unverified.

Coverage

  • Pages: /workspace, /issues, /issues?new=1
  • Features: Issue creation via toolbar "New Issue" drawer, issues table listing

Execution Issues

  • ET-1 Create a new issue from the Issues page and verify it appears in the issues table - passed with no assertion step in log

@DavertMik
DavertMik merged commit 267046e into main Nov 13, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
regression — 60fa54bf Deployed Nov 12, 2026 by DenysKuchma via regression #216
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.

2 participants