Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: Ensure State Used in Tests is Current #24529

Open
9 tasks
darkwing opened this issue May 14, 2024 · 1 comment
Open
9 tasks

Task: Ensure State Used in Tests is Current #24529

darkwing opened this issue May 14, 2024 · 1 comment

Comments

@darkwing
Copy link
Contributor

What is this about?

It is important that we ensure that global persistent state used in E2E tests and unit tests is current, meaning that new properties added to controller state are always reflected in the state used in tests. Two places we may use that (potentially) outdated state would be:

  • test/data/mock-state.json
  • test/e2e/fixture-builder.js

We should investigate methods for ensuring these files always contain complete state, hopefully via automation.

Scenario

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

No response

@jonybur
Copy link
Contributor

jonybur commented May 21, 2024

An issue was found in two different E2E tests involving connecting to two dapps where one dapp failed to appear in the connections list. This occurred because the dapp metadata was missing from the state and only populated when navigating to the dapp, not during the initial test setup.

The root cause was an incomplete state initialisation by the FixtureBuilder, which didn't include all necessary data in the Redux store. This can affect other E2E tests, potentially making them flaky or reliant on manual workarounds. Ensuring that the Redux state is fully initialiSed in the tests is necessary to prevent similar issues.

We could add a flag so that the methods that are part of the FixtureBuilder return either true or false depending on whether the state being returned is complete or not. We should never test on top of an impossible state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@darkwing @jonybur and others