From f4570c96c23728d52ad8d0efcd3b1cded47e8e36 Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Wed, 11 Dec 2019 13:46:10 -0300 Subject: [PATCH] tests: Download Image File Modal (#1219) * E2E Tests: Download Image File Modal * CI fix * Fixes for PR comments * Small change just to check CI behavior * Fix for CI failure: comparing classes instead of image src * Fixed Download button test and blocked Download Dialog event * Deleting file ConnectedViewportDownloadForm.js This file was not supposed to be created by this PR. It was already deleted by another user on Master branch. * Removing wrong import line * Fixes based on PR comments * Fixes based on PR comments * test: remove assignment to window --- .../ViewportDownloadForm.js | 23 +++- .../ui/src/components/ohifModal/OHIFModal.js | 7 +- .../common/OHIFCornerstoneHotkeys.spec.js | 6 +- .../common/OHIFDownloadSnapshotFile.spec.js | 126 ++++++++++++++++++ platform/viewer/cypress/support/aliases.js | 1 + platform/viewer/cypress/support/commands.js | 12 ++ 6 files changed, 165 insertions(+), 10 deletions(-) create mode 100644 platform/viewer/cypress/integration/common/OHIFDownloadSnapshotFile.spec.js diff --git a/platform/ui/src/components/content/viewportDownloadForm/ViewportDownloadForm.js b/platform/ui/src/components/content/viewportDownloadForm/ViewportDownloadForm.js index 75100dc7a..680d08f91 100644 --- a/platform/ui/src/components/content/viewportDownloadForm/ViewportDownloadForm.js +++ b/platform/ui/src/components/content/viewportDownloadForm/ViewportDownloadForm.js @@ -196,11 +196,12 @@ const ViewportDownloadForm = ({ )} -
+
setFilename(event.target.value)} label={t('File name')} @@ -233,6 +236,7 @@ const ViewportDownloadForm = ({
-
+

{t('Image Preview')}

Viewport Preview
-
-
diff --git a/platform/ui/src/components/ohifModal/OHIFModal.js b/platform/ui/src/components/ohifModal/OHIFModal.js index 5c6b18633..3f9302ced 100644 --- a/platform/ui/src/components/ohifModal/OHIFModal.js +++ b/platform/ui/src/components/ohifModal/OHIFModal.js @@ -29,7 +29,7 @@ const OHIFModal = ({ const renderHeader = () => { return ( title && ( -
+

{title}

{closeButton && (