This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1073870 - Autocorrect word does not get cleared when moving the c…
…ursor around
- Loading branch information
1 parent
92625fd
commit 3d437a0
Showing
4 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ smoketest = false | |
[test_keyboard_predictive_key.py] | ||
|
||
[test_email_keyboard.py] | ||
|
||
[test_keyboard_bug_1073870.py] |
38 changes: 38 additions & 0 deletions
38
tests/python/gaia-ui-tests/gaiatest/tests/functional/keyboard/test_keyboard_bug_1073870.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# -*- coding: iso-8859-15 -*- | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
from gaiatest import GaiaTestCase | ||
from gaiatest.apps.ui_tests.app import UiTests | ||
import time | ||
|
||
class TestKeyboardBug1073870(GaiaTestCase): | ||
|
||
def setUp(self): | ||
GaiaTestCase.setUp(self) | ||
# enable auto-correction of keyboard | ||
self.data_layer.set_setting('keyboard.autocorrect', True) | ||
|
||
def test_keyboard_bug_1073870(self): | ||
self.ui_tests = UiTests(self.marionette) | ||
self.ui_tests.launch() | ||
|
||
# go to UI/keyboard page | ||
keyboard_page = self.ui_tests.tap_keyboard_option() | ||
keyboard_page.switch_to_frame() | ||
|
||
# tap the field "input type=text" | ||
keyboard = keyboard_page.tap_text_input() | ||
|
||
keyboard.send('Hello worl') | ||
|
||
# set caret position to after Hello | ||
keyboard_page.switch_to_frame() | ||
self.marionette.execute_script( | ||
"""var el = document.activeElement; | ||
el.selectionStart = el.selectionEnd = 5;""") | ||
|
||
keyboard.send(' ') | ||
keyboard_page.switch_to_frame() | ||
self.assertEqual(keyboard_page.text_input, 'Hello worl') |