From 78002f0a243115451b1a2e2a24a657d265ee18dc Mon Sep 17 00:00:00 2001 From: Michael Pingleton <86250152+mpingleton@users.noreply.github.com> Date: Thu, 9 Jun 2022 17:25:33 -0400 Subject: [PATCH] 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 --- e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js | 4 +--- example/imagery/plugin.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js b/e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js index 0a570e5c2a..ee98840fe7 100644 --- a/e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js +++ b/e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js @@ -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([ diff --git a/example/imagery/plugin.js b/example/imagery/plugin.js index 47d6f4ef70..dfb77e4918 100644 --- a/example/imagery/plugin.js +++ b/example/imagery/plugin.js @@ -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);