Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Change the button content on successful registration to redirect to telegram channel #255

Merged
merged 9 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('App Dialog Register Success', () => {
});

it('Should render buttons properly', () => {
const primaryButton = screen.getByRole('button', { name: /manage application/i });
const primaryButton = screen.getByRole('button', { name: /join our telegram community/i });
const secondaryButton = screen.getByRole('button', { name: /got it/i });

expect(primaryButton).toBeInTheDocument();
Expand All @@ -52,7 +52,7 @@ describe('App Dialog Register Success', () => {
});

it('Should update current tab on primary button click to Manage Application', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you update the test description as well? Thanks

const primaryButton = screen.getByRole('button', { name: /manage application/i });
const primaryButton = screen.getByRole('button', { name: /join our telegram community/i });

await userEvent.click(primaryButton);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ export const RegisterAppDialogSuccess = ({ onClose }: IRegisterAppDialogSuccessP
() => [
{
id: 0,
text: 'Manage application',
text: 'Join our Telegram Community',
color: 'primary',
onClick: () => {
updateCurrentTab('MANAGE_APPS');
window.open('https://t.me/deriv_apps', '_blank');
onClose();
},
},
Expand Down