-
Notifications
You must be signed in to change notification settings - Fork 22
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
#9156: tab synchronized mod variable storage (3/3) #9181
Conversation
6fd6e3e
to
006640c
Compare
5a3f887
to
ef073a8
Compare
let values = await browser.storage.session.get(); | ||
expect(Object.keys(values)).toHaveLength(2); | ||
|
||
// Delete unrelated mod variables | ||
await deleteSynchronizedModVariablesForMod(modComponentRefFactory().modId); | ||
values = await browser.storage.session.get(); | ||
expect(Object.keys(values)).toHaveLength(2); | ||
|
||
// Delete mod variables | ||
await deleteSynchronizedModVariablesForMod(modComponentRef.modId); | ||
values = await browser.storage.session.get(); | ||
expect(Object.keys(values)).toHaveLength(0); |
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.
NIT: This test could be improved by having sessionStorage have variables for 2 different mod ids and confirming that only the variables for the intended modId are deleted
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.
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
117ef4b
to
b25b38d
Compare
Add state controller test 9154: add E2E runtime test Improve comments Refactor dipatch method Fix type errors
Improve method names Add jest tests Split up state controller Remove performance note
5ead239
to
b925568
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9181 +/- ##
==========================================
+ Coverage 74.24% 74.81% +0.56%
==========================================
Files 1332 1364 +32
Lines 40817 42036 +1219
Branches 7634 7850 +216
==========================================
+ Hits 30306 31448 +1142
- Misses 10511 10588 +77 ☔ View full report in Codecov by Sentry. |
Playwright test resultsDetails Open report ↗︎ Flaky testschrome › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod Skipped testschrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor |
What does this PR do?
tab
synchronization policy #9156browser.storage.session
on tab closure and mod deactivationRemaining Work
Demo
Future Work
browser.session.storage
contents, to automatically check that the tab/deactivation listeners are working properlyFor more information on our expectations for the PR process, see the
code review principles doc