forked from qt-creator/qt-creator
Squish: Improve Outline test
Added signal, property and function elements. Change-Id: I3d98bb43baaec45e34cd24963e4d8b64ca624792 Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
@@ -67,6 +67,17 @@ def testModify():
|
||||
pseudoTree = buildTreeFromOutline()
|
||||
# __writeOutlineFile__(pseudoTree, "focus.qml_mod2_outline.tsv")
|
||||
verifyOutline(pseudoTree, "focus.qml_mod2_outline.tsv")
|
||||
test.log("Modification: add special elements")
|
||||
placeCursorToLine(qmlEditor, 'id: window')
|
||||
typeLines(qmlEditor, ['', '', 'property string txtCnt: "Property"', 'signal clicked', '',
|
||||
'function clicked() {','console.log("click")'])
|
||||
performModification('onClicked: contextMenu.focus = true', None, 24, "Left", '{')
|
||||
performModification('onClicked: {contextMenu.focus = true}', "<Left>", 0, None,
|
||||
';window.clicked()')
|
||||
snooze(1) # no way to wait for a private signal
|
||||
pseudoTree = buildTreeFromOutline()
|
||||
# __writeOutlineFile__(pseudoTree, "focus.qml_mod3_outline.tsv")
|
||||
verifyOutline(pseudoTree, "focus.qml_mod3_outline.tsv")
|
||||
|
||||
def performModification(afterLine, typing, markCount, markDirection, newText):
|
||||
global qmlEditor
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
"element" "nestinglevel" "value"
|
||||
"Rectangle" "0" ""
|
||||
"id" "1" "window"
|
||||
"txtCnt" "1" """Property"""
|
||||
"clicked" "1" ""
|
||||
"clicked" "1" ""
|
||||
"width" "1" "800"
|
||||
"height" "1" "480"
|
||||
"color" "1" """white"""
|
||||
"Text" "1" ""
|
||||
"id" "2" "addedText"
|
||||
"text" "2" """Squish QML outline test"""
|
||||
"color" "2" """darkcyan"""
|
||||
"font.bold" "2" "true"
|
||||
"anchors.centerIn" "2" "parent"
|
||||
"FocusScope" "1" ""
|
||||
"id" "2" "mainView"
|
||||
"width" "2" "parent.width"
|
||||
"height" "2" "parent.height"
|
||||
"focus" "2" "true"
|
||||
"GridMenu" "2" ""
|
||||
"id" "3" "gridMenu"
|
||||
"width" "3" "parent.width"
|
||||
"height" "3" "320"
|
||||
"focus" "3" "true"
|
||||
"interactive" "3" "parent.activeFocus"
|
||||
"ListMenu" "2" ""
|
||||
"id" "3" "listMenu"
|
||||
"y" "3" "320"
|
||||
"width" "3" "parent.width"
|
||||
"height" "3" "320"
|
||||
"Rectangle" "2" ""
|
||||
"id" "3" "shade"
|
||||
"anchors.fill" "3" "parent"
|
||||
"color" "3" """#cc00bb"""
|
||||
"opacity" "3" "0"
|
||||
"states" "2" ""
|
||||
"State" "3" ""
|
||||
"name" "4" """showListViews"""
|
||||
"PropertyChanges" "4" ""
|
||||
"target" "5" "gridMenu"
|
||||
"y" "5" "-160"
|
||||
"PropertyChanges" "4" ""
|
||||
"target" "5" "listMenu"
|
||||
"y" "5" "160"
|
||||
"transitions" "2" ""
|
||||
"Transition" "3" ""
|
||||
"NumberAnimation" "4" ""
|
||||
"properties" "5" """y"""
|
||||
"duration" "5" "600"
|
||||
"easing.type" "5" "Easing.OutQuint"
|
||||
"Image" "1" ""
|
||||
"source" "2" """Core/images/arrow.png"""
|
||||
"rotation" "2" "180"
|
||||
"anchors.verticalCenter" "2" "parent.verticalCenter"
|
||||
"MouseArea" "2" ""
|
||||
"anchors.fill" "3" "parent"
|
||||
"anchors.margins" "3" "-10"
|
||||
"onClicked" "3" ""
|
||||
"ContextMenu" "1" ""
|
||||
"id" "2" "contextMenu"
|
||||
"x" "2" "-265"
|
||||
"width" "2" "260"
|
||||
"height" "2" "parent.height"
|
||||
"states" "1" ""
|
||||
"State" "2" ""
|
||||
"name" "3" """contextMenuOpen"""
|
||||
"when" "3" "!mainView.activeFocus"
|
||||
"PropertyChanges" "3" ""
|
||||
"target" "4" "contextMenu"
|
||||
"x" "4" "0"
|
||||
"open" "4" "true"
|
||||
"PropertyChanges" "3" ""
|
||||
"target" "4" "mainView"
|
||||
"x" "4" "130"
|
||||
"PropertyChanges" "3" ""
|
||||
"target" "4" "shade"
|
||||
"opacity" "4" "0.25"
|
||||
"transitions" "1" ""
|
||||
"Transition" "2" ""
|
||||
"NumberAnimation" "3" ""
|
||||
"properties" "4" """x,opacity"""
|
||||
"duration" "4" "600"
|
||||
"easing.type" "4" "Easing.OutQuint"
|
||||
|
Reference in New Issue
Block a user