-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: comment linking e2e test #43986
fix: comment linking e2e test #43986
Conversation
@ikevin127 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Tagging @perunt for review since he wrote this test originally 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test passed. I have only one question about the deprecated DeviceEventEmitter, but I see we're already using it in the codebase
@@ -1,6 +1,6 @@ | |||
import React, {forwardRef, useMemo} from 'react'; | |||
import type {FlatListProps, ScrollViewProps, ViewToken} from 'react-native'; | |||
import {FlatList} from 'react-native'; | |||
import {DeviceEventEmitter, FlatList} from 'react-native'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeviceEventEmitter is deprecated, but we can use NativeEventEmitter instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, currently we don't use NativeEventEmitter
anywhere in the codebase, so I think now it's better to keep DeviceEventEmitter
and later (when needed) we can re-work all code pieces at once.
console.debug('[E2E] Error while submitting test results:', err); | ||
}); | ||
|
||
const subscription = DeviceEventEmitter.addListener('onViewableItemsChanged', (res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it fire when we open the first chat? It looks like it would, so we can skip it or change the log '[E2E] Message verification failed,' as it may look like an error, but it would be expected behavior since we only want to check it for entry.name === SWITCH_REPORT
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes look good to me, thanks
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.86-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.86-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.86-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.0-9 🚀
|
Details
Fixed flaky comment linking test.
Caution
Even after merging this PR CI still may fail, because for
main
variant it will use a version from latest release and this version will not have changes from this PR.The original problem was in the order of
onLayout
/onViewableItemsChanged
events. TypicallyonViewableItemsChanged
was firing first, thenonLayout
produced an expected measurement and after 3s we were reading data that was sent inonViewableItemsChanged
.But if we read this data and it is missing, then our test just hangs and then fails due to timeout restriction (I think it again can happen because of the fact that this test is executed in last order and the phone may be overheated and CPU can be slightly throttling).
In this PR I re-worked an approach and now we:
After these changes I re-assembled both apps and run test (also put my device to direct sun beams and put a case on it - in this case it overheats much faster). I could successfully pass all 4 test suite 3 times, so I think it's stable now (before I was getting the error on the hals of the first execution).
Fixed Issues
$ #43972
$ #43941
$ #43928
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop