-
Notifications
You must be signed in to change notification settings - Fork 1
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
[no-Jira] Flaky tests #862
Conversation
@@ -258,33 +261,6 @@ describe('PartnerGivingAnalysisReport', () => { | |||
expect(getByTestId('PartnerGivingAnalysisReport')).toBeInTheDocument(); | |||
}); | |||
|
|||
it('nav list closed', async () => { |
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.
This tests that the MultiPageMenu
isn't rendered but PartnerGivingAnalysisReport
doesn't render the menu, PartnerGivingAnalysisReportPage
does. I removed it because it isn't testing anything meaningful.
This pull request is automatically being deployed by Amplify Hosting (learn more). |
@@ -145,7 +145,7 @@ const FixPhoneNumbers: React.FC<Props> = ({ accountListId }: Props) => { | |||
primary: phoneNumber.primary, | |||
updatedAt: phoneNumber.updatedAt, | |||
source: phoneNumber.source, | |||
number: phoneNumber.number, | |||
number: phoneNumber.number || '', |
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.
I've also fixed this in my Phone PR, going live today. but prob good to keep it in here so your PR doesn't break
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.
Wow, you put this out fast! Great work!
I also noticed we are using setTimeout()
on a few other tests where we could be using jest.advanceTimersByTime()
with jest.useFakeTimers()
- src/components/Contacts/ContactFlow/ContactFlowSetup/Column/ContactFlowSetupColumn.test.tsx
- src/components/Layouts/Primary/TopBar/Items/SearchMenu/SearchMenu.test.tsx
- src/components/common/SearchBox/SearchBox.test.tsx
- src/components/Shared/Header/ListHeader.test.tsx
Description
Attempt to fix common flaky tests
partnerGivingAnalysis page › toggles filter panel
There are two toggle buttons that both open the filter panel. One is supposed to open the navbar and one is supposed to open the filter panel.
CreateMultipleContacts › Contact Creation › handles chosen address predictions
This and other
CreateMultipleContacts
tests seen take a long time because there are so many inputs to render and update. I adjusted the test to only render 3 rows instead of 10, which speeds things up significantly. Running the tests inCreateMultipleContacts.test.tsx
take ~10s now instead of ~30s on my machine.DonorAccountAutocomplete › debounces loading donors from the server on type
The debounce was for 1000ms, and the default
waitFor
timeout is 1000ms. I changed the debounce interval to 500ms to match most of the other places in the codebase.If we find more flaky tests, we can try to address them in a future PR.
Checklist: