[IMP] Improve automated tests
bzr revid: ddm@openerp.com-20131210163522-p23703mcu8pfdsl0
This commit is contained in:
parent
8c91a8831e
commit
6893a6ab15
|
@ -229,7 +229,7 @@
|
|||
var $thumbnail = $(selector).first();
|
||||
var thumbnailPosition = $thumbnail.position();
|
||||
$thumbnail.trigger($.Event("mousedown", { which: 1, pageX: thumbnailPosition.left, pageY: thumbnailPosition.top }));
|
||||
$thumbnail.trigger($.Event("mousemove", { which: 1, pageX: thumbnailPosition.left+100, pageY: thumbnailPosition.top+700 }));
|
||||
$thumbnail.trigger($.Event("mousemove", { which: 1, pageX: thumbnailPosition.left, pageY: thumbnailPosition.top+500 }));
|
||||
var $dropZone = $(".oe_drop_zone").first();
|
||||
var dropPosition = $dropZone.position();
|
||||
$dropZone.trigger($.Event("mouseup", { which: 1, pageX: dropPosition.left, pageY: dropPosition.top }));
|
||||
|
@ -262,7 +262,7 @@
|
|||
registerTour: function (tour) {
|
||||
var testId = 'test_'+tour.id+'_tour';
|
||||
this.tours.push(tour);
|
||||
TestConsole.tests.push({
|
||||
var test = {
|
||||
id: tour.id,
|
||||
run: function (force) {
|
||||
var url = new website.UrlParser(window.location.href);
|
||||
|
@ -280,9 +280,14 @@
|
|||
step.triggers(function () {
|
||||
var nextStep = actionSteps.shift();
|
||||
if (nextStep) {
|
||||
// Ensure the previous step has been fully propagated
|
||||
setTimeout(function () {
|
||||
executeStep(nextStep);
|
||||
setTimeout(function () {
|
||||
executeStep(nextStep);
|
||||
}, 0);
|
||||
}, 0);
|
||||
} else {
|
||||
window.localStorage.removeItem(testId);
|
||||
}
|
||||
});
|
||||
var $element = $(step.element);
|
||||
|
@ -311,7 +316,11 @@
|
|||
reset: function () {
|
||||
window.localStorage.removeItem(testId);
|
||||
},
|
||||
});
|
||||
};
|
||||
TestConsole.tests.push(test);
|
||||
if (window.localStorage.getItem(testId)) {
|
||||
test.run();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
placement: 'right',
|
||||
title: "Create Blog Post",
|
||||
content: "Click <em>Continue</em> to create the blog post.",
|
||||
trigger: 'click',
|
||||
},
|
||||
{
|
||||
stepId: 'post-page',
|
||||
|
@ -81,7 +82,11 @@
|
|||
placement: 'bottom',
|
||||
title: "Layout Your Blog Post",
|
||||
content: "Use well designed building blocks to structure the content of your blog. Click 'Insert Blocks' to add new content.",
|
||||
trigger: 'click',
|
||||
trigger: {
|
||||
emitter: editor,
|
||||
type: 'openerp',
|
||||
id: 'rte:ready',
|
||||
},
|
||||
},
|
||||
{
|
||||
stepId: 'drag-image-text',
|
||||
|
|
|
@ -71,7 +71,11 @@
|
|||
placement: 'bottom',
|
||||
title: "Layout your event",
|
||||
content: "Insert blocks like 'Banner' to layout the body of your event.",
|
||||
trigger: 'click',
|
||||
trigger: {
|
||||
emitter: editor,
|
||||
type: 'openerp',
|
||||
id: 'rte:ready',
|
||||
},
|
||||
},
|
||||
{
|
||||
stepId: 'drag-banner',
|
||||
|
|
|
@ -109,7 +109,11 @@
|
|||
placement: 'bottom',
|
||||
title: "Describe the product for your audience",
|
||||
content: "Insert blocks like text-image, or gallery to fully describe the product and make your visitors want to buy this product.",
|
||||
trigger: 'click',
|
||||
trigger: {
|
||||
emitter: editor,
|
||||
type: 'openerp',
|
||||
id: 'rte:ready',
|
||||
},
|
||||
},
|
||||
{
|
||||
stepId: 'drag-big-picture',
|
||||
|
|
Loading…
Reference in New Issue