[FIX] website_sale: test tour and activate website_event_sale test

bzr revid: chm@openerp.com-20140331151237-ec0j7ywfsbjsw83k
This commit is contained in:
chm@openerp.com 2014-03-31 17:12:37 +02:00
parent 94cf489dfc
commit fd593a3049
3 changed files with 14 additions and 11 deletions

View File

@ -306,7 +306,7 @@ var T = website.Tour = {
window.location.hash = "";
T.saveState(state.id, state.mode, state.step_id);
}
if (!state.id) {
if (!state.id || !T.tours[state.id]) {
return;
}
state.tour = T.tours[state.id];
@ -349,20 +349,21 @@ var T = website.Tour = {
clearTimeout(T.testtimer);
T.closePopover();
},
testRunning: 0,
running: function () {
var state = T.getState();
if (state) {
T.registerSteps(state.tour);
setTimeout(function () {
if ($.ajaxBusy) {
$(document).ajaxStop(function() {
setTimeout(function () {
T.nextStep();
},0);
var state = T.getState();
T.registerSteps(state.tour);
T.nextStep();
});
} else {
var state = T.getState();
T.registerSteps(state.tour);
T.nextStep();
}
}
},0);
},
check: function (step) {
return (step &&

View File

@ -1 +1 @@
#import test_ui
import test_ui

View File

@ -1,8 +1,10 @@
import os
import openerp.tests
inject = [
"./../../../website/static/src/js/website.tour.test.js",
"./../../../website_event_sale/static/src/js/website.tour.event_sale.js",
("openerp.website.Tour", os.path.join(os.path.dirname(__file__), '../../website/static/src/js/website.tour.js')),
("openerp.website.Tour.tours.event_buy_tickets", os.path.join(os.path.dirname(__file__), "../static/src/js/website.tour.event_sale.js")),
]
@openerp.tests.common.at_install(False)