Skip to content
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
8 changes: 5 additions & 3 deletions .maestro/tests/assorted/join-from-directory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ tags:
- tapOn:
id: 'directory-view-search'
- inputText: join-from-directory
- pressKey: Enter
- extendedWaitUntil:
visible:
id: 'directory-view-item-join-from-directory'
Expand Down Expand Up @@ -103,7 +102,11 @@ tags:
- tapOn:
id: 'directory-view-search'
- inputText: ${output.otherUser.username}
- pressKey: Enter
- runFlow:
when:
platform: iOS
commands:
- pressKey: enter
- extendedWaitUntil:
visible:
id: 'directory-view-item-${output.otherUser.username}'
Expand Down Expand Up @@ -147,7 +150,6 @@ tags:
- tapOn:
id: 'directory-view-search'
- inputText: ${output.team}
- pressKey: Enter
- extendedWaitUntil:
visible:
id: 'directory-view-item-${output.team}'
Expand Down
8 changes: 6 additions & 2 deletions .maestro/tests/assorted/setting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,12 @@ tags:
visible:
id: 'settings-view'
timeout: 60000
- assertVisible:
id: 'settings-view-clear-cache'
- waitForAnimationToEnd:
timeout: 60000
- extendedWaitUntil:
visible:
id: 'settings-view-clear-cache'
timeout: 60000
- tapOn:
id: 'settings-view-clear-cache'
retryTapIfNoChange: true
Expand Down
3 changes: 1 addition & 2 deletions .maestro/tests/room/jump-to-message.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ tags:
id: 'message-content-30'
timeout: 60000
- tapOn:
text: '30'
index: 1
id: 'message-content-30'
- extendedWaitUntil:
visible:
id: 'message-content-29'
Expand Down
2 changes: 1 addition & 1 deletion app/containers/InAppNotification/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
componentProps: {
notification
},
duration: notification.customTime || 3000, // default 3s,
duration: notification.customTime || process.env.RUNNING_E2E_TESTS ? 60000 : 3000, // default 3s,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Fix operator precedence bug in duration calculation.

The current expression evaluates as (notification.customTime || process.env.RUNNING_E2E_TESTS) ? 60000 : 3000 due to operator precedence. This means if notification.customTime is set to any truthy value (e.g., 5000ms), the duration will be 60000ms instead of the intended custom time.

Apply this diff to fix the precedence:

-duration: notification.customTime || process.env.RUNNING_E2E_TESTS ? 60000 : 3000, // default 3s,
+duration: notification.customTime || (process.env.RUNNING_E2E_TESTS ? 60000 : 3000), // default 3s
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
duration: notification.customTime || process.env.RUNNING_E2E_TESTS ? 60000 : 3000, // default 3s,
duration: notification.customTime || (process.env.RUNNING_E2E_TESTS ? 60000 : 3000), // default 3s
🤖 Prompt for AI Agents
In app/containers/InAppNotification/index.tsx around line 62, the duration
expression suffers from operator precedence so it currently evaluates as
(notification.customTime || process.env.RUNNING_E2E_TESTS) ? 60000 : 3000;
change it so the custom time is used when present and only fall back to the
E2E/test check otherwise: replace the expression with either
notification.customTime ?? (process.env.RUNNING_E2E_TESTS ? 60000 : 3000) or
notification.customTime || (process.env.RUNNING_E2E_TESTS ? 60000 : 3000) to
ensure the ternary applies only to the test flag.

hideOnPress: notification.hideOnPress ?? true,
swipeEnabled: notification.swipeEnabled ?? true
});
Expand All @@ -71,7 +71,7 @@
return () => {
EventEmitter.removeListener(INAPP_NOTIFICATION_EMITTER, listener);
};
}, [subscribedRoom, appState]);

Check warning on line 74 in app/containers/InAppNotification/index.tsx

View workflow job for this annotation

GitHub Actions / format

React Hook useEffect has a missing dependency: 'show'. Either include it or remove the dependency array

Check warning on line 74 in app/containers/InAppNotification/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint and Test / run-eslint-and-test

React Hook useEffect has a missing dependency: 'show'. Either include it or remove the dependency array

return <NotifierRoot />;
});
Expand Down
Loading