-
Notifications
You must be signed in to change notification settings - Fork 948
Fix Saucelabs tests in analytics and functions #2845
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
Conversation
Binary Size ReportAffected SDKs
Test Logs |
packages/analytics/index.test.ts
Outdated
@@ -88,7 +88,8 @@ describe('FirebaseAnalytics instance tests', () => { | |||
currency: 'USD' | |||
}); | |||
// Clear event stack of async FID call. | |||
await fidDeferred.promise; | |||
// For IE: Need to wrap it in another function as FID fetch is wrapped in initializeGAId. | |||
await (() => fidDeferred.promise); |
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.
Does it really work? Do you mean to execute the function, (async () => fidDeferred.promise)()
?
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.
It did work but I don't know why, which seems bad. I changed it to something more readable but doesn't follow the logic as much. For some reason, only IE executes the expect
assertions immediately after the mock FID promise resolves instead of executing the gtag config statements which should be first in line.
I also fixed another issue on the last test in index.test.ts
where the config calls were resolving after the test was disposed of, which again seems to be IE only.
Fix some failing IE tests in analytics and functions.
Also fixed error in workflow file so that cross-browser workflow will run again.