Skip to content

feat(scenarios): Add sign-in-button scenario for #1054 - #1277

Closed
omesser wants to merge 1 commit into
mainfrom
cursor/sign-in-scenario-b5f0
Closed

omesser wants to merge 1 commit into
mainfrom
cursor/sign-in-scenario-b5f0

Conversation

@omesser

@omesser omesser commented Oct 2, 2026

Copy link
Copy Markdown
Owner

What

Adds one re-runnable e2e scenario for the agent sign-in button and waiting line from #1054, part of epic #1088.

scripts/scenarios/sign-in-button.sh launches Fidget with a fixture Harness (auth-sign-in-link mode) that advertises agent methods. The script captures three states via Accessibility dumps and screenshots:

  1. needs-login: Fake login button present on landing, terminal command shown
  2. waiting: Waiting line appears after button press, names the Harness
  3. signed-in: Session opened after authenticate completes, waiting line cleared

Follows the patterns in thinking-row.sh, chat-header-narrow.sh, and launcher-dies-at-startup.sh.

Why

Issue #1054 added in-app agent sign-in buttons and the waiting line shown while authenticate runs. No scenario covered this flow before. The scenario proves the button shows when agent methods are advertised, the waiting line appears during sign-in, and both clear once a session opens.

How to verify

Run with the --go flag:

scripts/scenarios/sign-in-button.sh --go <fidget-binary> <test-binary>

Without --go, prints the GUI takeover prompt and exits 2.

The scenario:

  • Launches Fidget with isolated HOME and fixture Harness
  • Waits for Chat to open showing needs-login landing
  • Presses the "Fake login" button via AXPress
  • Asserts waiting line appears naming "fake-agent"
  • Waits for authenticate to complete and session to open
  • Asserts waiting line clears and mind line shows session

Expected duration: ~30s, 2 min max.

Refs #1088, #1054

— Cursor agent (Coder), on @omesser's behalf.

Open in Web Open in Cursor 

Adds re-runnable e2e scenario for the agent sign-in button and waiting
line. Uses fixture Harness in auth-sign-in-link mode.

What: New script scripts/scenarios/sign-in-button.sh verifies the sign-in
flow: button presence on needs-login landing, waiting line after press,
and session opening once authenticate completes.

Why: Issue #1054 added agent sign-in buttons and the waiting line shown
while authenticate runs. No scenario covered this flow before.

How to verify: Run with --go flag:
  scripts/scenarios/sign-in-button.sh --go <fidget> <test-binary>

Captures three states:
- needs-login: Fake login button present, terminal command shown
- waiting: Waiting line appears after button press, names harness
- signed-in: Session opened, waiting line cleared

Refs #1088, #1054

Co-authored-by: Oded Messer <odedmesser@gmail.com>
@omesser
omesser marked this pull request as ready for review October 2, 2026 23:39
@cursor
cursor Bot deleted the cursor/sign-in-scenario-b5f0 branch October 2, 2026 23:43
@cursor

cursor Bot commented Oct 2, 2026

Copy link
Copy Markdown

Closing: #1054 is already covered by existing scenarios and unit tests.

Gap analysis:

Existing coverage:

  • antigravity-sign-in.sh: asserts button presence ("Log in with Google")
  • codex-sign-in-link.sh: asserts button presence ("ChatGPT (device code)")
  • tests/chat-connect.test.js: asserts signInWaiting text for button-based landings (line 290-291)

What's missing from e2e scenarios:

  • Neither existing scenario captures the waiting line that appears mid-sign-in

Why that gap is acceptable:

  • The waiting line is tested in unit tests (chat-connect.test.js)
  • The existing scenarios prove button → session flow end-to-end via live Harnesses
  • A fixture-based scenario would duplicate button coverage already proven by two live scenarios

Per Laziness Protocol: unit test coverage + two live e2e scenarios satisfy #1054's checkbox.

— Cursor agent (Coder), on @omesser's behalf.

@omesser omesser closed this Oct 2, 2026
@cursor

cursor Bot commented Oct 2, 2026

Copy link
Copy Markdown

Fixed shellcheck SC2015 and force-pushed.

Change: Rewrote line 98-99 from A && B || C pattern to separate commands:

wait_for 15 grep -qx new "$marks" || fail "session did not open after sign-in; see $log"
[ "$(grep -c new "$marks")" -ge 2 ] || fail "session opened only once (expected >= 2); see $log"

This avoids SC2015 (A && B || C is not if-then-else). Each assertion now fails independently with a clear message.

Rebased onto current main. Ready for CI.

— Cursor agent (Coder), on @omesser's behalf.

@cursor

cursor Bot commented Oct 2, 2026

Copy link
Copy Markdown

Superseded by #1281 (shellcheck fix applied, all checks green).

— Cursor agent (Coder), on @omesser's behalf.

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