-
Notifications
You must be signed in to change notification settings - Fork 14
fix(native): native release bug fixes — 2026-09-02 (TASK-22125 duplicate notification artwork, TASK-22146 About ToS title locale, TASK-22209 duplicate welcome push, card details survive app switch + expiry copy) #2924
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
79fb1af
fix(android): drop the default OneSignal large icon — every push show…
abalinda 5de5a0e
fix(avatar): own avatar shows the first letter of the username, not t…
abalinda 82a1e0e
fix(about): the Terms of Service title follows the app language
abalinda 03bb1e4
fix(about): every policy title follows the app language, not only the…
abalinda d06f79c
fix(avatar): seed the home avatar from the username, whatever showFul…
abalinda 3c08191
Merge origin/dev into native-release-bug-fixes-aleks
abalinda daf5580
fix(notifications): one opt-in, one subscription — stop re-logging in…
abalinda 53a97ae
fix(notifications): detect a new opt-in from the SDK's previous state…
abalinda dc45a54
fix(notifications): a new opt-in is the one false → true transition, …
abalinda d341285
fix(card): keep revealed details across an app switch; copy the expir…
abalinda b1815ba
Merge origin/dev into native-release-bug-fixes-aleks
abalinda 361d90f
fix(card): expiry/cvv copy icons on the DS icon scale
abalinda 5659eb6
fix(card): cover revealed card details while the app is backgrounded
abalinda b7bf1b3
fix(notifications): join the in-flight OneSignal login instead of sta…
abalinda d836cbe
Merge origin/dev into native-release-bug-fixes-aleks
abalinda 624d56b
Update src/components/Card/CardFace.tsx
abalinda 159e0b8
fix(profile): Personal details follows the name-visibility setting (T…
abalinda 8cfa3b7
Merge origin/dev into native-release-bug-fixes-aleks
abalinda 5a77f1a
fix: CI red from the dev merge, plus three review findings
abalinda c061b17
fix(notifications): guard the login commit and retry a joined login t…
abalinda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file removed
BIN
-30.9 KB
android/app/src/main/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
src/components/Profile/components/__tests__/ShowNameToggle.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| /** | ||
| * ShowNameToggle — the confirmation gate. Turning the setting ON publishes the | ||
| * user's legal name next to their username, so it must ask first; turning it | ||
| * OFF saves straight away. | ||
| */ | ||
| import React from 'react' | ||
| import { render as rtlRender, screen, fireEvent, waitFor } from '@testing-library/react' | ||
| import { IntlWrapper } from '@/test-utils/intl' | ||
| import ShowNameToggle from '@/components/Profile/components/ShowNameToggle' | ||
|
|
||
| const render = (ui: React.ReactElement) => rtlRender(ui, { wrapper: IntlWrapper }) | ||
|
|
||
| const mockUpdateUserById = jest.fn() | ||
| const mockFetchUser = jest.fn() | ||
|
|
||
| jest.mock('@/app/actions/users', () => ({ updateUserById: (...a: unknown[]) => mockUpdateUserById(...a) })) | ||
| jest.mock('@/context/authContext', () => ({ | ||
| useAuth: () => ({ fetchUser: mockFetchUser, user: { user: { userId: 'u1' } } }), | ||
| })) | ||
| jest.mock('@/components/Global/ActionModal', () => ({ | ||
| __esModule: true, | ||
| default: ({ visible, title, ctas }: any) => | ||
| visible ? ( | ||
| <div data-testid="modal"> | ||
| <h1>{title}</h1> | ||
| {ctas?.map((c: any, i: number) => ( | ||
| <button key={i} onClick={c.onClick}> | ||
| {c.text} | ||
| </button> | ||
| ))} | ||
| </div> | ||
| ) : null, | ||
| })) | ||
|
|
||
| beforeEach(() => { | ||
| jest.clearAllMocks() | ||
| mockUpdateUserById.mockResolvedValue(undefined) | ||
| }) | ||
|
|
||
| describe('ShowNameToggle', () => { | ||
| it('asks before turning the setting on, and saves once confirmed', async () => { | ||
| const onChange = jest.fn() | ||
| render(<ShowNameToggle checked={false} onChange={onChange} />) | ||
|
|
||
| fireEvent.click(screen.getByRole('switch')) | ||
| expect(screen.getByText('Show your full name?')).toBeInTheDocument() | ||
| expect(mockUpdateUserById).not.toHaveBeenCalled() | ||
| expect(onChange).not.toHaveBeenCalled() | ||
|
|
||
| fireEvent.click(screen.getByText('Confirm')) | ||
| expect(onChange).toHaveBeenCalledWith(true) | ||
| await waitFor(() => expect(mockUpdateUserById).toHaveBeenCalledWith({ userId: 'u1', showFullName: true })) | ||
| }) | ||
|
|
||
| it('cancelling leaves the setting off', () => { | ||
| const onChange = jest.fn() | ||
| render(<ShowNameToggle checked={false} onChange={onChange} />) | ||
|
|
||
| fireEvent.click(screen.getByRole('switch')) | ||
| fireEvent.click(screen.getByText('Cancel')) | ||
|
|
||
| expect(screen.queryByTestId('modal')).not.toBeInTheDocument() | ||
| expect(mockUpdateUserById).not.toHaveBeenCalled() | ||
| expect(onChange).not.toHaveBeenCalled() | ||
| }) | ||
|
|
||
| it('turning it off saves without a confirmation', async () => { | ||
| const onChange = jest.fn() | ||
| render(<ShowNameToggle checked onChange={onChange} />) | ||
|
|
||
| fireEvent.click(screen.getByRole('switch')) | ||
|
|
||
| expect(screen.queryByTestId('modal')).not.toBeInTheDocument() | ||
| expect(onChange).toHaveBeenCalledWith(false) | ||
| await waitFor(() => expect(mockUpdateUserById).toHaveBeenCalledWith({ userId: 'u1', showFullName: false })) | ||
| }) | ||
|
|
||
| it('reverts the optimistic value when the save fails', async () => { | ||
| mockUpdateUserById.mockRejectedValueOnce(new Error('nope')) | ||
| const onChange = jest.fn() | ||
| jest.spyOn(console, 'error').mockImplementation(() => {}) | ||
| render(<ShowNameToggle checked onChange={onChange} />) | ||
|
|
||
| fireEvent.click(screen.getByRole('switch')) | ||
|
|
||
| await waitFor(() => expect(onChange).toHaveBeenLastCalledWith(true)) | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.