Skip to content

Commit

Permalink
test: in travis not test webgl
Browse files Browse the repository at this point in the history
  • Loading branch information
06wj committed Nov 29, 2016
1 parent 64fd4cc commit 174a01d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions test/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
<script src="../../build/standalone/hilo-standalone.min.js"></script>
<script src="../../build/flash/hilo-flash.min.js" data-auto="true"></script>
<script>
window._IS_WEB = true;
window._IS_TRAVIS = false;
if(typeof process === 'object'){
window._IS_WEB = false;
if(process.env.TEST_FLAG === 'TRAVIS'){
window._IS_TRAVIS = true;
}
}
console.log('_IS_WEB:', _IS_WEB);
console.log('_IS_TRAVIS:', _IS_TRAVIS);

_macaca_uitest.setup({
ui: 'bdd',
timeout: 10000,
Expand Down
2 changes: 1 addition & 1 deletion test/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('loader', function(){
var onLoad = scriptLoader.onLoad;
timeoutId = setTimeout(function(){
done(new Error('onLoad not work'));
}, 2000);
}, 5000);

scriptLoader.onLoad = function(data){
!isDone && done();
Expand Down
4 changes: 3 additions & 1 deletion test/view.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
['canvas', 'webgl', 'dom'].forEach(function(stageRenderType){
var needTestRenderTypes = window._IS_TRAVIS?['canvas']:['canvas', 'webgl', 'dom'];

needTestRenderTypes.forEach(function(stageRenderType){

describe('view:' + stageRenderType, function() {
var stage, ticker;
Expand Down

0 comments on commit 174a01d

Please sign in to comment.