[IMP] website tour: fix auto test
bzr revid: chm@openerp.com-20140321123722-dmfdckh59cvot00i
This commit is contained in:
parent
d8f27686e5
commit
89a6bd0649
|
@ -16,7 +16,7 @@ if (typeof openerp === "undefined") {
|
|||
var website = window.openerp.website;
|
||||
|
||||
// don't rewrite T in test mode
|
||||
if (typeof T !== "undefined") {
|
||||
if (typeof website.Tour !== "undefined") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -393,7 +393,7 @@ T.waitNextStep = function () {
|
|||
} else if (!overlaps || new Date().getTime() - time < overlaps) {
|
||||
T.timer = setTimeout(checkNext, T.defaultDelay);
|
||||
} else {
|
||||
T.error("Can't arrive to the next step");
|
||||
T.error("Can't reach the next step");
|
||||
}
|
||||
}
|
||||
checkNext();
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{
|
||||
title: "go to register page",
|
||||
waitNot: 'a[href*="/event"]:contains("Functional Webinar")',
|
||||
onload: function () {
|
||||
autoComplete: function () {
|
||||
// use onload if website_event_track is installed
|
||||
if (!$('form:contains("Ticket Type")').size()) {
|
||||
window.location.href = $('a[href*="/event"][href*="/register"]').attr("href");
|
||||
|
@ -43,7 +43,7 @@
|
|||
title: "Complete checkout",
|
||||
waitFor: '#top_menu .my_cart_quantity:contains(5)',
|
||||
element: 'form[action="/shop/confirm_order"] .btn:contains("Confirm")',
|
||||
onload: function (tour) {
|
||||
autoComplete: function (tour) {
|
||||
if ($("input[name='name']").val() === "")
|
||||
$("input[name='name']").val("website_sale-test-shoptest");
|
||||
if ($("input[name='email']").val() === "")
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
{
|
||||
title: "test with input error",
|
||||
element: 'form[action="/shop/confirm_order"] .btn:contains("Confirm")',
|
||||
onload: function (tour) {
|
||||
autoComplete: function (tour) {
|
||||
$("input[name='phone']").val("");
|
||||
},
|
||||
},
|
||||
|
@ -58,7 +58,7 @@
|
|||
title: "test without input error",
|
||||
waitFor: 'form[action="/shop/confirm_order"] .has-error',
|
||||
element: 'form[action="/shop/confirm_order"] .btn:contains("Confirm")',
|
||||
onload: function (tour) {
|
||||
autoComplete: function (tour) {
|
||||
if ($("input[name='name']").val() === "")
|
||||
$("input[name='name']").val("website_sale-test-shoptest");
|
||||
if ($("input[name='email']").val() === "")
|
||||
|
|
Loading…
Reference in New Issue