Skip to content

tests(e2e): provide tests for controls #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ components/*.d.ts
/test-results/
/playwright-report/
/playwright/.cache/
tests/downloads
1 change: 0 additions & 1 deletion src/demos/AttributionControlDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down
2 changes: 0 additions & 2 deletions src/demos/BingMapsDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand All @@ -32,6 +31,5 @@ import { ref } from "vue";
const center = ref([40, 40]);
const projection = ref("EPSG:4326");
const zoom = ref(8);
const rotation = ref(0);
const selected = ref("AerialWithLabels");
</script>
2 changes: 0 additions & 2 deletions src/demos/CircleDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -36,5 +35,4 @@ import { ref } from "vue";
const center = ref([30, 40]);
const projection = ref("EPSG:4326");
const zoom = ref(10);
const rotation = ref(0);
</script>
2 changes: 0 additions & 2 deletions src/demos/ClusterDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -51,7 +50,6 @@ import { arrayWith500Points } from "./points";
const center = ref([34, 39.13]);
const projection = ref("EPSG:4326");
const zoom = ref(6.8);
const rotation = ref(0);

const overrideStyleFunction = (feature, style, resolution) => {
console.log({ feature, style, resolution });
Expand Down
2 changes: 0 additions & 2 deletions src/demos/ContextMenuDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
>
<ol-view
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
ref="view"
Expand Down Expand Up @@ -37,7 +36,6 @@ import marker from "@/assets/marker.png";
const center = ref([40, 40]);
const projection = ref("EPSG:4326");
const zoom = ref(8);
const rotation = ref(0);

const contextMenuItems = ref([]);

Expand Down
2 changes: 0 additions & 2 deletions src/demos/ControlBarDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -61,7 +60,6 @@ import { ref } from "vue";
const center = ref([34, 39.13]);
const projection = ref("EPSG:4326");
const zoom = ref(6);
const rotation = ref(0);
const view = ref(null);

const drawEnable = ref(false);
Expand Down
2 changes: 0 additions & 2 deletions src/demos/DrawDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -64,7 +63,6 @@ import { ref } from "vue";
const center = ref([40, 40]);
const projection = ref("EPSG:4326");
const zoom = ref(8);
const rotation = ref(0);

const drawEnable = ref(true);
const drawType = ref("Polygon");
Expand Down
2 changes: 0 additions & 2 deletions src/demos/DropAnimation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -45,5 +44,4 @@ import { arrayWith500Points } from "./points";
const center = ref([40, 40]);
const projection = ref("EPSG:4326");
const zoom = ref(6);
const rotation = ref(0);
</script>
2 changes: 0 additions & 2 deletions src/demos/FadeAnimation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -45,5 +44,4 @@ import { arrayWith500Points } from "./points";
const center = ref([40, 40]);
const projection = ref("EPSG:4326");
const zoom = ref(6);
const rotation = ref(0);
</script>
3 changes: 1 addition & 2 deletions src/demos/FeatureSelectDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@click="selectFeature"
ref="mapRef"
>
<ol-view ref="view" :center="center" :rotation="rotation" :zoom="zoom" />
<ol-view ref="view" :center="center" :zoom="zoom" />

<ol-vector-tile-layer class-name="feature-layer">
<ol-source-vector-tile :url="url" :format="mvtFormat" />
Expand Down Expand Up @@ -69,7 +69,6 @@ const mvtFormat = new format.MVT({ featureClass: Feature });
const mapRef = ref<{ map: MapRef } | null>(null);
const center = ref([943955.9456952971, 6356667.343082143]);
const zoom = ref(18);
const rotation = ref(0);
const url = ref(
"https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/tile/{z}/{y}/{x}.pbf",
);
Expand Down
1 change: 0 additions & 1 deletion src/demos/FullscreenControlDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down
2 changes: 0 additions & 2 deletions src/demos/GeoLocationDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -43,7 +42,6 @@ import type { ObjectEvent } from "ol/Object";
const center = ref([40, 40]);
const projection = ref("EPSG:4326");
const zoom = ref(12);
const rotation = ref(0);
const view = ref<View>();
const map = ref(null);
const position = ref([]);
Expand Down
2 changes: 0 additions & 2 deletions src/demos/GeomPoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -44,7 +43,6 @@ import { ref } from "vue";
const center = ref([40, 40]);
const projection = ref("EPSG:4326");
const zoom = ref(8);
const rotation = ref(0);
const radius = ref(40);
const strokeWidth = ref(10);
const strokeColor = ref("red");
Expand Down
2 changes: 0 additions & 2 deletions src/demos/HeatmapLayerDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -40,7 +39,6 @@ import { ref, inject } from "vue";
const center = ref([101.97, 4.21]);
const projection = ref("EPSG:4326");
const zoom = ref(5);
const rotation = ref(0);
const format = inject("ol-format");
const kml = new format.KML({ extractStyles: false });
const heatmapWeight = function (feature) {
Expand Down
2 changes: 0 additions & 2 deletions src/demos/IconDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -41,7 +40,6 @@ import markerIcon from "@/assets/marker.png";
const center = ref([34, 39.13]);
const projection = ref("EPSG:4326");
const zoom = ref(6.8);
const rotation = ref(0);
const format = inject("ol-format");
const geoJson = new format.GeoJSON();
</script>
2 changes: 0 additions & 2 deletions src/demos/ImageLayerDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand All @@ -29,7 +28,6 @@
import { ref, reactive } from "vue";

const zoom = ref(2);
const rotation = ref(0);
const size = ref([1024, 968]);
const center = ref([size.value[0] / 2, size.value[1] / 2]);
const extent = ref([0, 0, ...size.value]);
Expand Down
3 changes: 1 addition & 2 deletions src/demos/ImageWMSDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:loadTilesWhileInteracting="true"
style="height: 400px"
>
<ol-view ref="view" :center="center" :rotation="rotation" :zoom="zoom" />
<ol-view ref="view" :center="center" :zoom="zoom" />
<ol-zoom-control />

<ol-tile-layer :zIndex="1000">
Expand All @@ -26,6 +26,5 @@
import { ref } from "vue";

const zoom = ref(4);
const rotation = ref(0);
const center = ref([-10997148, 4569099]);
</script>
3 changes: 1 addition & 2 deletions src/demos/LayerswitcherControlDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand All @@ -18,7 +17,7 @@
<ol-tile-layer ref="bingLayer" title="Bing Maps">
<ol-source-bingmaps
apiKey="AjtUzWJBHlI3Ma_Ke6Qv2fGRXEs0ua5hUQi54ECwfXTiWsitll4AkETZDihjcfeI"
:imagerySet="'CanvasDark'"
imagerySet="CanvasDark"
/>
</ol-tile-layer>

Expand Down
3 changes: 1 addition & 2 deletions src/demos/LayerswitcherimageControlDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand All @@ -18,7 +17,7 @@
<ol-tile-layer ref="bingLayer" title="Bing Maps">
<ol-source-bingmaps
apiKey="AjtUzWJBHlI3Ma_Ke6Qv2fGRXEs0ua5hUQi54ECwfXTiWsitll4AkETZDihjcfeI"
:imagerySet="'CanvasDark'"
imagerySet="RoadOnDemand"
/>
</ol-tile-layer>

Expand Down
2 changes: 0 additions & 2 deletions src/demos/LineString.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -57,7 +56,6 @@ import { ref } from "vue";
const center = ref([116.54875, 40.45064]);
const projection = ref("EPSG:4326");
const zoom = ref(17);
const rotation = ref(0);
const strokeWidth = ref(10);
const strokeColor = ref("red");
</script>
2 changes: 0 additions & 2 deletions src/demos/MapDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand All @@ -24,5 +23,4 @@ import { ref } from "vue";
const center = ref([40, 40]);
const projection = ref("EPSG:4326");
const zoom = ref(8);
const rotation = ref(0);
</script>
1 change: 0 additions & 1 deletion src/demos/MousepositionControlDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down
2 changes: 0 additions & 2 deletions src/demos/MultiLineString.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -60,7 +59,6 @@ import { ref } from "vue";
const center = ref([116.54875, 40.45064]);
const projection = ref("EPSG:4326");
const zoom = ref(17);
const rotation = ref(0);
const strokeWidth = ref(10);
const strokeColor = ref("red");
</script>
2 changes: 0 additions & 2 deletions src/demos/MultiPoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -60,7 +59,6 @@ import { ref } from "vue";
const center = ref([116.54875, 40.45064]);
const projection = ref("EPSG:4326");
const zoom = ref(17);
const rotation = ref(0);
const radius = ref(10);
const strokeWidth = ref(4);
const strokeColor = ref("red");
Expand Down
2 changes: 0 additions & 2 deletions src/demos/MultiPolygon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -59,7 +58,6 @@ import { ref } from "vue";
const center = ref([-98.8449, 19.6869]);
const projection = ref("EPSG:4326");
const zoom = ref(15);
const rotation = ref(0);
const strokeWidth = ref(10);
const strokeColor = ref("red");
</script>
2 changes: 0 additions & 2 deletions src/demos/PolygonDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down Expand Up @@ -53,5 +52,4 @@ import { ref } from "vue";
const center = ref([-98.8449, 19.6869]);
const projection = ref("EPSG:4326");
const zoom = ref(15);
const rotation = ref(0);
</script>
1 change: 0 additions & 1 deletion src/demos/PrintdialogControlDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
Expand Down
Loading