Skip to content

Commit

Permalink
e2e: test <a href="media/"><img src="media/"></a> in popup
Browse files Browse the repository at this point in the history
  • Loading branch information
nboisteault committed Jan 21, 2025
1 parent b0bcc48 commit 29ce894
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
41 changes: 21 additions & 20 deletions tests/qgis-projects/tests/popup.qgs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<qgis projectname="" saveDateTime="2024-07-15T10:32:53" saveUser="nboisteault" saveUserFull="nboisteault" version="3.34.8-Prizren">
<qgis projectname="" saveDateTime="2025-01-21T17:13:04" saveUser="nboisteault" saveUserFull="nboisteault" version="3.34.15-Prizren">
<homePath path=""></homePath>
<title></title>
<transaction mode="Disabled"></transaction>
Expand Down Expand Up @@ -43,8 +43,8 @@
</layer-tree-group>
<snapping-settings enabled="0" intersection-snapping="0" maxScale="0" minScale="0" mode="2" scaleDependencyMode="0" self-snapping="0" tolerance="12" type="1" unit="1">
<individual-layer-settings>
<layer-setting enabled="0" id="dnd_popup_3b9d335a_5491_45fa_8a8b_8dca1ca7ff3b" maxScale="0" minScale="0" tolerance="12" type="1" units="1"></layer-setting>
<layer-setting enabled="0" id="townhalls_pg_6c85c4bf_fe76_46b1_8445_0041d55d6e76" maxScale="0" minScale="0" tolerance="12" type="1" units="1"></layer-setting>
<layer-setting enabled="0" id="dnd_popup_3b9d335a_5491_45fa_8a8b_8dca1ca7ff3b" maxScale="0" minScale="0" tolerance="12" type="1" units="1"></layer-setting>
</individual-layer-settings>
</snapping-settings>
<relations>
Expand Down Expand Up @@ -261,7 +261,7 @@
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleLine" enabled="1" id="{28b055ef-13b3-43db-825d-02e9cf712554}" locked="0" pass="0">
<layer class="SimpleLine" enabled="1" id="{7932058e-9dd0-4a37-8501-b5dc5f69d4c7}" locked="0" pass="0">
<Option type="Map">
<Option name="align_dash_pattern" type="QString" value="0"></Option>
<Option name="capstyle" type="QString" value="square"></Option>
Expand Down Expand Up @@ -310,7 +310,7 @@
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleFill" enabled="1" id="{72c1a732-706c-41ee-b0ed-2dcc5c067e2c}" locked="0" pass="0">
<layer class="SimpleFill" enabled="1" id="{cc57abbb-f4f7-40d7-a7a2-dcfc0e619782}" locked="0" pass="0">
<Option type="Map">
<Option name="border_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"></Option>
<Option name="color" type="QString" value="225,89,137,255"></Option>
Expand Down Expand Up @@ -343,7 +343,7 @@
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleMarker" enabled="1" id="{3da81b7a-5ab8-40ec-91a2-8baac6de3f2e}" locked="0" pass="0">
<layer class="SimpleMarker" enabled="1" id="{f58b1cea-28a3-44d6-9249-d8812aab09f7}" locked="0" pass="0">
<Option type="Map">
<Option name="angle" type="QString" value="0"></Option>
<Option name="cap_style" type="QString" value="square"></Option>
Expand Down Expand Up @@ -618,7 +618,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleLine" enabled="1" id="{21c381b4-3695-42fc-9534-9161cee5fb98}" locked="0" pass="0">
<layer class="SimpleLine" enabled="1" id="{81a8a74d-9a9c-4763-92ee-4d72ad4d4e0a}" locked="0" pass="0">
<Option type="Map">
<Option name="align_dash_pattern" type="QString" value="0"></Option>
<Option name="capstyle" type="QString" value="square"></Option>
Expand Down Expand Up @@ -667,7 +667,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleFill" enabled="1" id="{c297256e-f107-4183-9e58-2e1c1fd38738}" locked="0" pass="0">
<layer class="SimpleFill" enabled="1" id="{ac391615-d25c-45c7-a330-aea3b268cd21}" locked="0" pass="0">
<Option type="Map">
<Option name="border_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"></Option>
<Option name="color" type="QString" value="190,207,80,255"></Option>
Expand Down Expand Up @@ -700,7 +700,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleMarker" enabled="1" id="{ef142b38-a219-4791-b300-3f12d5c206b5}" locked="0" pass="0">
<layer class="SimpleMarker" enabled="1" id="{88e6d026-1610-44db-8140-efbae501b3c7}" locked="0" pass="0">
<Option type="Map">
<Option name="angle" type="QString" value="0"></Option>
<Option name="cap_style" type="QString" value="square"></Option>
Expand Down Expand Up @@ -743,7 +743,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleFill" enabled="1" id="{e6c24178-a61f-41bd-b63b-0968bc2f97c8}" locked="0" pass="0">
<layer class="SimpleFill" enabled="1" id="{a3ba56da-a568-490c-95f9-86aba0e1eb97}" locked="0" pass="0">
<Option type="Map">
<Option name="border_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"></Option>
<Option name="color" type="QString" value="255,158,23,255"></Option>
Expand Down Expand Up @@ -781,7 +781,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleFill" enabled="1" id="{535fd1c7-ecc7-41b0-8119-35ca6ef1efae}" locked="0" pass="0">
<layer class="SimpleFill" enabled="1" id="{cb934711-65e6-441b-9766-4f16d90e84aa}" locked="0" pass="0">
<Option type="Map">
<Option name="border_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"></Option>
<Option name="color" type="QString" value="0,0,255,255"></Option>
Expand Down Expand Up @@ -832,7 +832,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleLine" enabled="1" id="{2bbc39f1-43df-4651-bb0a-a90a0757a447}" locked="0" pass="0">
<layer class="SimpleLine" enabled="1" id="{0545ccc9-d9ea-4d6f-b6b8-3060055e585c}" locked="0" pass="0">
<Option type="Map">
<Option name="align_dash_pattern" type="QString" value="0"></Option>
<Option name="capstyle" type="QString" value="square"></Option>
Expand Down Expand Up @@ -1041,9 +1041,9 @@ def my_form_open(dialog, layer, feature):
&lt;div class="before-tabs"&gt;
&lt;/div&gt;&lt;ul class="nav nav-tabs"&gt;

