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

Ako/ use dws endpoint #258

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion src/features/Endpoint/Endpoint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const EndPoint = () => {
},
})}
name='server_url'
placeholder='e.g. ws.binaryws.com'
placeholder='e.g. ws.derivws.com'
className={styles.textInput}
required
/>
Expand Down
14 changes: 7 additions & 7 deletions src/features/Endpoint/__tests__/Endpoint.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Endpoint', () => {
});

it('should have default values in input fields', () => {
const server = screen.getByPlaceholderText('e.g. ws.binaryws.com');
const server = screen.getByPlaceholderText('e.g. ws.derivws.com');
const app_id = screen.getByPlaceholderText('e.g. 9999');
expect(server).toHaveValue('oauth.deriv.com');

Expand All @@ -40,7 +40,7 @@ describe('Endpoint', () => {
});

it('validate user inputs, and provides error messages for server field', async () => {
const server = screen.getByPlaceholderText('e.g. ws.binaryws.com');
const server = screen.getByPlaceholderText('e.g. ws.derivws.com');

await userEvent.clear(server);
await userEvent.type(server, '[email protected]');
Expand All @@ -51,12 +51,12 @@ describe('Endpoint', () => {
});

it('should validate submit button functionality', async () => {
const server = screen.getByPlaceholderText('e.g. ws.binaryws.com');
const server = screen.getByPlaceholderText('e.g. ws.derivws.com');
const app_id = screen.getByPlaceholderText('e.g. 9999');
const form = screen.getByRole('form');

await userEvent.clear(server);
await userEvent.type(server, 'blue.binaryws.com');
await userEvent.type(server, 'blue.derivws.com');

await userEvent.clear(app_id);
await userEvent.type(app_id, '31063');
Expand All @@ -65,7 +65,7 @@ describe('Endpoint', () => {
fireEvent.submit(form);
});

expect(server).toHaveValue('blue.binaryws.com');
expect(server).toHaveValue('blue.derivws.com');
expect(app_id).toHaveValue('31063');
});

Expand All @@ -89,12 +89,12 @@ describe('Endpoint', () => {
});

it('Should have submit button enabled with no errors on the from', async () => {
const server = screen.getByPlaceholderText('e.g. ws.binaryws.com');
const server = screen.getByPlaceholderText('e.g. ws.derivws.com');
const app_id = screen.getByPlaceholderText('e.g. 9999');
const submit_button = screen.getByRole('button', { name: /submit/i });

await userEvent.clear(server);
await userEvent.type(server, 'blue.binaryws.com');
await userEvent.type(server, 'blue.derivws.com');

await userEvent.clear(app_id);
await userEvent.type(app_id, '31063');
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const PRODUCTION_APP_ID = '36544';
export const STAGING_APP_ID = '36545';
export const VERCEL_DEPLOYMENT_APP_ID = '35073';
export const LOCALHOST_APP_ID = '35074';
export const DEFAULT_WS_SERVER = 'ws.binaryws.com';
export const DEFAULT_WS_SERVER = 'ws.derivws.com';
export const OAUTH_URL = 'oauth.deriv.com';

export const LOGIN_ACCOUNTS_SESSION_STORAGE_KEY = 'login-accounts';
Expand Down
Loading