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:
Christian Stenger
2013-01-18 15:37:32 +01:00
parent a2ae912089
commit 128df0f4b4
2 changed files with 95 additions and 0 deletions
@@ -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
@@ -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"
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 txtCnt 1 "Property"
5 clicked 1
6 clicked 1
7 width 1 800
8 height 1 480
9 color 1 "white"
10 Text 1
11 id 2 addedText
12 text 2 "Squish QML outline test"
13 color 2 "darkcyan"
14 font.bold 2 true
15 anchors.centerIn 2 parent
16 FocusScope 1
17 id 2 mainView
18 width 2 parent.width
19 height 2 parent.height
20 focus 2 true
21 GridMenu 2
22 id 3 gridMenu
23 width 3 parent.width
24 height 3 320
25 focus 3 true
26 interactive 3 parent.activeFocus
27 ListMenu 2
28 id 3 listMenu
29 y 3 320
30 width 3 parent.width
31 height 3 320
32 Rectangle 2
33 id 3 shade
34 anchors.fill 3 parent
35 color 3 "#cc00bb"
36 opacity 3 0
37 states 2
38 State 3
39 name 4 "showListViews"
40 PropertyChanges 4
41 target 5 gridMenu
42 y 5 -160
43 PropertyChanges 4
44 target 5 listMenu
45 y 5 160
46 transitions 2
47 Transition 3
48 NumberAnimation 4
49 properties 5 "y"
50 duration 5 600
51 easing.type 5 Easing.OutQuint
52 Image 1
53 source 2 "Core/images/arrow.png"
54 rotation 2 180
55 anchors.verticalCenter 2 parent.verticalCenter
56 MouseArea 2
57 anchors.fill 3 parent
58 anchors.margins 3 -10
59 onClicked 3
60 ContextMenu 1
61 id 2 contextMenu
62 x 2 -265
63 width 2 260
64 height 2 parent.height
65 states 1
66 State 2
67 name 3 "contextMenuOpen"
68 when 3 !mainView.activeFocus
69 PropertyChanges 3
70 target 4 contextMenu
71 x 4 0
72 open 4 true
73 PropertyChanges 3
74 target 4 mainView
75 x 4 130
76 PropertyChanges 3
77 target 4 shade
78 opacity 4 0.25
79 transitions 1
80 Transition 2
81 NumberAnimation 3
82 properties 4 "x,opacity"
83 duration 4 600
84 easing.type 4 Easing.OutQuint