From bbf14573649b9cda879844b7ed24ad6b87293e0b 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 + less/forms.less | 45 ---------- .../clearBrowsingDataPanelTest.js | 23 +++-- test/contents/autofillTest.js | 18 ++-- test/lib/selectors.js | 6 +- 11 files changed, 117 insertions(+), 94 deletions(-) diff --git a/app/renderer/components/commonForm.js b/app/renderer/components/commonForm.js index ed5b8c54fb6..6ad0a676ffc 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 4f4bb67aab8..424bcefe9ae 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -590,7 +590,11 @@ class SecurityTab extends ImmutableComponent { -