mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-29 04:54:12 +03:00
Wait for page load during test
This commit is contained in:
parent
b76a53a1af
commit
058cd82df0
|
@ -44,15 +44,16 @@ var packageName; // there seems to be no official way of finding out the name o
|
|||
|
||||
var plugins = ['affix', 'alert', 'button', 'carousel', 'collapse', 'dropdown', 'modal', 'popover', 'scrollspy', 'tab', 'tooltip'];
|
||||
|
||||
// test plugins
|
||||
plugins.forEach(function (plugin) {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// test plugins
|
||||
plugins.forEach(function (plugin) {
|
||||
Tinytest.add('Plugin - ' + plugin, function (test) {
|
||||
test.instanceOf($(document.body)[plugin], Function, 'instantiated correctly');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// visual check
|
||||
plugins.forEach(function (plugin) {
|
||||
// visual check
|
||||
plugins.forEach(function (plugin) {
|
||||
|
||||
Tinytest.addAsync('Visual check - ' + plugin, function (test, done) {
|
||||
var bootstrapDropZone = document.createElement('div');
|
||||
|
@ -73,10 +74,10 @@ plugins.forEach(function (plugin) {
|
|||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Tinytest.addAsync('Visual check - Material Design', function (test, done) {
|
||||
Tinytest.addAsync('Visual check - Material Design', function (test, done) {
|
||||
var bootstrapDropZone = document.createElement('div');
|
||||
document.body.appendChild(bootstrapDropZone);
|
||||
|
||||
|
@ -100,4 +101,6 @@ Tinytest.addAsync('Visual check - Material Design', function (test, done) {
|
|||
done();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user