Skip to content

Commit

Permalink
refactor: removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Nov 19, 2024
1 parent dc983fa commit 5cf41fe
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 26 deletions.
8 changes: 0 additions & 8 deletions src/libs/E2E/tests/moneyRequestTest.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Config from 'react-native-config';
import type {NativeConfig} from 'react-native-config';
import * as E2EGenericPressableWrapper from '@components/Pressable/GenericPressable/index.e2e';
import E2ELogin from '@libs/E2E/actions/e2eLogin';
import waitForAppLoaded from '@libs/E2E/actions/waitForAppLoaded';
import E2EClient from '@libs/E2E/client';
Expand All @@ -11,7 +10,6 @@ import Performance from '@libs/Performance';
import * as ReportUtils from '@libs/ReportUtils';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import * as NativeCommands from '../../../../tests/e2e/nativeCommands/NativeCommandsAction';
import {tap, waitFor} from '../interactions';

Check warning on line 13 in src/libs/E2E/tests/moneyRequestTest.e2e.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Unexpected parent import '../interactions'. Use '@libs/E2E/interactions' instead

Check warning on line 13 in src/libs/E2E/tests/moneyRequestTest.e2e.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Unexpected parent import '../interactions'. Use '@libs/E2E/interactions' instead

const test = (config: NativeConfig) => {
Expand Down Expand Up @@ -72,12 +70,6 @@ const test = (config: NativeConfig) => {
Performance.markStart(CONST.TIMING.OPEN_SUBMIT_EXPENSE_CONTACT);
tap('next-button');
}, 4000);
/* E2EClient.sendNativeCommand(NativeCommands.makeTypeTextCommand('3'))
.then(() => E2EClient.sendNativeCommand(NativeCommands.makeEnterCommand()))
.then(() => {
const nextButton = E2EGenericPressableWrapper.getPressableProps('next-button');
nextButton?.onPress?.();
}); */
}

if (entry.name === CONST.TIMING.OPEN_SUBMIT_EXPENSE_CONTACT) {
Expand Down
7 changes: 1 addition & 6 deletions tests/e2e/nativeCommands/NativeCommandsAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const NativeCommandsAction = {
scroll: 'scroll',
type: 'type',
backspace: 'backspace',
enter: 'enter',
} as const;

const makeTypeTextCommand = (text: string): NativeCommand => ({
Expand All @@ -18,8 +17,4 @@ const makeBackspaceCommand = (): NativeCommand => ({
actionName: NativeCommandsAction.backspace,
});

const makeEnterCommand = (): NativeCommand => ({
actionName: NativeCommandsAction.enter,
});

export {NativeCommandsAction, makeTypeTextCommand, makeBackspaceCommand, makeEnterCommand};
export {NativeCommandsAction, makeTypeTextCommand, makeBackspaceCommand};
9 changes: 0 additions & 9 deletions tests/e2e/nativeCommands/adbEnter.ts

This file was deleted.

3 changes: 0 additions & 3 deletions tests/e2e/nativeCommands/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type {NativeCommandPayload} from '@libs/E2E/client';
import adbBackspace from './adbBackspace';
import adbEnter from './adbEnter';
import adbTypeText from './adbTypeText';
// eslint-disable-next-line rulesdir/prefer-import-module-contents
import {NativeCommandsAction} from './NativeCommandsAction';
Expand All @@ -13,8 +12,6 @@ const executeFromPayload = (actionName?: string, payload?: NativeCommandPayload)
return adbTypeText(payload?.text ?? '');
case NativeCommandsAction.backspace:
return adbBackspace();
case NativeCommandsAction.enter:
return adbEnter();
default:
throw new Error(`Unknown action: ${actionName}`);
}
Expand Down

0 comments on commit 5cf41fe

Please sign in to comment.