Skip to content

Commit

Permalink
fix: test case with appId
Browse files Browse the repository at this point in the history
  • Loading branch information
maryia-matskevich-deriv committed Jan 17, 2025
1 parent 20c0525 commit 7dada5b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/endpoint/__tests__/endpoint.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { LocalStorageUtils } from '@deriv-com/utils';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Endpoint from '..';
Expand Down Expand Up @@ -34,7 +33,7 @@ describe('<Endpoint />', () => {
await userEvent.click(submitButton);

expect(localStorage.getItem('config.server_url') ?? '').toBe('qa10.deriv.dev');
expect(LocalStorageUtils.getValue('config.app_id') ?? '').toBe('123');
expect(localStorage.getItem('config.app_id') ?? '').toBe('123');
});

it('should call getServerInfo and reset the inputs when user clicks on the reset button', async () => {
Expand All @@ -49,6 +48,6 @@ describe('<Endpoint />', () => {
await userEvent.click(resetButton);

expect(localStorage.getItem('config.server_url') ?? '').toBe('blue.derivws.com');
expect(LocalStorageUtils.getValue('config.app_id') ?? '').toBe(65555);
expect(localStorage.getItem('config.app_id') ?? '').toBe('65555');
});
});

0 comments on commit 7dada5b

Please sign in to comment.