File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
test/java/org/tailormap/api/controller Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,12 @@ components:
165165 nullable : true
166166 hiddenFunctionality :
167167 $ref : ' ./common-schemas.yaml#/components/schemas/HiddenLayerFunctionality'
168+ styles :
169+ description : ' Configured styles for this layer (if supported by the service)'
170+ type : array
171+ items :
172+ $ref : ' ./common-schemas.yaml#/components/schemas/WMSStyle'
173+
168174
169175 LayerTreeNode :
170176 description : Grouping of layers in a tree structure.
Original file line number Diff line number Diff line change 1212import static org .junit .jupiter .api .Assertions .assertEquals ;
1313import static org .junit .jupiter .api .Assertions .assertTrue ;
1414import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .get ;
15+ import static org .springframework .test .web .servlet .result .MockMvcResultHandlers .print ;
1516import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .content ;
1617import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .jsonPath ;
1718import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
@@ -195,16 +196,21 @@ void should_not_contain_proxied_secured_service_layer_on_public_app_when_unautho
195196 }
196197
197198 @ Test
198- void should_contain_description () throws Exception {
199+ void should_contain_description_and_styles () throws Exception {
199200 final String path = apiBasePath + "/app/default/map" ;
200201 mockMvc .perform (get (path ).accept (MediaType .APPLICATION_JSON ).with (setServletPath (path )))
201202 .andExpect (status ().isOk ())
203+ .andDo (print ())
202204 .andExpect (content ().contentType (MediaType .APPLICATION_JSON ))
203205 .andExpect (
204206 // Application layer description
205207 jsonPath (
206208 "$.appLayers[?(@.id === 'lyr:snapshot-geoserver:postgis:begroeidterreindeel')].description" )
207- .value (contains (startsWith ("This layer shows data from https://www.postgis.net" ))));
209+ .value (contains (startsWith ("This layer shows data from https://www.postgis.net" ))))
210+ .andExpect (
211+ // Application layer configured styles
212+ jsonPath ("$.appLayers[?(@.id === 'lyr:snapshot-geoserver:postgis:begroeidterreindeel')].styles" )
213+ .isArray ());
208214 }
209215
210216 @ Test
You can’t perform that action at this time.
0 commit comments