From 95432ee358b310b0086e8dadc42f35c669d24371 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sat, 22 Apr 2017 14:16:57 +0900 Subject: [PATCH] Refactor clearBrowsingDataPanel.js with commonForm Closes #8192 Addresses #7989 - Added CommonFormSmall to commonForm.js - Added data-test-id and testIds - Removed clearBrowsingDataPanel from forms.less - Updated test code Auditors: Test Plan: 1. Open Clear browsing data panel from the menu 2. Test the cancel button works 3. Reopen the panel 4. Test the clear button works --- app/renderer/components/commonForm.js | 15 ++++ app/renderer/components/styles/global.js | 1 + js/about/history.js | 6 +- js/about/preferences.js | 6 +- js/components/clearBrowsingDataPanel.js | 84 ++++++++++++++----- js/components/loginRequired.js | 6 +- js/components/switchControl.js | 1 + .../clearBrowsingDataPanelTest.js | 23 +++-- test/contents/autofillTest.js | 18 ++-- test/lib/selectors.js | 6 +- 10 files changed, 117 insertions(+), 49 deletions(-) diff --git a/app/renderer/components/commonForm.js b/app/renderer/components/commonForm.js index 1528b310f7f..d5debfe2211 100644 --- a/app/renderer/components/commonForm.js +++ b/app/renderer/components/commonForm.js @@ -31,6 +31,16 @@ class CommonFormMedium extends ImmutableComponent { } } +class CommonFormSmall extends ImmutableComponent { + render () { + return
+ } +} + class CommonFormLarge extends ImmutableComponent { render () { return
}
-
diff --git a/js/about/preferences.js b/js/about/preferences.js index c0a1b035201..938eba9d171 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -590,7 +590,11 @@ class SecurityTab extends ImmutableComponent { -