testability-driver 0.9.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tdriver/base/behaviour/behaviours/object_behaviour_composition.rb +1 -1
- data/lib/tdriver/base/behaviour/behaviours/object_behaviour_description.rb +11 -7
- data/lib/tdriver/base/behaviour/behaviours/object_composition.rb +8 -0
- data/lib/tdriver/base/behaviour/factory.rb +229 -209
- data/lib/tdriver/base/errors.rb +3 -0
- data/lib/tdriver/base/state_object.rb +11 -20
- data/lib/tdriver/base/sut/controller.rb +4 -4
- data/lib/tdriver/base/sut/factory.rb +205 -170
- data/lib/tdriver/base/sut/generic/behaviours/application.rb +256 -174
- data/lib/tdriver/base/sut/generic/behaviours/find.rb +17 -11
- data/lib/tdriver/base/sut/generic/behaviours/flash_behaviour.rb +57 -66
- data/lib/tdriver/base/sut/generic/behaviours/sut.rb +578 -497
- data/lib/tdriver/base/sut/generic/behaviours/switchbox_behaviour.rb +41 -15
- data/lib/tdriver/base/sut/generic/behaviours/verification.rb +48 -19
- data/lib/tdriver/base/sut/generic/commands/fixture.rb +47 -0
- data/lib/tdriver/base/sut/generic/commands/key_sequence.rb +25 -13
- data/lib/tdriver/base/sut/generic/commands/screen_capture.rb +16 -10
- data/lib/tdriver/base/sut/generic/plugin.rb +9 -3
- data/lib/tdriver/base/sut/sut.rb +41 -33
- data/lib/tdriver/base/test_object/abstract.rb +26 -3
- data/lib/tdriver/base/test_object/adapter.rb +399 -0
- data/lib/tdriver/base/test_object/behaviours/syncronization.rb +56 -14
- data/lib/tdriver/base/test_object/behaviours/test_object.rb +663 -197
- data/lib/tdriver/base/test_object/cache.rb +132 -0
- data/lib/tdriver/base/test_object/factory.rb +677 -426
- data/lib/tdriver/base/test_object/factory_new.rb +202 -0
- data/lib/tdriver/base/test_object/identificator.rb +24 -17
- data/lib/tdriver/base/test_object/loader.rb +9 -3
- data/lib/tdriver/base/test_object/verification.rb +181 -0
- data/lib/tdriver/loader.rb +1 -1
- data/lib/tdriver/report/report.rb +2 -0
- data/lib/tdriver/report/report_api.rb +4 -4
- data/lib/tdriver/report/report_creator.rb +29 -3
- data/lib/tdriver/report/report_data_presentation.rb +7 -3
- data/lib/tdriver/report/report_execution_statistics.rb +80 -21
- data/lib/tdriver/report/report_javascript.rb +192 -0
- data/lib/tdriver/report/report_test_case_run.rb +22 -0
- data/lib/tdriver/report/report_test_run.rb +62 -55
- data/lib/tdriver/report/report_writer.rb +57 -56
- data/lib/tdriver/tdriver.rb +14 -41
- data/lib/tdriver/util/common/error.rb +1 -0
- data/lib/tdriver/util/common/exceptions.rb +12 -0
- data/lib/tdriver/util/common/file.rb +12 -6
- data/lib/tdriver/util/common/gem.rb +2 -1
- data/lib/tdriver/util/common/hash.rb +152 -0
- data/lib/tdriver/util/common/kernel.rb +49 -34
- data/lib/tdriver/util/common/loader.rb +21 -17
- data/lib/tdriver/util/common/numeric.rb +39 -0
- data/lib/tdriver/util/common/object.rb +115 -0
- data/lib/tdriver/util/common/string.rb +55 -2
- data/lib/tdriver/util/dbaccess/dbaccess.rb +194 -161
- data/lib/tdriver/util/dynamic_attribute_filter.rb +6 -0
- data/lib/tdriver/util/hooking.rb +2 -2
- data/lib/tdriver/util/loader.rb +2 -2
- data/lib/tdriver/util/localisation/localisation.rb +277 -18
- data/lib/tdriver/util/logger.rb +142 -13
- data/lib/tdriver/util/parameter/parameter_hash.rb +8 -5
- data/lib/tdriver/util/parameter/parameter_xml.rb +18 -2
- data/lib/tdriver/util/recorder.rb +17 -12
- data/lib/tdriver/util/user_data/user_data.rb +3 -2
- data/lib/tdriver/util/{video_rec.rb → video_utils.rb} +136 -16
- data/lib/tdriver/util/xml/abstraction.rb +7 -0
- data/lib/tdriver/util/xml/attribute.rb +32 -0
- data/lib/tdriver/util/xml/loader.rb +8 -2
- data/lib/tdriver/util/xml/nil_node.rb +95 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/abstraction.rb +46 -7
- data/lib/tdriver/util/xml/parsers/nokogiri/attribute.rb +19 -9
- data/lib/tdriver/util/xml/parsers/nokogiri/document.rb +1 -1
- data/lib/tdriver/util/xml/parsers/nokogiri/element.rb +13 -1
- data/lib/tdriver/util/xml/parsers/nokogiri/loader.rb +6 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/nodeset.rb +27 -15
- data/lib/tdriver/util/xml/parsers/nokogiri/text.rb +57 -0
- data/lib/tdriver/util/xml/text.rb +32 -0
- data/lib/tdriver/util/xml/xml.rb +35 -22
- data/lib/tdriver/version.rb +1 -1
- data/lib/tdriver-devtools/behaviour/xml/rdoc_behaviour_xml_generator.rb +41 -34
- data/lib/tdriver-devtools/doc/generate.rb +31 -6
- data/lib/tdriver-devtools/doc/xslt/template.xsl +46 -25
- data/lib/tdriver-devtools/tests/feature_tests/example/behaviour_example.rb +100 -0
- data/lib/tdriver-devtools/tests/feature_tests/update +1 -1
- data/lib/tdriver.rb +0 -3
- data/xml/behaviours/generic.xml +1 -1
- data/xml/defaults/generic.xml +4 -90
- data/xml/templates/generic.xml +33 -25
- metadata +21 -29
- data/lib/tdriver-devtools/behaviour/xml_generator/example/flick-example.rb +0 -245
- data/lib/tdriver-devtools/behaviour/xml_generator/example/sut.rb +0 -964
- data/lib/tdriver-devtools/behaviour/xml_generator/generate.rb +0 -68
- data/lib/tdriver-devtools/behaviour/xml_generator/lib/custom_rdoc_generator.rb +0 -1865
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.argument.default.template +0 -1
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.argument.template +0 -3
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.argument_type.template +0 -4
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.exception.template +0 -4
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.method.arguments.template +0 -4
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.method.deprecated.template +0 -3
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.method.exceptions.template +0 -3
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.method.info.template +0 -1
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.method.returns.template +0 -3
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.method.tables.template +0 -3
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.method.template +0 -12
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.returns.template +0 -5
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.table.item.template +0 -1
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.table.row.template +0 -2
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.table.template +0 -7
- data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.template +0 -14
- data/lib/tdriver-devtools/behaviour/xml_generator/update +0 -3
- data/lib/tdriver-devtools/tests/feature_tests/example/flick-example.rb +0 -233
- data/lib/tdriver-devtools/tests/feature_tests/example/impl.rb +0 -194
data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.argument.default.template
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
<default>$ARGUMENT_DEFAULT_VALUE</default>
|
data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.method.info.template
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
<info>$METHOD_INFO</info>
|
data/lib/tdriver-devtools/behaviour/xml_generator/templates/behaviour.xml.table.item.template
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
<item>$ITEM</item>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<behaviours plugin="$REQUIRED_PLUGIN">
|
3
|
-
|
4
|
-
<behaviour name="$BEHAVIOUR_NAME" object_type="$OBJECT_TYPE" sut_type="$SUT_TYPE" input_type="$INPUT_TYPE" version="$VERSION">
|
5
|
-
|
6
|
-
<module name="$MODULE_NAME" />
|
7
|
-
|
8
|
-
<methods>
|
9
|
-
$BEHAVIOUR_METHODS
|
10
|
-
</methods>
|
11
|
-
|
12
|
-
</behaviour>
|
13
|
-
|
14
|
-
</behaviours>
|
@@ -1,233 +0,0 @@
|
|
1
|
-
############################################################################
|
2
|
-
##
|
3
|
-
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
-
## All rights reserved.
|
5
|
-
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
-
##
|
7
|
-
## This file is part of TDriver.
|
8
|
-
##
|
9
|
-
## If you have questions regarding the use of this file, please contact
|
10
|
-
## Nokia at testabilitydriver@nokia.com .
|
11
|
-
##
|
12
|
-
## This library is free software; you can redistribute it and/or
|
13
|
-
## modify it under the terms of the GNU Lesser General Public
|
14
|
-
## License version 2.1 as published by the Free Software Foundation
|
15
|
-
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
-
## of this file.
|
17
|
-
##
|
18
|
-
############################################################################
|
19
|
-
|
20
|
-
module MobyBehaviour
|
21
|
-
|
22
|
-
module QT
|
23
|
-
|
24
|
-
# == description
|
25
|
-
# This module contains demonstration implementation containing tags for documentation generation using gesture as an example
|
26
|
-
#
|
27
|
-
# == behaviour
|
28
|
-
# QtExampleGestureBehaviour
|
29
|
-
#
|
30
|
-
# == requires
|
31
|
-
# testability-driver-sut-qt-plugin
|
32
|
-
#
|
33
|
-
# == input_type
|
34
|
-
# touch
|
35
|
-
#
|
36
|
-
# == sut_type
|
37
|
-
# qt
|
38
|
-
#
|
39
|
-
# == sut_version
|
40
|
-
# *
|
41
|
-
#
|
42
|
-
# == objects
|
43
|
-
# *;sut
|
44
|
-
#
|
45
|
-
module Gesture
|
46
|
-
|
47
|
-
#include MobyBehaviour::QT::Behaviour
|
48
|
-
|
49
|
-
attr_accessor :x
|
50
|
-
attr_reader :y
|
51
|
-
attr_writer :z
|
52
|
-
|
53
|
-
def y
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
def x=(value)
|
58
|
-
end
|
59
|
-
|
60
|
-
# == description
|
61
|
-
# Cause a flick operation on the screen.
|
62
|
-
#
|
63
|
-
# == arguments
|
64
|
-
# argument1
|
65
|
-
# Integer
|
66
|
-
# description: Example argument1
|
67
|
-
# example: 10
|
68
|
-
# default:
|
69
|
-
# Hash
|
70
|
-
# description: Example argument 1 type 2
|
71
|
-
# example: { :optional_1 => "value_1", :optional_2 => "value_2" }
|
72
|
-
# default:
|
73
|
-
#
|
74
|
-
# argument2
|
75
|
-
# String
|
76
|
-
# description: Example argument2
|
77
|
-
# example: "Hello"
|
78
|
-
# default:
|
79
|
-
#
|
80
|
-
# == returns
|
81
|
-
# String
|
82
|
-
# description: Return value type
|
83
|
-
# example: "World"
|
84
|
-
#
|
85
|
-
# == exceptions
|
86
|
-
# RuntimeError
|
87
|
-
# description: example exception
|
88
|
-
#
|
89
|
-
# ArgumentError
|
90
|
-
# description: example exception
|
91
|
-
#
|
92
|
-
# == example
|
93
|
-
# flick( :Down, :Left, { :optional_1 => "value_1", :optional_2 => "value_2" } )
|
94
|
-
#
|
95
|
-
# == info
|
96
|
-
# See method X, table at Y
|
97
|
-
#
|
98
|
-
# == howto
|
99
|
-
# Example1
|
100
|
-
# description: Basic use
|
101
|
-
# code: @sut = TDriver.sut( :Id => "sut_qt" )
|
102
|
-
# app = @sut.application
|
103
|
-
# app.QPushButton( :text => "Close" ).flick :Left
|
104
|
-
#
|
105
|
-
def flick( direction, button = :Left, z = ',', optional_params = {}, y = ',' )
|
106
|
-
begin
|
107
|
-
use_tap_screen = optional_params[:use_tap_screen].nil? ? MobyUtil::Parameter[ @sut.id][ :use_tap_screen, 'false'] :
|
108
|
-
optional_params[:use_tap_screen].to_s
|
109
|
-
optional_params[:useTapScreen] = use_tap_screen
|
110
|
-
|
111
|
-
speed = calculate_speed(@sut.parameter(:gesture_flick_distance), @sut.parameter(:gesture_flick_speed))
|
112
|
-
distance = @sut.parameter(:gesture_flick_distance).to_i
|
113
|
-
params = {:gesture_type => :MouseGesture, :direction => direction, :speed => speed, :distance => distance, :isDrag => false, :button => button, :useTapScreen => use_tap_screen}
|
114
|
-
params.merge!(optional_params)
|
115
|
-
|
116
|
-
do_gesture(params)
|
117
|
-
do_sleep(speed)
|
118
|
-
|
119
|
-
rescue Exception => e
|
120
|
-
|
121
|
-
MobyUtil::Logger.instance.log "behaviour" , "FAIL;Failed flick with direction \"#{direction}\", button \"#{button.to_s}\".;#{identity};flick;"
|
122
|
-
Kernel::raise e
|
123
|
-
end
|
124
|
-
|
125
|
-
MobyUtil::Logger.instance.log "behaviour" , "PASS;Operation flick executed successfully with direction \"#{direction}\", button \"#{button.to_s}\".;#{identity};flick;"
|
126
|
-
|
127
|
-
nil
|
128
|
-
end
|
129
|
-
|
130
|
-
|
131
|
-
private
|
132
|
-
|
133
|
-
# Performs the actual gesture operation.
|
134
|
-
# Verifies that the parameters are correct and send the command
|
135
|
-
# to the sut.
|
136
|
-
# gesture_type: :MouseGesture, :MouseGestureTo, :MouseGestureToCoordinates
|
137
|
-
# params = {:direction => :Up, duration => 2, :distance =>100, :isDrag =>false, :isMove =>false }
|
138
|
-
def do_gesture(params)
|
139
|
-
validate_gesture_params!(params)
|
140
|
-
|
141
|
-
if attribute('objectType') == 'Embedded'
|
142
|
-
params['x'] = center_x
|
143
|
-
params['y'] = center_y
|
144
|
-
params['useCoordinates'] = 'true'
|
145
|
-
end
|
146
|
-
|
147
|
-
command = command_params #in qt_behaviour
|
148
|
-
command.command_name(params[:gesture_type].to_s)
|
149
|
-
command.command_params( params )
|
150
|
-
@sut.execute_command( command )
|
151
|
-
end
|
152
|
-
|
153
|
-
def validate_gesture_params!(params)
|
154
|
-
#direction
|
155
|
-
if params[:gesture_type] == :MouseGesture
|
156
|
-
if params[:direction].kind_of?(Integer)
|
157
|
-
raise ArgumentError.new( "Invalid direction." ) unless 0 <= params[:direction].to_i and params[:direction].to_i <= 360
|
158
|
-
else
|
159
|
-
raise ArgumentError.new( "Invalid direction." ) unless @@_valid_directions.include?(params[:direction])
|
160
|
-
params[:direction] = @@_direction_map[params[:direction]]
|
161
|
-
end
|
162
|
-
#distance
|
163
|
-
params[:distance] = params[:distance].to_i unless params[:distance].kind_of?(Integer)
|
164
|
-
raise ArgumentError.new( "Distance must be an integer and greater than zero." ) unless params[:distance] > 0
|
165
|
-
elsif params[:gesture_type] == :MouseGestureToCoordinates
|
166
|
-
raise ArgumentError.new("X and Y must be integers.") unless params[:x].kind_of?(Integer) and params[:y].kind_of?(Integer)
|
167
|
-
elsif params[:gesture_type] == :MouseGestureTo
|
168
|
-
raise ArgumentError.new("targetId and targetType must be defined.") unless params[:targetId] and params[:targetType]
|
169
|
-
end
|
170
|
-
|
171
|
-
#duration/speed
|
172
|
-
params[:speed] = params[:speed].to_f unless params[:speed].kind_of?(Numeric)
|
173
|
-
raise ArgumentError.new( "Duration must be a number and greated than zero, was:" + params[:speed].to_s) unless params[:speed] > 0
|
174
|
-
duration_secs = params[:speed].to_f
|
175
|
-
duration_secs = duration_secs*1000
|
176
|
-
params[:speed] = duration_secs.to_i
|
177
|
-
|
178
|
-
#mouseMove true always
|
179
|
-
params[:mouseMove] = true
|
180
|
-
|
181
|
-
params[:button] = :Left unless params[:button]
|
182
|
-
raise ArgumentError.new( "Invalid button." ) unless @@_valid_buttons.include?(params[:button])
|
183
|
-
params[:button] = @@_buttons_map[params[:button]]
|
184
|
-
|
185
|
-
if params[:isMove] == true
|
186
|
-
params[:press] = 'false'
|
187
|
-
params[:release] = 'false'
|
188
|
-
end
|
189
|
-
|
190
|
-
end
|
191
|
-
|
192
|
-
|
193
|
-
def do_sleep(time)
|
194
|
-
|
195
|
-
if MobyUtil::Parameter[ @sut.id ][ :sleep_disabled, nil ] != 'true'
|
196
|
-
time = time.to_f
|
197
|
-
time = time * 1.3
|
198
|
-
#for flicks the duration of the gesture is short but animation (scroll etc..) may not
|
199
|
-
#so wait at least one second
|
200
|
-
time = 1 if time < 1
|
201
|
-
sleep time
|
202
|
-
end
|
203
|
-
|
204
|
-
end
|
205
|
-
|
206
|
-
def calculate_speed(distance, speed)
|
207
|
-
|
208
|
-
distance = distance.to_f
|
209
|
-
speed = speed.to_f
|
210
|
-
duration = distance/speed
|
211
|
-
duration
|
212
|
-
|
213
|
-
end
|
214
|
-
|
215
|
-
def distance_to_point(x, y)
|
216
|
-
|
217
|
-
x = x.to_i
|
218
|
-
y = y.to_i
|
219
|
-
dist_x = x - center_x.to_i
|
220
|
-
dist_y = y - center_y.to_i
|
221
|
-
|
222
|
-
return 0 if dist_y == 0 and dist_x == 0
|
223
|
-
distance = Math.hypot( dist_x, dist_y )
|
224
|
-
distance
|
225
|
-
|
226
|
-
end
|
227
|
-
|
228
|
-
end
|
229
|
-
|
230
|
-
end
|
231
|
-
end
|
232
|
-
|
233
|
-
#MobyUtil::Logger.instance.hook_methods( MobyBehaviour::QT::Gesture )
|
@@ -1,194 +0,0 @@
|
|
1
|
-
############################################################################
|
2
|
-
##
|
3
|
-
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
-
## All rights reserved.
|
5
|
-
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
-
##
|
7
|
-
## This file is part of Testability Driver.
|
8
|
-
##
|
9
|
-
## If you have questions regarding the use of this file, please contact
|
10
|
-
## Nokia at testabilitydriver@nokia.com .
|
11
|
-
##
|
12
|
-
## This library is free software; you can redistribute it and/or
|
13
|
-
## modify it under the terms of the GNU Lesser General Public
|
14
|
-
## License version 2.1 as published by the Free Software Foundation
|
15
|
-
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
-
## of this file.
|
17
|
-
##
|
18
|
-
############################################################################
|
19
|
-
|
20
|
-
# generated behaviour implementation
|
21
|
-
module MobyBehaviour
|
22
|
-
|
23
|
-
# == description
|
24
|
-
# This module contains example implementation containing tags for documentation generation
|
25
|
-
#
|
26
|
-
# == behaviour
|
27
|
-
# QtExampleBehaviour
|
28
|
-
#
|
29
|
-
# == requires
|
30
|
-
# testability-driver-sut-qt-plugin
|
31
|
-
#
|
32
|
-
# == input_type
|
33
|
-
# *
|
34
|
-
#
|
35
|
-
# == sut_type
|
36
|
-
# qt
|
37
|
-
#
|
38
|
-
# == sut_version
|
39
|
-
# *
|
40
|
-
#
|
41
|
-
# == objects
|
42
|
-
# *;sut
|
43
|
-
#
|
44
|
-
module Example
|
45
|
-
|
46
|
-
include MobyBehaviour::Behaviour
|
47
|
-
|
48
|
-
private # construction
|
49
|
-
|
50
|
-
# this method will be called once module is extended to test object
|
51
|
-
def self.extended( object )
|
52
|
-
|
53
|
-
object.instance_exec{
|
54
|
-
|
55
|
-
# default settings (optional)
|
56
|
-
initialize_behaviour_settings
|
57
|
-
|
58
|
-
}
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
# this method will be called once behaviour is extended to test object
|
63
|
-
def initialize_behaviour_settings
|
64
|
-
|
65
|
-
end
|
66
|
-
|
67
|
-
public # behaviours
|
68
|
-
|
69
|
-
# TODO: jotain
|
70
|
-
# this line won't be documented
|
71
|
-
#
|
72
|
-
# == description
|
73
|
-
# Cause a drag operation on the screen. Basically the same as flick or gesture but done slowly.
|
74
|
-
#
|
75
|
-
# == arguments
|
76
|
-
# direction
|
77
|
-
# description: Angle of direction of the drag. Supported range is from 0 to 360
|
78
|
-
# example: 180
|
79
|
-
# default:
|
80
|
-
#
|
81
|
-
# direction
|
82
|
-
# type: Symbol
|
83
|
-
# description: Symbol of direction of the drag. See Valid drag direction symbols table for valid values.
|
84
|
-
# example: :Right
|
85
|
-
# default: :Left
|
86
|
-
#
|
87
|
-
# distance
|
88
|
-
# type: Integer
|
89
|
-
# description: Distance in pixels of the drag motion
|
90
|
-
# example: 10
|
91
|
-
# default:
|
92
|
-
#
|
93
|
-
# button
|
94
|
-
# type: Symbol
|
95
|
-
# description: Symbol of button used for drag. See Valid drag button symbols table for valid values.
|
96
|
-
# example: :Left
|
97
|
-
# default: :Left
|
98
|
-
#
|
99
|
-
# == returns
|
100
|
-
# MobyBase::TestObject
|
101
|
-
# description: Target test object
|
102
|
-
# example:
|
103
|
-
#
|
104
|
-
# MobyBase::TestObject2
|
105
|
-
# description: Target test object2
|
106
|
-
# example: example2
|
107
|
-
#
|
108
|
-
# == exceptions
|
109
|
-
# MobyBase::TestObjectNotFoundError
|
110
|
-
# description: If a graphics item is not visible on screen
|
111
|
-
# lisäää descriptionia
|
112
|
-
#
|
113
|
-
# ArgumentError
|
114
|
-
# description: If an invalid direction or button is given
|
115
|
-
#
|
116
|
-
# == example
|
117
|
-
# # Drag QGraphicsItem with tooltip 'node1' down 50 pixels
|
118
|
-
# @sut.application.GraphWidget.QGraphicsItem(:tooltip => 'node1').drag(:Down, 50)
|
119
|
-
#
|
120
|
-
# # Drag 'test_object' up 200 pixels
|
121
|
-
# @test_object = @sut.application.GraphWidget.QGraphicsItem(:tooltip => 'node1')
|
122
|
-
# @test_object.drag(:Up, 200)
|
123
|
-
#
|
124
|
-
# == see
|
125
|
-
# flick, gesture
|
126
|
-
def drag( direction, distance, button = :Left )
|
127
|
-
|
128
|
-
# implementation
|
129
|
-
|
130
|
-
end
|
131
|
-
=begin
|
132
|
-
# documentation for the method
|
133
|
-
def []=( value )
|
134
|
-
|
135
|
-
# implementation
|
136
|
-
|
137
|
-
end
|
138
|
-
|
139
|
-
# documentation for the method
|
140
|
-
def []( value )
|
141
|
-
|
142
|
-
# implementation
|
143
|
-
|
144
|
-
end
|
145
|
-
|
146
|
-
# documentation for the method
|
147
|
-
def d
|
148
|
-
|
149
|
-
# implementation
|
150
|
-
|
151
|
-
end
|
152
|
-
|
153
|
-
# documentation for the method
|
154
|
-
def <=>( other )
|
155
|
-
|
156
|
-
# implementation
|
157
|
-
|
158
|
-
end
|
159
|
-
|
160
|
-
# documentation for the method
|
161
|
-
def e()
|
162
|
-
|
163
|
-
# implementation
|
164
|
-
|
165
|
-
end
|
166
|
-
|
167
|
-
# documentation for the method
|
168
|
-
def f!()
|
169
|
-
|
170
|
-
# implementation
|
171
|
-
|
172
|
-
end
|
173
|
-
|
174
|
-
# documentation for the method
|
175
|
-
def g?()
|
176
|
-
|
177
|
-
# implementation
|
178
|
-
|
179
|
-
end
|
180
|
-
|
181
|
-
# documentation for the method
|
182
|
-
def x# dada
|
183
|
-
|
184
|
-
# implementation
|
185
|
-
|
186
|
-
end
|
187
|
-
=end
|
188
|
-
attr_accessor :xxz
|
189
|
-
|
190
|
-
attr_reader :yys
|
191
|
-
|
192
|
-
end # Example
|
193
|
-
|
194
|
-
end # MobyBehaviour
|