[FIX] website_sale: test tour

bzr revid: chm@openerp.com-20140122145821-da1l5l5bji39j5mv
This commit is contained in:
Christophe Matthieu 2014-01-22 15:58:21 +01:00
parent 0c5b6caa10
commit 0fe979572b
2 changed files with 1 additions and 11 deletions

View File

@ -292,7 +292,7 @@
url: /shop\/confirmation\//,
},
afterTrigger: function (tour) {
window.localStorage.setItem("shoptest-test-success", "true");
console.log('{ "event": "success" }');
},
}
];

View File

@ -14,15 +14,5 @@ testRunner.run(function websiteSaleTest (page, timeout) {
page.evaluate(function () {
window.openerp.website.TestConsole.test('shoptest').run(true);
});
waitFor(function testExecuted () {
return page.evaluate(function () {
var res = window.localStorage && window.localStorage.getItem
&& window.localStorage.getItem("shoptest-test-success");
return res;
});
}, function finish () {
console.log('{ "event": "success" }');
phantom.exit();
}, 4*timeout/5);
}, timeout/5);
});