[FIX] point_of_sale: removed console.logs, fixed the tests to work with the new ui

bzr revid: fva@openerp.com-20140106174957-ee323a33j59q1npw
This commit is contained in:
Frédéric van der Essen
2014-01-06 18:49:57 +01:00
parent b9a245b22a
commit a726bf2d76
2 changed files with 9 additions and 10 deletions
+9 -8
View File
@@ -13,8 +13,8 @@ function openerp_pos_tests(instance, module){ //module is instance.point_of_sale
// randomly switch product categories
this.category_switch = function(interval){
queue.schedule(function(){
var breadcrumbs = $('.breadcrumb a');
var categories = $('li.category-button');
var breadcrumbs = $('.breadcrumb-button');
var categories = $('.category-button');
if(categories.length > 0){
var rnd = Math.floor(Math.random()*categories.length);
categories.eq(rnd).click();
@@ -35,12 +35,12 @@ function openerp_pos_tests(instance, module){ //module is instance.point_of_sale
while(order_size--){
order_queue.schedule(function(){
var products = $('.product a');
var products = $('.product');
if(products.length > 0){
var rnd = Math.floor(Math.random()*products.length);
products.eq(rnd).click();
}
},{duration:250});
},{duration:20});
}
order_queue.finished().then(function(){
$('.deleteorder-button').click();
@@ -60,19 +60,20 @@ function openerp_pos_tests(instance, module){ //module is instance.point_of_sale
while(order_size--){
order_queue.schedule(function(){
var products = $('.product a');
var products = $('.product');
if(products.length > 0){
var rnd = Math.floor(Math.random()*products.length);
products.eq(rnd).click();
}
},{duration:250});
},{duration:50});
}
order_queue.schedule(function(){
$('.paypad-button:first').click();
},{duration:250});
order_queue.schedule(function(){
$('.paymentline-amount input:first').val(10000);
$('.paymentline-amount input:first').keyup();
$('.paymentline-input:first').val(10000);
$('.paymentline-input:first').keydown();
$('.paymentline-input:first').keyup();
},{duration:250});
order_queue.schedule(function(){
$('.pos-actionbar-button-list .button:eq(2)').click();
@@ -585,7 +585,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
render_product: function(product){
var cached = this.product_cache.get_node(product.id);
if(!cached){
console.log('Not Cached:',product.id);
var image_url = this.get_product_image_url(product);
var product_html = QWeb.render('Product',{
widget: this,
@@ -598,7 +597,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
this.product_cache.cache_node(product.id,product_node);
return product_node;
}
console.log('Cached:',product.id);
return cached;
},