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

fix: refactor notifications unit tests #11431

Merged
merged 41 commits into from
Oct 14, 2024

Conversation

Jonathansoufer
Copy link
Contributor

@Jonathansoufer Jonathansoufer commented Sep 25, 2024

Description

This PR addresses all comments from this PR related to unit tests best practices.

Related issues

Fixes: #11250

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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.

@Jonathansoufer Jonathansoufer added No QA Needed Apply this label when your PR does not need any QA effort. needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-platform No E2E Smoke Needed If the PR does not need E2E smoke test run team-notifications Notifications team labels Sep 25, 2024
@Jonathansoufer Jonathansoufer self-assigned this Sep 25, 2024
@Jonathansoufer Jonathansoufer requested review from a team as code owners September 25, 2024 10:42
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions github-actions bot added the team-snaps-platform Snaps Platform team label Sep 25, 2024
Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

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

Nice work moving the toggle in a hook!
I have questions about the channel ids and android test.
Some comments also about naming mostly to make the tests clear as doc.

app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/androidChannels.test.ts Outdated Show resolved Hide resolved
…taMask/metamask-mobile into fix/refactor-notifications-unit-tests
@Jonathansoufer
Copy link
Contributor Author

Why completely delete app/util/notifications/hooks/index.test.ts?

mistakenly removed. Put it Back.

app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
app/util/notifications/hooks/index.test.ts Outdated Show resolved Hide resolved
Copy link

Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Contributor

@andreahaku andreahaku left a comment

Choose a reason for hiding this comment

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

one very minor comment.
The rest is ok.

Copy link
Contributor

@andreahaku andreahaku left a comment

Choose a reason for hiding this comment

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

LGTM

@Jonathansoufer Jonathansoufer added this pull request to the merge queue Oct 14, 2024
Merged via the queue into main with commit 7bc75e9 Oct 14, 2024
37 checks passed
@Jonathansoufer Jonathansoufer deleted the fix/refactor-notifications-unit-tests branch October 14, 2024 17:00
@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No E2E Smoke Needed If the PR does not need E2E smoke test run No QA Needed Apply this label when your PR does not need any QA effort. release-7.34.0 team-mobile-platform team-notifications Notifications team team-snaps-platform Snaps Platform team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants