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 👀 |
perunt
left a comment
There was a problem hiding this comment.
Test passed. I have only one question about the deprecated DeviceEventEmitter, but I see we're already using it in the codebase
| 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.
DeviceEventEmitter is deprecated, but we can use NativeEventEmitter instead
There was a problem hiding this comment.
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.
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 |
mountiny
left a comment
There was a problem hiding this comment.
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
mainvariant 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/onViewableItemsChangedevents. TypicallyonViewableItemsChangedwas firing first, thenonLayoutproduced 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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop