-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #737 from OpenGeoscience/headless-vs-headed-tests
Better separate headless tests that require webgl and headed tests.
- Loading branch information
Showing
10 changed files
with
63 additions
and
64 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
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
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
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
File renamed without changes.
File renamed without changes.
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,35 @@ | ||
describe('two maps', function () { | ||
var imageTest = require('../image-test'); | ||
var common = require('../test-common'); | ||
var $ = require('jquery'); | ||
|
||
var map1, map2; | ||
|
||
beforeEach(function () { | ||
var twomap = $('<div id="twomap"/>').css({width: '320px', height: '480px'}); | ||
$('#map').remove(); | ||
$('body').prepend(twomap); | ||
twomap.append($('<div id="map1"/>').css({width: '100%', height: '50%'})); | ||
twomap.append($('<div id="map2"/>').css({width: '100%', height: '50%'})); | ||
}); | ||
afterEach(function () { | ||
map1.exit(); | ||
map2.exit(); | ||
$('#twomap').remove(); | ||
}); | ||
|
||
it('two maps', function (done) { | ||
map1 = common.createOsmMap({node: '#map1', center: {x: -70, y: 40}, zoom: 3}); | ||
map2 = common.createOsmMap({node: '#map2', center: {x: 70, y: 40}, zoom: 3}); | ||
map1.draw(); | ||
map2.draw(); | ||
|
||
var idle = function (callback) { | ||
map1.onIdle(function () { | ||
map2.onIdle(callback); | ||
}); | ||
}; | ||
|
||
imageTest.imageTest('mapTwo', '#twomap', 0.0015, done, idle, 0, 2); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
/** | ||
* Entry point for all tests in ./example-cases/* | ||
* Entry point for all tests in ./headed-cases/* | ||
* This is here to prevent webpack from creating a seperate bundle for each | ||
* test case. See: https://github.com/webpack/karma-webpack/issues/23 | ||
*/ | ||
|
||
var tests = require.context('./example-cases', true, /.*\.js$/); | ||
var tests = require.context('./headed-cases', true, /.*\.js$/); | ||
tests.keys().forEach(tests); | ||
|