Skip to content

Commit f757eba

Browse files
committed
Update tests
1 parent 2f79cc8 commit f757eba

File tree

3 files changed

+173
-172
lines changed

3 files changed

+173
-172
lines changed
Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,105 @@
11
*** Settings ***
2-
Library AltTesterLibrary
3-
Library BuiltIn
4-
Library Collections
5-
Suite Setup Initialize AltDriver With Custom Host And Port
6-
Test Setup SetUp Tests
2+
Library AltTesterLibrary
3+
Library BuiltIn
4+
Library Collections
5+
Suite Setup Initialize AltDriver With Custom Host And Port
6+
Test Setup SetUp Tests
77
Suite Teardown Stop Altdriver
8-
Resource utils_keywords.robot
8+
Resource utils_keywords.robot
99

1010
*** Test Cases ***
1111
Test Pointer Enter And Exit
12-
${alt_object}= Find Object NAME Drop Image
13-
${color1}= Get Component Property ${alt_object} AltExampleScriptDropMe highlightColor Assembly-CSharp
14-
Pointer Enter ${alt_object}
15-
${color2}= Get Component Property ${alt_object} AltExampleScriptDropMe highlightColor Assembly-CSharp
16-
${color1_r}= Get Percent From Specific Color ${color1} r
17-
${color1_g}= Get Percent From Specific Color ${color1} g
18-
${color1_b}= Get Percent From Specific Color ${color1} b
19-
${color1_a}= Get Percent From Specific Color ${color1} a
20-
${color2_r}= Get Percent From Specific Color ${color2} r
21-
${color2_g}= Get Percent From Specific Color ${color2} g
22-
${color2_b}= Get Percent From Specific Color ${color2} b
23-
${color2_a}= Get Percent From Specific Color ${color2} a
24-
Evaluate ${color1_r}!=${color2_r} or ${color1_g}!=${color2_g} or ${color1_b}!=${color2_b} or ${color1_a}!=${color2_a}
25-
Pointer Exit ${alt_object}
26-
${color3}= Get Component Property ${alt_object} AltExampleScriptDropMe highlightColor Assembly-CSharp
27-
${color3_r}= Get Percent From Specific Color ${color3} r
28-
${color3_g}= Get Percent From Specific Color ${color3} g
29-
${color3_b}= Get Percent From Specific Color ${color3} b
30-
${color3_a}= Get Percent From Specific Color ${color3} a
31-
Evaluate ${color3_r}!=${color2_r} or ${color3_g}!=${color2_g} or ${color3_b}!=${color2_b} or ${color3_a}!=${color2_a}
32-
Evaluate ${color1_r}!=${color3_r} or ${color1_g}!=${color3_g} or ${color1_b}!=${color3_b} or ${color1_a}!=${color3_a}
12+
${alt_object}= Find Object NAME Drop Image
13+
${color1}= Get Component Property ${alt_object} AltExampleScriptDropMe highlightColor Assembly-CSharp
14+
Pointer Enter ${alt_object}
15+
${color2}= Get Component Property ${alt_object} AltExampleScriptDropMe highlightColor Assembly-CSharp
16+
${color1_r}= Get Percent From Specific Color ${color1} r
17+
${color1_g}= Get Percent From Specific Color ${color1} g
18+
${color1_b}= Get Percent From Specific Color ${color1} b
19+
${color1_a}= Get Percent From Specific Color ${color1} a
20+
${color2_r}= Get Percent From Specific Color ${color2} r
21+
${color2_g}= Get Percent From Specific Color ${color2} g
22+
${color2_b}= Get Percent From Specific Color ${color2} b
23+
${color2_a}= Get Percent From Specific Color ${color2} a
24+
Evaluate ${color1_r}!=${color2_r} or ${color1_g}!=${color2_g} or ${color1_b}!=${color2_b} or ${color1_a}!=${color2_a}
25+
Pointer Exit ${alt_object}
26+
${color3}= Get Component Property ${alt_object} AltExampleScriptDropMe highlightColor Assembly-CSharp
27+
${color3_r}= Get Percent From Specific Color ${color3} r
28+
${color3_g}= Get Percent From Specific Color ${color3} g
29+
${color3_b}= Get Percent From Specific Color ${color3} b
30+
${color3_a}= Get Percent From Specific Color ${color3} a
31+
Evaluate ${color3_r}!=${color2_r} or ${color3_g}!=${color2_g} or ${color3_b}!=${color2_b} or ${color3_a}!=${color2_a}
32+
Evaluate ${color1_r}!=${color3_r} or ${color1_g}!=${color3_g} or ${color1_b}!=${color3_b} or ${color1_a}!=${color3_a}
3333

