-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Our current E2E tests are long, imperative, and difficult to understand sequentially. We want to improve readability, debugability, and CI observability without adopting full Gherkin or managing separate .feature files.
Requirements
-
Step-Based DSL
• Implement a utilitystep(description, fn)that wraps test actions.
• Each step should:
• Increase a global or scoped step counter
• Execute the provided function
• Log start and end of the step
• Log failure with context
• Tests should read as a series of narrative steps, improving readability. -
Automatic Step Summary Generation
• Before a test runs, generate a numbered list of all steps (e.g., “1. Accept TOS”, “2. Restore wallet”).
• The summary should be easily readable (multiline string or array).
• Print the full step summary at the start of each test. -
Cross-Platform Step Logging (Android + iOS)
• Android: Write step logs into logcat using:
•mobile: shell log -t E2ETest "<msg>"
• iOS Simulator: Write step logs into simulator logs using:
•mobile: execute → console.log("<msg>")
• Logs must appear in:
• Android logcat output
• iOS simulator system logs
• CI job logs -
Optional Inline Documentation
• Consider adding a block comment at the top of each test summarizing the steps.
• This should match the automatically generated summary to avoid divergence. -
Refactor Existing E2E Tests to Use the New DSL
• Apply the DSL to all onboarding tests first.
• Ensure logs and summaries appear correctly in both Android and iOS runs.