MetaMask / MetaMask/metamask-mobile

[E2e] Refactor Detox Waits for Improved Efficiency

Open
#6,988 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-qa Detox external-contributor INVALID-ISSUE-TEMPLATE team-mobile-platform technical research
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### **Description**

Detox is currently utilising waits in its testing processes, which could be further optimised for efficiency. The current wait implementations might lead to longer test execution times and potentially hinder the effectiveness of the testing suite. This ticket aims to refactor the waits in Detox to make the testing process more efficient without compromising the accuracy of the tests.

### **Technical Details**

- Analysing Current Waits: Understand the current implementation of waits in Detox tests. Identify the different types of waits being used and their purposes.
- Evaluate Wait Necessity: Determine if all the existing waits are necessary or if some can be eliminated/replaced with smarter strategies.
- Implement Conditional Waits: Introduce conditional waits based on the state of the application. This could involve dynamic wait times depending on certain expected conditions being met.
- Testing and Validation: Thoroughly test the refactored waits on various scenarios to ensure they are both efficient and effective. Validate that the refactored waits do not cause false positives or negatives

### **Acceptance Criteria**

- The refactoring should not lead to any test failures. Test cases that previously passed should continue to pass.
- The refactoring should lead to a noticeable reduction in overall test execution time, especially in scenarios where waits are involved.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name files, tests, or entry points. Start by locating the Detox end-to-end waits and inventorying their current uses and purposes. Done means replacing unnecessary waits with conditional behavior while keeping existing tests passing and reducing execution time.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile, testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.