&lt;li class="nav-item"&gt;&lt;button class="nav-link active" data-bs-target="#popup_dd_[% $id %]_tab1" data-bs-toggle="tab"&gt;tab1&lt;/button&gt;&lt;/li&gt;
&lt;li class="active"&gt;&lt;a href="#popup_dd_[% $id %]_tab1" data-toggle="tab"&gt;tab1&lt;/a&gt;&lt;/li&gt;

&lt;li class="nav-item"&gt;&lt;button class="nav-link" data-bs-target="#popup_dd_[% $id %]_tab2" data-bs-toggle="tab"&gt;tab2&lt;/button&gt;&lt;/li&gt;
&lt;li class=""&gt;&lt;a href="#popup_dd_[% $id %]_tab2" data-toggle="tab"&gt;tab2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="tab-content"&gt;
&lt;div id="popup_dd_[% $id %]_tab1" class="tab-pane active"&gt;
Expand All @@ -1057,6 +1057,7 @@ def my_form_open(dialog, layer, feature):
)
ELSE ''
END %]
&lt;a href="media/images/montpellier.qgs.webp" target="_blank"&gt;&lt;img src="media/images/montpellier.qgs.webp"&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;div id="popup_dd_[% $id %]_tab2" class="tab-pane "&gt;
Expand Down Expand Up @@ -1228,7 +1229,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleLine" enabled="1" id="{9e7bccb5-16b8-40d0-9f13-14e73ff0fe92}" locked="0" pass="0">
<layer class="SimpleLine" enabled="1" id="{aaa766cf-48b3-49b5-8091-e4c8f0e5150a}" locked="0" pass="0">
<Option type="Map">
<Option name="align_dash_pattern" type="QString" value="0"></Option>
<Option name="capstyle" type="QString" value="square"></Option>
Expand Down Expand Up @@ -1277,7 +1278,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleFill" enabled="1" id="{1d14d419-de74-4843-ae84-79bd4133cc6e}" locked="0" pass="0">
<layer class="SimpleFill" enabled="1" id="{f5382e33-e2a1-420d-80ee-1252b6c1a0e5}" locked="0" pass="0">
<Option type="Map">
<Option name="border_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"></Option>
<Option name="color" type="QString" value="183,72,75,255"></Option>
Expand Down Expand Up @@ -1310,7 +1311,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleMarker" enabled="1" id="{3bcb1ed9-0415-46c1-bb70-7ad94582f94b}" locked="0" pass="0">
<layer class="SimpleMarker" enabled="1" id="{51a5aab4-1372-4071-a396-c5b0f8252a38}" locked="0" pass="0">
<Option type="Map">
<Option name="angle" type="QString" value="0"></Option>
<Option name="cap_style" type="QString" value="square"></Option>
Expand Down Expand Up @@ -1353,7 +1354,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleMarker" enabled="1" id="{801cb844-9932-4616-b50e-d7d5b2cf711d}" locked="0" pass="0">
<layer class="SimpleMarker" enabled="1" id="{4c4e2b9e-ef44-4e6c-b55e-11831bcbf853}" locked="0" pass="0">
<Option type="Map">
<Option name="angle" type="QString" value="0"></Option>
<Option name="cap_style" type="QString" value="square"></Option>
Expand Down Expand Up @@ -1417,7 +1418,7 @@ def my_form_open(dialog, layer, feature):
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
<layer class="SimpleLine" enabled="1" id="{f80f21f1-552d-41e0-91dc-18e40d8fe494}" locked="0" pass="0">
<layer class="SimpleLine" enabled="1" id="{7c5d0d9f-cabb-48fe-9841-b52994dff286}" locked="0" pass="0">
<Option type="Map">
<Option name="align_dash_pattern" type="QString" value="0"></Option>
<Option name="capstyle" type="QString" value="square"></Option>
Expand Down Expand Up @@ -1749,7 +1750,7 @@ def my_form_open(dialog, layer, feature):
<Sensors></Sensors>
<ProjectViewSettings UseProjectScales="0" rotation="0">
<Scales></Scales>
<DefaultViewExtent xmax="782045.32394637318793684" xmin="763479.4154808419989422" ymax="6285886.84987394418567419" ymin="6274133.31412096228450537">
<DefaultViewExtent xmax="783337.28149422956630588" xmin="762187.45793298562057316" ymax="6285756.67271297331899405" ymin="6274263.49128193315118551">
<spatialrefsys nativeFormat="Wkt">
<wkt>PROJCRS["RGF93 v1 / Lambert-93",BASEGEOGCRS["RGF93 v1",DATUM["Reseau Geodesique Francais 1993 v1",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4171]],CONVERSION["Lambert-93",METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],PARAMETER["Latitude of false origin",46.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",49,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",44,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",700000,LENGTHUNIT["metre",1],ID["EPSG",8826]],PARAMETER["Northing at false origin",6600000,LENGTHUNIT["metre",1],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["France - onshore and offshore, mainland and Corsica."],BBOX[41.15,-9.86,51.56,10.38]],ID["EPSG",2154]]</wkt>
<proj4>+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</proj4>
Expand Down Expand Up @@ -1817,4 +1818,4 @@ def my_form_open(dialog, layer, feature):
<ProjectGpsSettings autoAddTrackVertices="0" autoCommitFeatures="0" destinationFollowsActiveLayer="1" destinationLayer="dnd_popup_3b9d335a_5491_45fa_8a8b_8dca1ca7ff3b" destinationLayerName="dnd_popup" destinationLayerProvider="postgres" destinationLayerSource="service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=2154 type=Polygon checkPrimaryKeyUnicity='1' table=&quot;tests_projects&quot;.&quot;dnd_popup&quot; (geom)">
<timeStampFields></timeStampFields>
</ProjectGpsSettings>
</qgis>
</qgis>
11 changes: 6 additions & 5 deletions tests/qgis-projects/tests/popup.qgs.cfg
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"metadata": {
"qgis_desktop_version": 33408,
"lizmap_plugin_version_str": "4.3.20-alpha",
"lizmap_plugin_version": 40320,
"lizmap_web_client_target_version": 30900,
"qgis_desktop_version": 33415,
"lizmap_plugin_version_str": "4.4.7-alpha",
"lizmap_plugin_version": 40407,
"lizmap_web_client_target_version": 31000,
"lizmap_web_client_target_status": "Dev",
"instance_target_url": "http://localhost:8130/",
"instance_target_repository": "testsrepository"
},
"warnings": {},
"debug": {
"total_time": 0.42000000000000004
"total_time": 0.605
},
"options": {
"projection": {
Expand Down Expand Up @@ -48,6 +48,7 @@
"pointTolerance": 25,
"lineTolerance": 10,
"polygonTolerance": 5,
"automatic_permalink": true,
"tmTimeFrameSize": 10,
"tmTimeFrameType": "seconds",
"tmAnimationFrameLength": 1000,
Expand Down

0 comments on commit 29ce894

Please sign in to comment.