Fixed bug which prevented historical images from loading. (#5271)

* Fixed bug which prevented historical images from loading.

imageLoadDelay variable would be initialized as a string when it's supposed to be initialized as an integer.

* Updated image load delay in E2E test.

* Implemented suggested tweak for parsing image delay.

Co-authored-by: John Hill <john.c.hill@nasa.gov>
This commit is contained in:
Michael Pingleton 2022-06-09 17:25:33 -04:00 committed by GitHub
parent f08fd58486
commit 78002f0a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -249,10 +249,8 @@ test('Example Imagery in Display layout', async ({ page }) => {
await page.click('text=Example Imagery');
// Clear and set Image load delay to minimum value
// FIXME: Update the value to 5000 ms when this bug is fixed.
// See: https://github.com/nasa/openmct/issues/5265
await page.locator('input[type="number"]').fill('');
await page.locator('input[type="number"]').fill('0');
await page.locator('input[type="number"]').fill('5000');
// Click text=OK
await Promise.all([

View File

@ -168,7 +168,7 @@ function getImageUrlListFromConfig(configuration) {
}
function getImageLoadDelay(domainObject) {
const imageLoadDelay = domainObject.configuration.imageLoadDelayInMilliSeconds;
const imageLoadDelay = Math.trunc(Number(domainObject.configuration.imageLoadDelayInMilliSeconds));
if (!imageLoadDelay) {
openmctInstance.objects.mutate(domainObject, 'configuration.imageLoadDelayInMilliSeconds', DEFAULT_IMAGE_LOAD_DELAY_IN_MILISECONDS);