~ubuntu-sdk-team/ubuntu-ui-toolkit/insertMode

« back to all changes in this revision

Viewing changes to tests/unit_x11/tst_components/tst_textinput_touch.qml

  • Committer: Christian Dywan
  • Date: 2014-10-31 13:44:43 UTC
  • Revision ID: christian.dywan@canonical.com-20141031134443-42aa01a1v2hdu05i
test_long_tap_on_selected_text_data no longer applies

Selection automatically invokes the context menu, long tap
is not necessary anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
            TestExtras.touchClick(0, testMain, 0, 0);
180
180
        }
181
181
 
182
 
        function test_long_tap_on_selected_text_data() {
183
 
            return [
184
 
                {tag: "TextField", input: textField},
185
 
                {tag: "TextArea", input: textArea},
186
 
            ];
187
 
        }
188
 
        function test_long_tap_on_selected_text(data) {
189
 
            data.input.focus = true;
190
 
            verify(data.input.focus, "Text input doesn't have the focus!")
191
 
            data.input.selectWord();
192
 
            var selectedText = data.input.selectedText;
193
 
            verify(selectedText !== "", "No text selected!");
194
 
 
195
 
            popupSpy.target = findChild(data.input, "input_handler");
196
 
            TestExtras.touchLongPress(0, data.input, guPoint(4, 2));
197
 
            waitForRendering(data.input, 500);
198
 
            popupSpy.wait();
199
 
            compare(data.input.selectedText, selectedText, "Text selection should be the same!");
200
 
 
201
 
            // cleanup
202
 
            TestExtras.touchRelease(0, data.input, guPoint(2, 2));
203
 
            // dismiss popover
204
 
            TestExtras.touchClick(0, testMain, guPoint(0, 0));
205
 
        }
206
 
 
207
182
        function test_select_text_by_dragging_cursor_handler_data() {
208
183
            return [
209
184
                {tag: "TextField", input: textField, initialCursorPosition: 0, cursorName: "selectionEnd", delta: guPoint(10, 0)},