[WIP] website_sale: test tour error

bzr revid: chm@openerp.com-20140121221438-6j1231868ex479p2
This commit is contained in:
Christophe Matthieu 2014-01-21 23:14:38 +01:00
parent 98bdaf4a1c
commit d9582aa9e4
2 changed files with 8 additions and 10 deletions

View File

@ -292,13 +292,11 @@
url: /shop\/confirmation\//,
},
afterTrigger: function (tour) {
window.localStorage.setItem("test-success", "{}");
localStorage.setItem("test-success", "{}");
throw "afterTrigger test finish, remove this throw";
},
},
{
stepId: 'end-test',
backdrop: true,
},
}
];
return this._super();
},

View File

@ -16,10 +16,10 @@ testRunner.run(function websiteSaleTest (page, timeout) {
});
waitFor(function testExecuted () {
return page.evaluate(function () {
console.error(
window.localStorage && window.localStorage.getItem
&& window.localStorage.getItem("test-success"));
return true;
var res = window.localStorage && window.localStorage.getItem
&& window.localStorage.getItem("test-success");
console.log('{ "error": "testExecuted", "message": "'+res+'"" }');
return res;
});
}, function finish () {
console.log('{ "event": "success" }');