Skip to content
Permalink
Browse files
Test if opacity is applied for external layers
  • Loading branch information
mhugent authored and nyalldawson committed Apr 17, 2021
1 parent ac5b7ea commit 8b0e292df4d171a49cb2fa7b58cf9ccaa46db626
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/src/server/wms/test_qgsserver_wms_parameters.cpp
@@ -50,6 +50,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( "OPACITIES", "255,200,125" );

QgsWms::QgsWmsParameters parameters( query );

@@ -66,6 +67,11 @@ 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" ) );

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

QGSTEST_MAIN( TestQgsServerWmsParameters )

0 comments on commit 8b0e292

Please sign in to comment.