From 7a356175e7c0af6b37669b9e2c1c7dd0bac2ea6c Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Tue, 29 Nov 2022 15:23:14 -0500 Subject: [PATCH] feat: update onBlur to set state to default values (#148) --- .../__snapshots__/index.test.jsx.snap | 165 +++++++----------- .../components/TranscriptWidget/index.jsx | 30 ++-- .../__snapshots__/index.test.jsx.snap | 62 +++---- .../components/VideoSourceWidget/hooks.js | 25 --- .../components/VideoSourceWidget/hooks.jsx | 66 +++++++ .../VideoSourceWidget/hooks.test.jsx | 100 +++++++++++ .../components/VideoSourceWidget/index.jsx | 59 +++---- 7 files changed, 286 insertions(+), 221 deletions(-) delete mode 100644 src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoSourceWidget/hooks.js create mode 100644 src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoSourceWidget/hooks.jsx create mode 100644 src/editors/containers/VideoEditor/components/VideoSettingsModal/components/VideoSourceWidget/hooks.test.jsx diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/TranscriptWidget/__snapshots__/index.test.jsx.snap b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/TranscriptWidget/__snapshots__/index.test.jsx.snap index 42bfab5c7..69c8f379e 100644 --- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/TranscriptWidget/__snapshots__/index.test.jsx.snap +++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/TranscriptWidget/__snapshots__/index.test.jsx.snap @@ -38,12 +38,12 @@ exports[`TranscriptWidget component snapshots snapshot: renders ErrorAlert with index={0} language="en" /> -
@@ -54,24 +54,15 @@ exports[`TranscriptWidget component snapshots snapshot: renders ErrorAlert with /> - - - - } - placement="right" - > - - -
+ + + -
@@ -165,24 +156,15 @@ exports[`TranscriptWidget component snapshots snapshot: renders ErrorAlert with /> - - - - } - placement="right" - > - - -
+ + + -
@@ -272,24 +254,15 @@ exports[`TranscriptWidget component snapshots snapshots: renders as expected wit /> - - - - } - placement="right" - > - - -
+ + + -
@@ -443,24 +416,15 @@ exports[`TranscriptWidget component snapshots snapshots: renders as expected wit /> - - - - } - placement="right" - > - - -
+ + + -
@@ -550,24 +514,15 @@ exports[`TranscriptWidget component snapshots snapshots: renders as expected wit /> - - - - } - placement="right" - > - - -
+ + + ))} -
+ updateField({ allowTranscriptDownloads: e.target.checked })} > - - - - )} - > - - -
+ + + @@ -35,32 +35,21 @@ exports[`VideoSourceWidget snapshots snapshots: renders as expected with default /> - - - - } - placement="top" - > - - + - - - - - } - placement="top" - > - - - + iconAs="Icon" + key="top" + tooltipContent="Allow learners to download versions of this video in + different formats if they cannot use the edX video player or do not have + access to YouTube." + tooltipPlacement="top" + /> + +