-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
121 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Acceptance tests | ||
|
||
The idea of this tests is to automatically test the entire stack, including the library, the renderer and the integration with the backend. | ||
|
||
This is done through screenshot testing, comparing `test-cases` screenshots against reference images stored in the `references` folder. | ||
|
||
## Generating the references | ||
|
||
yarn test:acceptance:prepare | ||
|
||
## Running the tests | ||
|
||
yarn test:acceptance | ||
|
||
|
||
This will generate a `<filename>_out.png` for every test case so you can visually compare the results if the test fails. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<script src="../hide-attribution.js"></script> | ||
<!-- Include CARTO GL JS --> | ||
<script src="../../../../dist/carto-gl.js"></script> | ||
<!-- Include Mapbox GL JS --> | ||
<script src="../../../../vendor/mapbox-gl-dev.js"></script> | ||
<!-- Include Mapbox GL CSS --> | ||
<link href='../mapbox-gl-v0.42.2.css' rel='stylesheet' /> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#map { | ||
position: absolute; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id='map'></div> | ||
</body> | ||
<script> | ||
const map = new mapboxgl.Map({ | ||
container: 'map', | ||
style: { "version": 8, "sources": {}, "layers": [] }, | ||
center: [-20.061035156250004, 33.211116472416855], | ||
zoom: 4, | ||
}); | ||
|
||
const auth = { | ||
user: 'cartogl', | ||
apiKey: 'YOUR_API_KEY' | ||
}; | ||
|
||
carto.setDefaultAuth(auth); | ||
|
||
const source = new carto.source.SQL('SELECT ST_Multi(the_geom_webmercator) as the_geom_webmercator, ST_Multi(the_geom) as the_geom FROM lines_0', auth); | ||
const style = new carto.Style(); | ||
const layer = new carto.Layer('myCartoLayer', source, style); | ||
layer.addTo(map); | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<script src="../hide-attribution.js"></script> | ||
<!-- Include CARTO GL JS --> | ||
<script src="../../../../dist/carto-gl.js"></script> | ||
<!-- Include Mapbox GL JS --> | ||
<script src="../../../../vendor/mapbox-gl-dev.js"></script> | ||
<!-- Include Mapbox GL CSS --> | ||
<link href='../mapbox-gl-v0.42.2.css' rel='stylesheet' /> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#map { | ||
position: absolute; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id='map'></div> | ||
</body> | ||
<script> | ||
const map = new mapboxgl.Map({ | ||
container: 'map', | ||
style: { "version": 8, "sources": {}, "layers": [] }, | ||
center: [-20.061035156250004, 33.211116472416855], | ||
zoom: 4, | ||
}); | ||
|
||
const auth = { | ||
user: 'cartogl', | ||
apiKey: 'YOUR_API_KEY' | ||
}; | ||
|
||
carto.setDefaultAuth(auth); | ||
|
||
const source = new carto.source.SQL('SELECT ST_Multi(the_geom_webmercator) as the_geom_webmercator, ST_Multi(the_geom) as the_geom FROM polygons_0', auth); | ||
const style = new carto.Style(); | ||
const layer = new carto.Layer('myCartoLayer', source, style); | ||
layer.addTo(map); | ||
</script> | ||
|
||
</html> |