mirror of
https://github.com/nasa/openmct.git
synced 2025-01-02 03:16:41 +00:00
Ensure realtime uses upstream context when available
Eliminate ambiguity when looking for time conductor locator
This commit is contained in:
parent
72c432ffcc
commit
f9c5e12a59
@ -314,7 +314,7 @@ async function _isInEditMode(page, identifier) {
|
||||
*/
|
||||
async function setTimeConductorMode(page, isFixedTimespan = true) {
|
||||
// Click 'mode' button
|
||||
const timeConductorMode = await page.locator('.c-compact-tc');
|
||||
const timeConductorMode = await page.locator('.l-shell__time-conductor.c-compact-tc');
|
||||
await timeConductorMode.click();
|
||||
await timeConductorMode.locator('.js-mode-button').click();
|
||||
const modeMenu = await page.locator('.c-conductor__mode-menu .c-super-menu__menu');
|
||||
|
@ -299,6 +299,14 @@ class IndependentTimeContext extends TimeContext {
|
||||
return this.mode;
|
||||
}
|
||||
|
||||
isRealTime() {
|
||||
if (this.upstreamTimeContext) {
|
||||
return this.upstreamTimeContext.isRealTime(...arguments);
|
||||
} else {
|
||||
return super.isRealTime(...arguments);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Causes this time context to follow another time context (either the global context, or another upstream time context)
|
||||
* This allows views to have their own time context which points to the appropriate upstream context as necessary, achieving nesting.
|
||||
|
Loading…
Reference in New Issue
Block a user