@@ -21,61 +21,74 @@ import "../../../Components"
2121
2222Item {
2323 id: root
24− width: 700
25− height: 500
24+ width: boxWidth * 3
25+ height: boxHeight * 2
2626
27− DemoOverlay {
27+ property int boxWidth: 250
28+ property int boxHeight: 250
29+
30+ EdgeDemoOverlay {
2831 id: top
2932 edge: "top"
3033 title: "Top"
3134 text: "Displayed on top left"
32− x: 0
33− y: 0
34− width: parent.width/2
35− height: parent.height/2
35+ anchors.left: parent.left
36+ anchors.top: parent.top
37+ width: boxWidth
38+ height: boxHeight
3639 }
3740
38− DemoOverlay {
41+ EdgeDemoOverlay {
3942 id: right
4043 edge: "right"
4144 title: "Right"
4245 text: "Displayed on top right"
43− x: parent.width/2
44− y: 0
45− width: parent.width/2
46− height: parent.height/2
46+ anchors.right: parent.right
47+ anchors.top: parent.top
48+ width: boxWidth
49+ height: boxHeight
4750 }
4851
49− DemoOverlay {
52+ EdgeDemoOverlay {
5053 id: left
5154 edge: "left"
5255 title: "Left"
5356 text: "Displayed on bottom right"
54− x: parent.width/2
55− y: parent.height/2
56− width: parent.width/2
57− height: parent.height/2
57+ anchors.right: parent.right
58+ anchors.bottom: parent.bottom
59+ width: boxWidth
60+ height: boxHeight
5861 available: false
5962 }
6063
61− DemoOverlay {
64+ EdgeDemoOverlay {
6265 id: bottom
6366 edge: "bottom"
6467 title: "Bottom"
6568 text: "Displayed on bottom left"
66− x: 0
67− y: parent.height/2
68− width: parent.width/2
69− height: parent.height/2
69+ anchors.left: parent.left
70+ anchors.bottom: parent.bottom
71+ width: boxWidth
72+ height: boxHeight
73+ }
74+
75+ EdgeDemoOverlay {
76+ id: none
77+ edge: "none"
78+ title: "None"
79+ text: "Displayed on top middle"
80+ anchors.horizontalCenter: parent.horizontalCenter
81+ anchors.top: parent.top
82+ width: boxWidth
83+ height: boxHeight
7084 }
7185
7286 SignalSpy {
7387 id: signalSpy
74− target: bottom
7588 }
7689
7790 UT.UnityTestCase {
78− name: "DemoOverlay"
91+ name: "EdgeDemoOverlay"
7992 when: windowShown
8093
8194 function test_animations() {
@@ -89,6 +102,7 @@ Item {
89102 }
90103
91104 function test_skip() {
105+ signalSpy.target = bottom
92106 signalSpy.signalName = "skip"
93107 signalSpy.clear()
94108 var bottomSkip = findChild(bottom, "skipLabel")
@@ -96,6 +110,16 @@ Item {
96110 mouseRelease(bottomSkip, 1, 1)
97111 signalSpy.wait()
98112 compare(bottom.available, false)
113+
114+ // Test that the 'none' edge skips anywhere
115+ signalSpy.target = none
116+ signalSpy.clear()
117+ var backgroundShade = findChild(none, "backgroundShade")
118+ tryCompare(none, "opacity", 1)
119+ mousePress(backgroundShade, 1, 1)
120+ mouseRelease(backgroundShade, 1, 1)
121+ signalSpy.wait()
122+ compare(none.available, false)
99123 }
100124 }
101125}