Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9418)

Unified Diff: chrome/test/data/webui/settings/languages_page_browsertest.js

Issue 2670963003: MD Settings: in spell-check page, disable add button when input is empty. (Closed)
Patch Set: add edit-dictionary page test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/settings/languages_page/edit_dictionary_page.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/languages_page_browsertest.js
diff --git a/chrome/test/data/webui/settings/languages_page_browsertest.js b/chrome/test/data/webui/settings/languages_page_browsertest.js
index abed7bc973ff1efcbfdbd1cca19a175059065656..e52a28094202331227182bc4e8d20322a16646db 100644
--- a/chrome/test/data/webui/settings/languages_page_browsertest.js
+++ b/chrome/test/data/webui/settings/languages_page_browsertest.js
@@ -447,12 +447,25 @@ TEST_F('SettingsLanguagesPageBrowserTest', 'MAYBE_LanguagesPage', function() {
assertTrue(triggerRow.classList.contains('two-line'));
assertLT(
0, triggerRow.querySelector('.secondary').textContent.length);
+ }
+ });
+ if (!cr.isMac) {
+ test('spellcheck edit dictionary page add word button', function() {
+ assertFalse(!!languagesPage.$$('settings-edit-dictionary-page'));
+ var spellCheckCollapse = languagesPage.$.spellCheckCollapse;
MockInteractions.tap(
spellCheckCollapse.querySelector('.list-button:last-of-type'));
dpapad 2017/02/06 22:40:59 Are you sure that this selector works as expected?
scottchen 2017/02/06 23:38:31 The (non-)existence of the subpage is checked befo
- assertTrue(!!languagesPage.$$('settings-edit-dictionary-page'));
- }
- });
+ var editDictPage = languagesPage.$$('settings-edit-dictionary-page');
+ assertTrue(!!editDictPage);
+ var addWordButton = editDictPage.root.querySelector('paper-button');
+ editDictPage.$.newWord.value = '';
+ assertTrue(!!addWordButton);
+ assertTrue(addWordButton.disabled);
+ editDictPage.$.newWord.value = 'valid word';
+ assertFalse(addWordButton.disabled);
+ });
+ }
}.bind(this));
// TODO(michaelpg): Test more aspects of the languages UI.
« no previous file with comments | « chrome/browser/resources/settings/languages_page/edit_dictionary_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698