Skip to content

[Tests] Add timer e2e test - #4437

Merged
j-piasecki merged 1 commit into
jpiasecki/e2e-shared-valuefrom
jpiasecki/e2e-timer
Aug 18, 2026
Merged

[Tests] Add timer e2e test#4437
j-piasecki merged 1 commit into
jpiasecki/e2e-shared-valuefrom
jpiasecki/e2e-timer

Conversation

@j-piasecki

Copy link
Copy Markdown
Member

Description

Updates Timer example and adds an e2e argent flow

Test plan

argent flow run timer-test

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 45dac652-ff25-4e20-b20c-42580af27354

📥 Commits

Reviewing files that changed from the base of the PR and between bdfb157 and d27999a.

📒 Files selected for processing (2)
  • .argent/flows/timer-test.yaml
  • apps/common-app/src/new_api/showcase/timer/index.tsx

Included review availability: Your plan includes up to 8 reviews per rolling hour; 3 remain after this review.


📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a timer showcase that displays the duration of the most recent long press.
    • Added gesture lifecycle logging and duration rounding for clearer timer feedback.
    • Added an interactive animated test area and explanatory rounding text.
  • Tests

    • Added end-to-end coverage for long presses, callback ordering, duration measurement, and short-tap behavior.

Walkthrough

The timer example now logs gesture lifecycle callbacks, displays rounded press durations, and exposes a testable timer box. The end-to-end flow verifies initial state, two- and four-second holds, and a short tap.

Changes

Timer gesture behavior

Layer / File(s) Summary
Timer gesture state and display
apps/common-app/src/new_api/showcase/timer/index.tsx
The timer logs gesture lifecycle events, rounds finalized durations, updates lastPress through scheduleOnRN, and renders the latest duration with a testable animated box.
Timer end-to-end validation
.argent/flows/timer-test.yaml
The flow opens the Timer example and verifies callback order and displayed durations for two-second holds, four-second holds, and a short tap.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant TimerExample
  participant useIndexedLogger
  participant scheduleOnRN
  participant TimerUI
  User->>TimerExample: Press or tap timer box
  TimerExample->>useIndexedLogger: Log gesture lifecycle event
  TimerExample->>scheduleOnRN: Schedule rounded duration update
  scheduleOnRN->>TimerExample: Update lastPress state
  TimerExample->>TimerUI: Render last press duration
Loading

Merge Risk: ⚪ Minimal · up to d2799

This PR adds a timer end-to-end test flow and updates the Timer example; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding an end-to-end timer test.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

## Description

Updates `Timer` example and adds an e2e argent flow

## Test plan

`argent flow run timer-test`
@j-piasecki
j-piasecki force-pushed the jpiasecki/e2e-timer branch from d27999a to a9beeb8 Compare August 18, 2026 12:25
Copilot AI lite review requested due to automatic review settings August 18, 2026 12:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the “Timer” v3 example screen in apps/common-app to surface deterministic UI signals (testIDs + “Last press” summary) and adds a new Argent E2E flow that exercises long-press timing and log ordering via the in-app console.

Changes:

  • Update the Timer showcase example to log gesture lifecycle events and display the last measured press duration (rounded to whole seconds) with stable testIDs for automation.
  • Add a new Argent flow (timer-test.yaml) that navigates to the Timer example, performs timed long-presses/taps, and asserts both UI output and console log ordering.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/common-app/src/new_api/showcase/timer/index.tsx Adds indexed gesture lifecycle logging, stable testIDs, and a “Last press” duration summary updated from a worklet via scheduleOnRN.
.argent/flows/timer-test.yaml Introduces an E2E flow validating Timer behavior (duration summary + ordered console logs) across multiple interactions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@j-piasecki
j-piasecki merged commit d29545a into main Aug 18, 2026
7 of 12 checks passed
@j-piasecki
j-piasecki deleted the jpiasecki/e2e-timer branch August 18, 2026 14:36
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.

3 participants