-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Telemetry API] Prevent Subscriptions with different options from overwriting each other #7930
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7930 +/- ##
==========================================
- Coverage 57.66% 57.24% -0.42%
==========================================
Files 677 677
Lines 27373 27404 +31
Branches 2689 2689
==========================================
- Hits 15784 15688 -96
- Misses 11250 11375 +125
- Partials 339 341 +2
... and 19 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…or, more robust hash function
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 think the hash code is the right approach here, thanks. I think we can simplify the code a little with a few tweaks,
e2e/tests/functional/plugins/displayLayout/displayLayout.e2e.spec.js
Outdated
Show resolved
Hide resolved
…lacer function for stringify
…eterminative row addition check to test
|
||
for (const key of Object.keys(value)) { | ||
const sanitizedValue = this.#sanitizeForSerialization(value[key]); | ||
// Replace functions and non-plain objects with their key names |
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.
Return undefined
to leave the property out of its stringified representation entirely, per the docs - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter
if (Array.isArray(value)) { | ||
return value.map((item) => this.#sanitizeForSerialization(item)); | ||
return value.map((item, index) => this.sanitizeForSerialization(String(index), item)); |
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.
Just return the array itself, the replacer function (sanitizeForSerialization) will automatically be called for each member. see docs - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter
// Wait for some data to populate | ||
// eslint-disable-next-line playwright/no-wait-for-timeout | ||
await page.waitForTimeout(2000); // Wait for a few state changes | ||
|
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 think Playwright gone done this already - https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-count
Closes #7933
Describe your changes:
All Submissions:
Author Checklist
type:
label? Note: this is not necessarily the same as the original issue.Reviewer Checklist