// Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only //TESTED_COMPONENT=qtdeclarative testcase = { select_text: function() { // Test meta data testTitle = "Text Selection"; testBinary = "qmlscene tests/testapplications/text/text.qml"; testGoal = "Verify text can be selected via various methods"; testPreconditions = "None"; testGroups = "BAT"; // Test Steps prompt(twiki('---+++ ' + testTitle + '

*Goal:* ' + testGoal + '
*Pre-Requisites:* ' + testPreconditions + '
*Tested Binary:* ' + testBinary + '
| *Step* | *Verification* | | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed | | Select the Text: Short option | "Hello World" is shown | | Press the Select Word button | World is selected | | Press the Select All button | Hello World is selected | | Press the Select None button | No text is selected | | Select the Mouse: On option | | | Drag over some text | Only that text is selected. On a touchscreen only device the virtual keyboard may show | | Select the Mouse: Off option | | | Press the Select None button | No text is selected | | Drag over some text | No text is selected. On a touchscreen only device the virtual keyboard may show |')); }, cut_copy_and_paste: function() { // Test meta data testTitle = "Cut, copy and paste"; testBinary = "qmlscene tests/testapplications/text/text.qml"; testGoal = "Verify selected text can be copied/cut to the clipboard, and returned"; testPreconditions = "None"; testGroups = "BAT"; // Test Steps prompt(twiki('---+++ ' + testTitle + '

*Goal:* ' + testGoal + '
*Pre-Requisites:* ' + testPreconditions + '
*Tested Binary:* ' + testBinary + '
| *Step* | *Verification* | | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed | | Select the Text: Short option | "Hello World" is shown | | Press the Select All button | Hello World is selected | | Press the Copy Button | | | Press the Position End Button | Text is no longer selected, cursor is at the text end | | Press the Paste Button | "Hello WorldHello World" is shown | | Press the Select Word button | World is highlighted | | Press the Cut button | World is removed from the text | | Press the Paste button | "Hello WorldHello World" is shown |')); }, password_echo_mode: function() { // Test meta data testTitle = "Password Echo"; testBinary = "qmlscene tests/testapplications/text/text.qml"; testGoal = "Verify password echo modes display text correctly"; testPreconditions = "None"; testGroups = "BAT"; // Test Steps prompt(twiki('---+++ ' + testTitle + '

*Goal:* ' + testGoal + '
*Pre-Requisites:* ' + testPreconditions + '
*Tested Binary:* ' + testBinary + '
| *Step* | *Verification* | | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed | | Select the Text: Short option | "Hello World" is shown | | Select the Echo: Password option | Hello World is now a string of asterisks | | Enter an exclamation mark | An asterisk is added to the string | | Select the Echo: None option | No text is visible | | Enter an exclamation mark | No text is shown | | Select the Echo: OnEdit option | A string of asterisks is shown | | Enter an exclamation mark | An exclamation mark appears at the end of the asterisks, but shortly becomes an asterisk | | Select the Echo: Normal option | Hello World!!! is now displayed |')); }, styling: function() { // Test meta data testTitle = "Text Styling"; testBinary = "qmlscene tests/testapplications/text/text.qml"; testGoal = "Verify text can be displayed using generic styling"; testPreconditions = "None"; testGroups = "BAT"; // Test Steps prompt(twiki('---+++ ' + testTitle + '

*Goal:* ' + testGoal + '
*Pre-Requisites:* ' + testPreconditions + '
*Tested Binary:* ' + testBinary + '
| *Step* | *Verification* | | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed | | Select the Text: Short option | "Hello World" is shown | | Select the Bold: On option | Hello World is now in bold | | Press the Italics: On option | Hello World is now in italics | | Press the Strikeout: On option | Hello World now has a line passing through it | | Press the Underline: On option | Hello World is now underlined | ')); }, cursor_behavior: function() { // Test meta data testTitle = "Cursor Behavior"; testBinary = "qmlscene tests/testapplications/text/text.qml"; testGoal = "Verify the text cursor displays correctly"; testPreconditions = "None"; testGroups = "BAT"; // Test Steps prompt(twiki('---+++ ' + testTitle + '

*Goal:* ' + testGoal + '
*Pre-Requisites:* ' + testPreconditions + '
*Tested Binary:* ' + testBinary + '
| *Step* | *Verification* | | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed | | Enter enough text into the field such that it passes beyond the far right | The text scrolls to the left when the edge is reached | | Select the Autoscroll: Off button | The far left edge shows the first character of the text | | Select the Cursor: Off option | The cursor disappears | | Select the Cursor: On option | The cursor appears | ')); }, capitalization: function() { // Test meta data testTitle = "Capitalization"; testBinary = "qmlscene tests/testapplications/text/text.qml"; testGoal = "Verify character capitalization behaves correctly"; testPreconditions = "None"; testGroups = "BAT"; // Test Steps prompt(twiki('---+++ ' + testTitle + '

*Goal:* ' + testGoal + '
*Pre-Requisites:* ' + testPreconditions + '
*Tested Binary:* ' + testBinary + '
| *Step* | *Verification* | | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed | | Select the Cap10n: Upper option | The text is converted to all upper case | | Select the Cap10n: Lower option | The text is converted to all lower case | | Select the Cap10n: SmallCaps option | The text is converted to all small sized upper case characters | | Select the Cap10n: Capitals option | The text is shown with each first character of every word capitalized | ')); } }