-
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
fix(#7670): Ensure objects unsubscribe from staleness when destroyed #7736
Conversation
…g staleness provider to use new time api, add test
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7736 +/- ##
==========================================
- Coverage 57.00% 56.63% -0.38%
==========================================
Files 673 673
Lines 27178 27177 -1
Branches 2635 2636 +1
==========================================
- Hits 15493 15391 -102
- Misses 11356 11455 +99
- Partials 329 331 +2
... and 20 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
this.#updateRealTime(this.#openmct.time.getMode()); | ||
} | ||
|
||
this.#realtimeCheck(); |
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 method name slaps
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.
LGTM, one minor nitpick you can take or leave
// edit properties and enable staleness updates | ||
await page.getByLabel('More actions').click(); | ||
await page.getByLabel('Edit properties...').click(); | ||
await page.getByLabel('Provide Staleness Updates', { exact: true }).click(); | ||
await page.getByLabel('Save').click(); |
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.
🙌
@@ -59,7 +59,7 @@ export default class SinewaveLimitProvider extends EventEmitter { | |||
subscribeToStaleness(domainObject, callback) { | |||
const id = this.#getObjectKeyString(domainObject); | |||
|
|||
this.#realtimeCheck(); | |||
this.#realTimeCheck(); |
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.
whoomp there it is
Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
Closes #7670
Describe your changes:
Clearing any existing staleness subscriptions before showing a new object.
Adding a new test to make sure this doesn't regress.
Added new functionality tocreateDomainObjectWithDefaults
to be able to set toggles when creating test objects.Using new timeAPI methods in SWG Staleness provider.
All Submissions:
Author Checklist
type:
label? Note: this is not necessarily the same as the original issue.Reviewer Checklist