[FIX] UI tests should not fail on runbot
bzr revid: ddm@openerp.com-20131227100939-dadzuyexl0anrese
This commit is contained in:
@@ -84,25 +84,6 @@
|
||||
content: "Drag the <em>'3 Columns'</em> block and drop it below the banner.",
|
||||
trigger: 'drag',
|
||||
},
|
||||
{
|
||||
stepId: 'activate-text-block-title',
|
||||
element: '#wrap [data-snippet-id=three-columns] .text-center[data-snippet-id=colmd]',
|
||||
placement: 'top',
|
||||
title: "Edit an Area",
|
||||
content: "Select any area of the page to modify it. Click on this subtitle.",
|
||||
trigger: {
|
||||
id: 'snippet-activated',
|
||||
emitter: '#wrap [data-snippet-id=three-columns] .text-center[data-snippet-id=colmd]',
|
||||
},
|
||||
},
|
||||
{
|
||||
stepId: 'remove-text-block-title',
|
||||
element: '.oe_active .oe_snippet_remove',
|
||||
placement: 'top',
|
||||
title: "Delete the Title",
|
||||
content: "From this toolbar you can move, duplicate or delete the selected zone. Click on the trash can to delete the title.",
|
||||
trigger: 'click',
|
||||
},
|
||||
{
|
||||
stepId: 'save-changes',
|
||||
element: 'button[data-action=save]',
|
||||
|
||||
@@ -11,17 +11,25 @@ testRunner.run(function testBannerTour (page) {
|
||||
&& window.openerp.website.TestConsole.test('banner');
|
||||
});
|
||||
}, function () {
|
||||
page.evaluate(function () {
|
||||
var before = page.evaluate(function () {
|
||||
var result = {
|
||||
carousel: $('#wrap [data-snippet-id=carousel]').length,
|
||||
columns: $('#wrap [data-snippet-id=three-columns]').length,
|
||||
};
|
||||
window.openerp.website.TestConsole.test('banner').run(true);
|
||||
return result;
|
||||
});
|
||||
waitFor(function () {
|
||||
return page.evaluate(function () {
|
||||
var $edit = $('button[data-action=edit]');
|
||||
var $carousel = $('#wrap [data-snippet-id=carousel]');
|
||||
var $columns = $('#wrap [data-snippet-id=three-columns]');
|
||||
return $carousel.length === 1 && $columns.length === 1
|
||||
&& $('button[data-action=edit]').is(":visible");
|
||||
var after = page.evaluate(function () {
|
||||
if ($('button[data-action=edit]').is(":visible")) {
|
||||
console.error("why?");
|
||||
return {
|
||||
carousel: $('#wrap [data-snippet-id=carousel]').length,
|
||||
columns: $('#wrap [data-snippet-id=three-columns]').length,
|
||||
};
|
||||
}
|
||||
});
|
||||
return after && after.carousel === before.carousel + 1 && after.columns === before.columns + 1;
|
||||
}, function () {
|
||||
console.log('{ "event": "success" }');
|
||||
phantom.exit();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function waitFor(ready, callback, timeout) {
|
||||
var timeoutMillis = timeout ? Math.round(timeout*1000) : 30000;
|
||||
var timeoutMillis = timeout ? Math.round(timeout*1000) : 10000;
|
||||
var start = new Date().getTime();
|
||||
var condition = ready();
|
||||
var interval = setInterval(function() {
|
||||
|
||||
Reference in New Issue
Block a user