mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
test canvas and webgl drawers in multi-image
This commit is contained in:
parent
e0fd78344b
commit
f563600635
@ -7,7 +7,7 @@
|
||||
|
||||
function runDrawerTests(drawerType){
|
||||
|
||||
QUnit.module('Drawer', {
|
||||
QUnit.module('Drawer-'+drawerType, {
|
||||
beforeEach: function () {
|
||||
$('<div id="example"></div>').appendTo("#qunit-fixture");
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
};
|
||||
|
||||
// ----------
|
||||
QUnit.test('basics-'+drawerType, function(assert) {
|
||||
QUnit.test('basics', function(assert) {
|
||||
var done = assert.async();
|
||||
createViewer();
|
||||
assert.ok(viewer.drawer, 'Drawer exists');
|
||||
@ -43,7 +43,7 @@
|
||||
});
|
||||
|
||||
// ----------
|
||||
QUnit.test('rotation-'+drawerType, function(assert) {
|
||||
QUnit.test('rotation', function(assert) {
|
||||
var done = assert.async();
|
||||
|
||||
createViewer({
|
||||
@ -70,7 +70,7 @@
|
||||
});
|
||||
|
||||
// ----------
|
||||
QUnit.test('debug-'+drawerType, function(assert) {
|
||||
QUnit.test('debug', function(assert) {
|
||||
var done = assert.async();
|
||||
createViewer({
|
||||
tileSources: '/test/data/testpattern.dzi',
|
||||
@ -89,7 +89,7 @@
|
||||
});
|
||||
|
||||
// ----------
|
||||
QUnit.test('sketchCanvas-'+drawerType, function(assert) {
|
||||
QUnit.test('sketchCanvas', function(assert) {
|
||||
var done = assert.async();
|
||||
|
||||
createViewer({
|
||||
@ -137,7 +137,7 @@
|
||||
});
|
||||
|
||||
// ----------
|
||||
QUnit.test('deprecations-'+drawerType, function(assert) {
|
||||
QUnit.test('deprecations', function(assert) {
|
||||
var done = assert.async();
|
||||
|
||||
createViewer({
|
||||
|
@ -2,8 +2,12 @@
|
||||
|
||||
( function() {
|
||||
var viewer;
|
||||
const drawerTypes = ['webgl','canvas'];
|
||||
drawerTypes.forEach(runDrawerTests);
|
||||
|
||||
QUnit.module( 'Multi-Image', {
|
||||
function runDrawerTests(drawerType){
|
||||
|
||||
QUnit.module( 'Multi-Image-'+drawerType, {
|
||||
beforeEach: function() {
|
||||
$( '<div id="example"></div>' ).appendTo( "#qunit-fixture" );
|
||||
|
||||
@ -12,7 +16,8 @@
|
||||
viewer = OpenSeadragon( {
|
||||
id: 'example',
|
||||
prefixUrl: '/build/openseadragon/images/',
|
||||
springStiffness: 100 // Faster animation = faster tests
|
||||
springStiffness: 100, // Faster animation = faster tests
|
||||
drawer: drawerType
|
||||
});
|
||||
},
|
||||
afterEach: function() {
|
||||
@ -278,5 +283,6 @@
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user