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

Setup network controller mocks per-test #17250

Merged
merged 4 commits into from
Jan 23, 2023

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jan 16, 2023

The network controller unit test network mocks are now setup for each test. This makes modifying network behavior on a per-test basis easier, and makes it more clear which test relies upon which mocks.

This relates to #16962

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@Gudahtt
Copy link
Member Author

Gudahtt commented Jan 16, 2023

This depends upon #17199

@Gudahtt Gudahtt force-pushed the network-controller-construct-per-test branch from 1c6d8a7 to bd6cdd4 Compare January 17, 2023 18:12
@Gudahtt Gudahtt force-pushed the setup-network-controller-mocks-per-test branch from 9d94bf7 to ebd7537 Compare January 17, 2023 20:21
@metamaskbot
Copy link
Collaborator

Builds ready [ebd7537]
Page Load Metrics (1417 ± 87 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint93139121147
domContentLoaded11651841140517684
load11651841141718187
domInteractive11651841140517684
Bundle size diffs
  • background: 0 bytes
  • ui: 0 bytes
  • common: 0 bytes

Base automatically changed from network-controller-construct-per-test to develop January 17, 2023 23:28
@Gudahtt Gudahtt force-pushed the setup-network-controller-mocks-per-test branch 2 times, most recently from b9337a9 to 28787e1 Compare January 20, 2023 17:25
@metamaskbot
Copy link
Collaborator

Builds ready [28787e1]
Page Load Metrics (1213 ± 118 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint902491143316
domContentLoaded97116931182223107
load97116931213245118
domInteractive97116931182223107
Bundle size diffs
  • background: 0 bytes
  • ui: 0 bytes
  • common: 0 bytes

The network controller unit test network mocks are now setup for each
test. This makes modifying network behavior on a per-test basis easier,
and makes it more clear which test relies upon which mocks.
@Gudahtt Gudahtt force-pushed the setup-network-controller-mocks-per-test branch from 7149856 to a541040 Compare January 20, 2023 18:47
…bout initial config in tests where switching occurs
@Gudahtt Gudahtt marked this pull request as ready for review January 20, 2023 18:52
@Gudahtt Gudahtt requested a review from a team as a code owner January 20, 2023 18:52
@Gudahtt Gudahtt requested a review from mcmire January 20, 2023 18:52
@metamaskbot
Copy link
Collaborator

Builds ready [055ec6a]
Page Load Metrics (1342 ± 102 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint102155126157
domContentLoaded10571669131720498
load105716691342212102
domInteractive10571669131720498
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 135 bytes
  • ui: 0 bytes
  • common: 0 bytes

Copy link
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

LGTM

@Gudahtt Gudahtt merged commit d6cf809 into develop Jan 23, 2023
@Gudahtt Gudahtt deleted the setup-network-controller-mocks-per-test branch January 23, 2023 14:22
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants