Skip to content
Permalink
Browse files

Also test the opacity parameter within the external layer

  • Loading branch information
mhugent committed Mar 12, 2021
1 parent 96899a7 commit 6a9455c93ab4b6ec8b325b9c3a60c6d87974018c
Showing with 2 additions and 1 deletion.
  1. +2 −1 tests/src/server/wms/test_qgsserver_wms_parameters.cpp
@@ -53,6 +53,7 @@ void TestQgsServerWmsParameters::external_layers()
query.addQueryItem( "external_layer_1:layers", "layer_1_name" );
query.addQueryItem( "external_layer_2:url", "http://url_2" );
query.addQueryItem( "external_layer_2:layers", "layer_2_name" );
query.addQueryItem( "external_layer_2:opacities", "100" );
query.addQueryItem( "OPACITIES", "255,200,125" );

QgsWms::QgsWmsParameters parameters( query );
@@ -69,7 +70,7 @@ void TestQgsServerWmsParameters::external_layers()

layer_params = layers_params[2];
QCOMPARE( layer_params.mNickname, QString( "external_layer_2" ) );
QCOMPARE( layer_params.mExternalUri, QString( "layers=layer_2_name&url=http://url_2" ) );
QCOMPARE( layer_params.mExternalUri, QString( "layers=layer_2_name&opacities=100&url=http://url_2" ) );

//test if opacities are also applied to external layers
QCOMPARE( layers_params[0].mOpacity, 255 );

0 comments on commit 6a9455c

Please sign in to comment.