Skip to content

Commit

Permalink
test: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bastyen committed Jan 10, 2025
1 parent 3a8c1e3 commit 04247da
Show file tree
Hide file tree
Showing 9 changed files with 8,111 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ docs/.vitepress/dist

app/
android/
ios/
ios/

test-results/
7,801 changes: 7,801 additions & 0 deletions hars/grw-app.har

Large diffs are not rendered by default.

198 changes: 186 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@
"prepublishOnly": "npm run build",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
"docs:preview": "vitepress preview docs",
"test": "playwright test"
},
"dependencies": {
"@capacitor/android": "^5.7.3",
"@capacitor/core": "^5.7.3",
"@capacitor/filesystem": "^5.2.1",
"@capacitor/ios": "^5.7.3",
"@raruto/leaflet-elevation": "^1.9.0",
"@stencil/core": "^4.12.5",
"@stencil/core": "^4.23.1",
"@turf/bbox": "^6.5.0",
"@turf/point-on-feature": "^6.5.0",
"capacitor-blob-writer": "^1.1.15",
Expand All @@ -53,8 +54,10 @@
"devDependencies": {
"@babel/core": "^7.24.0",
"@capacitor/cli": "^5.7.3",
"@stencil/sass": "^3.0.10",
"@stencil/store": "^2.0.14",
"@playwright/test": "^1.49.1",
"@stencil/playwright": "^0.2.1",
"@stencil/sass": "^3.0.12",
"@stencil/store": "^2.0.16",
"@storybook/addon-controls": "^6.5.16",
"@storybook/addon-docs": "^6.5.16",
"@storybook/builder-webpack5": "^6.5.16",
Expand Down
8 changes: 8 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { expect } from '@playwright/test';
import { matchers, createConfig } from '@stencil/playwright';

expect.extend(matchers);

export default createConfig({
use: {},
});
26 changes: 26 additions & 0 deletions src/components/grw-app/test/grw-app.e2e.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<title>Geotrek Rando Widget</title>

<link rel="stylesheet" href="../../../build/geotrek-rando-widget.css" />
<script type="module" src="../../../build/geotrek-rando-widget.esm.js"></script>
<script nomodule src="../../../build/geotrek-rando-widget.js"></script>
<style>
body {
margin: 0;
}
</style>
</head>
<body>
<grw-app
api="https://demo-admin.geotrek.fr/api/v2/"
name-layer="IGN"
url-layer="https://data.geopf.fr/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2&STYLE=normal&FORMAT=image/png&TILEMATRIXSET=PM&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}"
attribution-layer="<a target='_blank' href='https://ign.fr/'>IGN</a>"
languages="fr"
></grw-app>
</body>
</html>
Loading

0 comments on commit 04247da

Please sign in to comment.