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

test: Refining E2E Testing with API Mocking #11797

Merged
merged 26 commits into from
Oct 30, 2024
Merged

Conversation

Andepande
Copy link
Member

@Andepande Andepande commented Oct 15, 2024

Description

This change enhances the mock functionality to enable multiple dynamic events to be passed through. This will evolve over time with how people use it. A corresponding document has been created in the contributors' repository.

Related issues

Fixes:
https://github.com/orgs/MetaMask/projects/60/views/3?pane=issue&itemId=81125053&issue=MetaMask%7Cmobile-planning%7C1944

Screenshots/Recordings

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

change file structure and introduce portfinder to avoid port collisions
@Andepande Andepande changed the title test: test: Implement Structure for Mocking Endpoints in E2E Tests Oct 15, 2024
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Oct 15, 2024
@Andepande Andepande changed the title test: Implement Structure for Mocking Endpoints in E2E Tests test: Best practices for mocking in e2e testing Oct 21, 2024
@Andepande Andepande marked this pull request as ready for review October 21, 2024 22:53
@Andepande Andepande requested a review from a team as a code owner October 21, 2024 22:53
@Andepande Andepande added the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 21, 2024
Copy link
Contributor

github-actions bot commented Oct 21, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 933d577
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/90675834-7aef-484b-bae6-1d4ee3ef217e

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@Andepande Andepande changed the title test: Best practices for mocking in e2e testing test: Mocking in e2e refactor Oct 21, 2024
@Andepande Andepande changed the title test: Mocking in e2e refactor test: Mocking wtih e2e refactor Oct 21, 2024
@Andepande Andepande changed the title test: Mocking wtih e2e refactor test: Mocking with e2e refactor Oct 23, 2024
@Andepande Andepande changed the title test: Mocking with e2e refactor test: Refining E2E Testing with API Mocking Oct 24, 2024
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 57ef86d
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3d6d98d9-fedf-44d7-96b8-bc5e32660ed4

Note

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@Andepande Andepande added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 25, 2024
Copy link
Contributor

github-actions bot commented Oct 25, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 68116de
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b26fbb3e-3686-458d-a236-285089221d18

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

SamuelSalas
SamuelSalas previously approved these changes Oct 25, 2024
Copy link
Contributor

@SamuelSalas SamuelSalas left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

Just some small feedback; otherwise, things are looking good.

e2e/mockServer/mock-server.js Outdated Show resolved Hide resolved
e2e/specs/mock-specs/suggestedGasApi.mock.spec.js Outdated Show resolved Hide resolved
e2e/mockServer/mock-responses/mock-responses.json Outdated Show resolved Hide resolved
@Andepande
Copy link
Member Author

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 2237a96
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/65a5e677-86cc-457b-ad6f-519ff2e17958

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@cortisiko cortisiko self-requested a review October 30, 2024 16:46
Copy link

@Andepande Andepande added this pull request to the merge queue Oct 30, 2024
Merged via the queue into main with commit f36d6c9 Oct 30, 2024
36 of 37 checks passed
@Andepande Andepande deleted the mocking-best-practices branch October 30, 2024 19:11
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2024
@metamaskbot metamaskbot added the release-7.35.0 Issue or pull request that will be included in release 7.35.0 label Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-7.35.0 Issue or pull request that will be included in release 7.35.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants