diff --git a/src/libs/E2E/client.ts b/src/libs/E2E/client.ts index 4c0e572cc9b2..5aa999267ead 100644 --- a/src/libs/E2E/client.ts +++ b/src/libs/E2E/client.ts @@ -105,4 +105,4 @@ export default { updateNetworkCache, getNetworkCache, }; -export type {TestResult, NativeCommand}; +export type {TestResult, NativeCommand, NativeCommandPayload}; diff --git a/tests/e2e/nativeCommands/index.js b/tests/e2e/nativeCommands/index.ts similarity index 74% rename from tests/e2e/nativeCommands/index.js rename to tests/e2e/nativeCommands/index.ts index 90dcb00bbcae..31af618c8ec1 100644 --- a/tests/e2e/nativeCommands/index.js +++ b/tests/e2e/nativeCommands/index.ts @@ -1,14 +1,15 @@ +import type {NativeCommandPayload} from '@libs/E2E/client'; import adbBackspace from './adbBackspace'; import adbTypeText from './adbTypeText'; // eslint-disable-next-line rulesdir/prefer-import-module-contents import {NativeCommandsAction} from './NativeCommandsAction'; -const executeFromPayload = (actionName, payload) => { +const executeFromPayload = (actionName?: string, payload?: NativeCommandPayload): boolean => { switch (actionName) { case NativeCommandsAction.scroll: throw new Error('Not implemented yet'); case NativeCommandsAction.type: - return adbTypeText(payload.text); + return adbTypeText(payload?.text ?? ''); case NativeCommandsAction.backspace: return adbBackspace(); default: diff --git a/tests/unit/LocaleCompareTest.js b/tests/unit/LocaleCompareTest.ts similarity index 100% rename from tests/unit/LocaleCompareTest.js rename to tests/unit/LocaleCompareTest.ts diff --git a/tests/unit/searchCountryOptionsTest.js b/tests/unit/searchCountryOptionsTest.ts similarity index 100% rename from tests/unit/searchCountryOptionsTest.js rename to tests/unit/searchCountryOptionsTest.ts