3434
Test Multiple Swipes
35-
Drop Image Drag Image2 Drop Box2 1 ${False}
36-
Drop Image Drag Image2 Drop Box1 1 ${False}
37-
Drop Image Drag Image1 Drop Box1 2 ${False}
38-
Wait For Swipe To Finish
39-
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image1 Drop Image
40-
Should Be Equal ${image_source} ${image_source_drop_zone}
41-
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image2 Drop
42-
Should Be Equal ${image_source} ${image_source_drop_zone}
35+
Drop Image Drag Image2 Drop Box2 1 ${False}
36+
Drop Image Drag Image2 Drop Box1 1 ${False}
37+
Drop Image Drag Image1 Drop Box1 2 ${False}
38+
Wait For Swipe To Finish
39+
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image1 Drop Image
40+
Should Be Equal ${image_source} ${image_source_drop_zone}
41+
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image2 Drop
42+
Should Be Equal ${image_source} ${image_source_drop_zone}
4343

4444
Test Multiple Swipe And Waits
45-
Drop Image Drag Image2 Drop Box2 1 ${True}
46-
Drop Image Drag Image2 Drop Box1 1 ${True}
47-
Drop Image Drag Image1 Drop Box1 1 ${True}
48-
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image1 Drop Image
49-
Should Be Equal ${image_source} ${image_source_drop_zone}
50-
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image2 Drop
51-
Should Be Equal ${image_source} ${image_source_drop_zone}
45+
Drop Image Drag Image2 Drop Box2 1 ${True}
46+
Drop Image Drag Image2 Drop Box1 1 ${True}
47+
Drop Image Drag Image1 Drop Box1 1 ${True}
48+
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image1 Drop Image
49+
Should Be Equal ${image_source} ${image_source_drop_zone}
50+
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image2 Drop
51+
Should Be Equal ${image_source} ${image_source_drop_zone}
5252

5353
Test Multiple Swipe With Multipoint Swipe
54-
${list1}= Create List Drag Image1 Drop Box1
55-
${list2}= Create List Drag Image2 Drop Box1 Drop Box2
56-
Drop Image With Multipoint Swipe ${list1} 1 ${False}
57-
Drop Image With Multipoint Swipe ${list2} 1 ${False}
58-
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image1 Drop Image
59-
Should Be Equal ${image_source} ${image_source_drop_zone}
60-
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image2 Drop
61-
Should Be Equal ${image_source} ${image_source_drop_zone}
54+
${list1}= Create List Drag Image1 Drop Box1
55+
${list2}= Create List Drag Image2 Drop Box1 Drop Box2
56+
Drop Image With Multipoint Swipe ${list1} 1 ${False}
57+
Drop Image With Multipoint Swipe ${list2} 1 ${True}
58+
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image1 Drop Image
59+
Should Be Equal ${image_source} ${image_source_drop_zone}
60+
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image2 Drop
61+
Should Be Equal ${image_source} ${image_source_drop_zone}
6262

