Skip to content

Commit ade1633

Browse files
authored
Merge pull request #576 from terrestris/tests
fix: tests and introduce pipeline for v5-main branch
2 parents 6339788 + 7b29837 commit ade1633

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed

Diff for: .github/workflows/on-pull-request.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Test successful build of mapfish print manager (v5-main)
2+
3+
on: pull_request
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [18.x]
12+
13+
steps:
14+
- name: Checkout sources
15+
uses: actions/checkout@v3
16+
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
22+
- name: Cache Node.js modules 💾
23+
uses: actions/cache@v3
24+
with:
25+
path: ~/.npm
26+
key: "${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}"
27+
restore-keys: |
28+
${{ runner.OS }}-node-
29+
${{ runner.OS }}-
30+
31+
- name: Install dependencies ⏬
32+
run: npm install
33+
34+
- name: Run tests 🩺
35+
run: npm run test
36+
37+
- name: Build artifacts 🏗️
38+
run: npm run build:dist

Diff for: spec/serializer/MapFishPrintV3GeoJsonSerializer.spec.js

+28-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ describe('MapFishPrintV3GeoJsonSerializer', () => {
7979
coordinates: [0, 0]
8080
},
8181
properties: {
82+
'_style': 0
8283
}
8384
}, {
8485
type: 'Feature',
@@ -87,6 +88,7 @@ describe('MapFishPrintV3GeoJsonSerializer', () => {
8788
coordinates: [[0, 0], [1, 1]]
8889
},
8990
properties: {
91+
'_style': 1
9092
}
9193
}, {
9294
type: 'Feature',
@@ -95,12 +97,37 @@ describe('MapFishPrintV3GeoJsonSerializer', () => {
9597
coordinates: [[[0, 0], [1, 1], [0, 0]]]
9698
},
9799
properties: {
100+
'_style': 2
98101
}
99102
}]
100103
},
101104
name: layer.get('name') || 'Vector Layer',
102105
opacity: layer.getOpacity(),
103-
style: {},
106+
style: {
107+
'0': {
108+
fillColor: '#ffffff',
109+
fillOpacity: 0.4,
110+
graphicName: 'circle',
111+
pointRadius: 5,
112+
rotation: 0,
113+
strokeColor: '#3399cc',
114+
strokeOpacity: 1,
115+
strokeWidth: 1.25,
116+
version: 2,
117+
},
118+
'1': {
119+
strokeColor: '#3399cc',
120+
strokeOpacity: 1,
121+
strokeWidth: 1.25,
122+
},
123+
'2': {
124+
fillColor: '#ffffff',
125+
fillOpacity: 0.4,
126+
strokeColor: '#3399cc',
127+
strokeOpacity: 1,
128+
strokeWidth: 1.25,
129+
},
130+
},
104131
type: 'geojson'
105132
});
106133
});

0 commit comments

Comments
 (0)