Skip to content

Commit

Permalink
fix: actually make tests runnable
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Aug 19, 2024
1 parent 0ebe2cd commit 8143c8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/libs/E2E/tests/reportTypingTest.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type {NativeConfig} from 'react-native-config';
import Config from 'react-native-config';
import {runOnUI} from 'react-native-reanimated';
import E2ELogin from '@libs/E2E/actions/e2eLogin';
import waitForAppLoaded from '@libs/E2E/actions/waitForAppLoaded';
import waitForKeyboard from '@libs/E2E/actions/waitForKeyboard';
Expand Down Expand Up @@ -47,6 +48,7 @@ const test = (config: NativeConfig) => {
branch: Config.E2E_BRANCH,
name: 'Message sent',
metric: entry.duration,
unit: 'ms',
}).then(messageSentResolve);
return;
}
Expand Down Expand Up @@ -87,7 +89,7 @@ const test = (config: NativeConfig) => {
)
.then(() => E2EClient.sendNativeCommand(NativeCommands.makeBackspaceCommand()))
.then(() => E2EClient.sendNativeCommand(NativeCommands.makeTypeTextCommand(message)))
.then(() => onSubmitAction())
.then(() => runOnUI(onSubmitAction)())
.catch((error) => {
console.error('[E2E] Error while test', error);
E2EClient.submitTestDone();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,6 @@ function ReportActionCompose({
[onSubmit, reportID],
);

// eslint-disable-next-line react-compiler/react-compiler
onSubmitAction = submitForm;

const onTriggerAttachmentPicker = useCallback(() => {
isNextModalWillOpenRef.current = true;
isKeyboardVisibleWhenShowingModalRef.current = true;
Expand Down Expand Up @@ -399,6 +396,9 @@ function ReportActionCompose({
clearComposer();
}, [isSendDisabled, isReportReadyForDisplay, composerRefShared]);

// eslint-disable-next-line react-compiler/react-compiler
onSubmitAction = handleSendMessage;

const emojiShiftVertical = useMemo(() => {
const chatItemComposeSecondaryRowHeight = styles.chatItemComposeSecondaryRow.height + styles.chatItemComposeSecondaryRow.marginTop + styles.chatItemComposeSecondaryRow.marginBottom;
const reportActionComposeHeight = styles.chatItemComposeBox.minHeight + chatItemComposeSecondaryRowHeight;
Expand Down

0 comments on commit 8143c8d

Please sign in to comment.