mirror of
https://github.com/nasa/openmct.git
synced 2025-06-22 00:57:11 +00:00
* fix(#7791): tc form shouldn't submit bounds changes on dismiss * test(e2e): add tests for validating time conductor popup - update appAction for setting time conductor in fixed mode - add a11y to time conductor in fixed mode - update tests using `setTimeConductorBounds` * fix(#7791): actually fix the problem. Also, add a test. * test: add annotation to regression test * docs: comments * test: fix the reset image button flake ONCE AND FOR ALL - wait for the rightmost image thumbnail to be in the viewport :D * test: add tests for `setTimeConductorMode` and `setTimeConductorBounds`
This commit is contained in:
@ -112,13 +112,14 @@ test.describe('Telemetry Table', () => {
|
||||
|
||||
// Subtract 5 minutes from the current end bound datetime and set it
|
||||
// Bring up the time conductor popup
|
||||
let endDate = await page.locator('[aria-label="End bounds"]').textContent();
|
||||
endDate = new Date(endDate);
|
||||
let endTimeStamp = await page.getByLabel('End bounds').textContent();
|
||||
endTimeStamp = new Date(endTimeStamp);
|
||||
|
||||
endDate.setUTCMinutes(endDate.getUTCMinutes() - 5);
|
||||
endDate = endDate.toISOString().replace(/T/, ' ');
|
||||
endTimeStamp.setUTCMinutes(endTimeStamp.getUTCMinutes() - 5);
|
||||
const endDate = endTimeStamp.toISOString().split('T')[0];
|
||||
const endTime = endTimeStamp.toISOString().split('T')[1];
|
||||
|
||||
await setTimeConductorBounds(page, undefined, endDate);
|
||||
await setTimeConductorBounds(page, { endDate, endTime });
|
||||
|
||||
await expect(tableWrapper).not.toHaveClass(/is-paused/);
|
||||
|
||||
@ -131,7 +132,7 @@ test.describe('Telemetry Table', () => {
|
||||
|
||||
// Verify that it is <= our new end bound
|
||||
const latestMilliseconds = Date.parse(latestTelemetryDate);
|
||||
const endBoundMilliseconds = Date.parse(endDate);
|
||||
const endBoundMilliseconds = Date.parse(endTimeStamp);
|
||||
expect(latestMilliseconds).toBeLessThanOrEqual(endBoundMilliseconds);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user