6363
Test Multiple Swipe And Waits With Multipoint Swipe
64-
${list1}= Create List Drag Image1 Drop Box1
65-
${list2}= Create List Drag Image2 Drop Box1 Drop Box2
66-
Drop Image With Multipoint Swipe ${list1} 1 ${True}
67-
Drop Image With Multipoint Swipe ${list2} 1 ${True}
68-
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image1 Drop Image
69-
Should Be Equal ${image_source} ${image_source_drop_zone}
70-
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image2 Drop
71-
Should Be Equal ${image_source} ${image_source_drop_zone}
64+
${list1}= Create List Drag Image1 Drop Box1
65+
${list2}= Create List Drag Image2 Drop Box1 Drop Box2
66+
Drop Image With Multipoint Swipe ${list1} 1 ${True}
67+
Drop Image With Multipoint Swipe ${list2} 1 ${True}
68+
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image1 Drop Image
69+
Should Be Equal ${image_source} ${image_source_drop_zone}
70+
${image_source} ${image_source_drop_zone}= Get Sprite Name Drag Image2 Drop
71+
Should Be Equal ${image_source} ${image_source_drop_zone}
7272

7373
Test Begin Move End Touch
74-
${alt_object1}= Find Object NAME Drag Image1
75-
${alt_object2}= Find Object NAME Drop Box1
76-
${coordinates_begin}= Get Screen Position ${alt_object1}
77-
${coordinates_finish}= Get Screen Position ${alt_object2}
78-
${id}= Begin Touch ${coordinates_begin}
79-
Move Touch ${id} ${coordinates_finish}
80-
End Touch ${id}
81-
${image_source}= Get Component Property ${alt_object1} UnityEngine.UI.Image sprite.name UnityEngine.UI
82-
${alt_object}= Find Object NAME Drop Image
83-
${image_source_drop_zone}= Get Component Property ${alt_object} UnityEngine.UI.Image sprite.name UnityEngine.UI
84-
Should Be Equal ${image_source} ${image_source_drop_zone}
74+
${alt_object1}= Find Object NAME Drag Image1
75+
${alt_object2}= Find Object NAME Drop Box1
76+
${coordinates_begin}= Get Screen Position ${alt_object1}
77+
${coordinates_finish}= Get Screen Position ${alt_object2}
78+
${id}= Begin Touch ${coordinates_begin}
79+
Move Touch ${id} ${coordinates_finish}
80+
End Touch ${id}
81+
${image_source}= Get Component Property ${alt_object1} UnityEngine.UI.Image sprite.name UnityEngine.UI
82+
${alt_object}= Find Object NAME Drop Image
83+
${image_source_drop_zone}= Get Component Property ${alt_object} UnityEngine.UI.Image sprite.name UnityEngine.UI
84+
Should Be Equal ${image_source} ${image_source_drop_zone}
8585

8686
*** Keywords ***
8787
SetUp Tests
88-
Reset Input
89-
Load Scene ${scene3}
88+
Reset Input
89+
Load Scene ${scene3}
9090

9191
Wait For Swipe To Finish
92-
Wait For Object To Not Be Present NAME icon
92+
Wait For Object To Not Be Present NAME icon
9393

9494
Drop Image
95-
[Arguments] ${drag_location_name} ${drop_location_name} ${duration} ${wait}
96-
${drag_location}= Find Object NAME ${drag_location_name}
97-
${drop_location}= Find Object NAME ${drop_location_name}
98-
${drag_location_position}= Get Screen Position ${drag_location}
99-
${drop_location_position}= Get Screen Position ${drop_location}
100-
Swipe ${drag_location_position} ${drop_location_position} duration=${duration} wait=${wait}
95+
[Arguments] ${drag_location_name} ${drop_location_name} ${duration} ${wait}
96+
${drag_location}= Find Object NAME ${drag_location_name}
97+
${drop_location}= Find Object NAME ${drop_location_name}
98+
${drag_location_position}= Get Screen Position ${drag_location}
99+
${drop_location_position}= Get Screen Position ${drop_location}
100+
Swipe ${drag_location_position} ${drop_location_position} duration=${duration} wait=${wait}
101101

102102
Get Percent From Specific Color
103-
[Arguments] ${alt_object} ${color}
104-
${percent}= Collections.Get From Dictionary ${alt_object} ${color}
105-
Return From Keyword ${percent}
103+
[Arguments] ${alt_object} ${color}
104+
${percent}= Collections.Get From Dictionary ${alt_object} ${color}
105+
Return From Keyword ${percent}

0 commit comments

Comments
 (0)