File tree 6 files changed +83
-9
lines changed
test/functional/au/org/ala/ecodata/forms
6 files changed +83
-9
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ clover {
35
35
}
36
36
}
37
37
}
38
- ant. ' clover-check' (target : " 52%" , haltOnFailure : true ) { }
38
+ ant. ' clover-check' (target : " 52.5 %" , haltOnFailure : true ) { }
39
39
40
40
}
41
41
}
Original file line number Diff line number Diff line change 1
1
{
2
- "images " : {
2
+ "images1 " : {
3
3
"documentId" : " d1"
4
+ },
5
+ "images2" : {
6
+ "documentId" : " d2"
4
7
}
5
8
}
Original file line number Diff line number Diff line change 3
3
{
4
4
"dataType" : " image" ,
5
5
"description" : " " ,
6
- "name" : " images"
6
+ "name" : " images1"
7
+ },{
8
+ "dataType" : " image" ,
9
+ "description" : " " ,
10
+ "name" : " images2"
7
11
}
8
12
],
9
13
"modelName" : " Images Example" ,
10
14
"viewModel" : [
11
15
{
12
- "title" : " Images:" ,
13
- "source" : " images" ,
14
- "type" : " image"
15
- }]
16
+ "type" : " row" ,
17
+ "items" : [
18
+ {
19
+ "type" : " col" ,
20
+ "items" : [
21
+ {
22
+ "preLabel" : " Always visible metadata:" ,
23
+ "source" : " images1" ,
24
+ "type" : " image" ,
25
+ "displayOptions" : {
26
+ "metadataAlwaysVisible" : true
27
+ }
28
+ },
29
+ {
30
+ "preLabel" : " Default metadata behaviour:" ,
31
+ "source" : " images2" ,
32
+ "type" : " image"
33
+ }
34
+ ]
35
+ }
36
+ ]
37
+ }
38
+
39
+ ]
16
40
}
Original file line number Diff line number Diff line change 80
80
var output = {};
81
81
< g: if test= " ${ data } " >
82
82
var outputData = JSON .parse (' ${ data. encodeAsJavaScript() } ' );
83
- outputt .data = outputData;
83
+ output .data = outputData;
84
84
< / g: if >
85
85
86
86
var context = {
92
92
{
93
93
documentId: ' d1' ,
94
94
url: fcConfig .imagePreviewUrl + ' /Landscape_1.jpg' ,
95
- thumbnailUrl: fcConfig .imagePreviewUrl + ' /Landscape_1.jpg'
95
+ thumbnailUrl: fcConfig .imagePreviewUrl + ' /Landscape_1.jpg' ,
96
+ " name" : " Test image 1" ,
97
+ " attribution" : " Test attribution 1" ,
98
+ " notes" : " test notes 1" ,
99
+ filename: " Landscape_1.jpg" ,
100
+ filesize: 1000
101
+
102
+ },
103
+ {
104
+ documentId: ' d2' ,
105
+ url: fcConfig .imagePreviewUrl + ' /Landscape_2.jpg' ,
106
+ thumbnailUrl: fcConfig .imagePreviewUrl + ' /Landscape_2.jpg' ,
107
+ " name" : " Test image 2" ,
108
+ " attribution" : " Test attribution 2" ,
109
+ " notes" : " Test notes 2" ,
110
+ filename: " Landscape_2.jpg" ,
111
+ filesize: 1000
112
+
96
113
}
97
114
]
98
115
};
Original file line number Diff line number Diff line change
1
+ package au.org.ala.ecodata.forms
2
+
3
+ import geb.spock.GebReportingSpec
4
+ import pages.PreviewPage
5
+
6
+ class ImageTypeSpec extends GebReportingSpec {
7
+
8
+ def " The default behaviour of the view mode of the image view type is to show metadata on hover" () {
9
+ when :
10
+ to ([name :' images' , mode :' view' ], PreviewPage )
11
+
12
+ then :
13
+ title == " Preview Images Example"
14
+
15
+ when : " We hover over the photo"
16
+ interact {
17
+ moveToElement($(' [data-bind*=images2]' ))
18
+ }
19
+
20
+ then : " A popover is displayed containing the photo metadata"
21
+ waitFor {
22
+ $(' .popover' ). displayed
23
+ }
24
+ and : " the photo metadata is displayed correctly"
25
+ $(" .popover span[data-bind*=name]" ). text() == " Test image 2"
26
+ $(" .popover span[data-bind*=attribution]" ). text() == " Test attribution 2"
27
+ $(" .popover span[data-bind*=notes]" ). text() == " Test notes 2"
28
+
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments