summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2016-06-30 17:53:01 +0200
committerJeremy Kersten <jke@odoo.com>2016-07-04 15:48:15 +0200
commitbb7bfd7382470f37ec854fbd9eaef4d3cc121706 (patch)
tree1640d9e99aabae488c6fb4776bb9ac7acbf3bcc1
parent4dce86164cdf8ec95cc0d7f45c8aa516c7568504 (diff)
[REM] website_sale*: update test from checkout with public user
Now we drop the test where a user is created via the checkout form (public user). These tests should be rewrite in new api later an test flows for a new customer.
-rw-r--r--addons/website_event_sale/static/src/js/website.tour.event_sale.js13
-rw-r--r--addons/website_event_sale/tests/test_ui.py3
-rw-r--r--addons/website_sale/static/src/js/website_sale_tour_buy.js24
-rw-r--r--addons/website_sale/tests/test_sale_process.py3
4 files changed, 6 insertions, 37 deletions
diff --git a/addons/website_event_sale/static/src/js/website.tour.event_sale.js b/addons/website_event_sale/static/src/js/website.tour.event_sale.js
index 608d6b1549f..26dacb79ed9 100644
--- a/addons/website_event_sale/static/src/js/website.tour.event_sale.js
+++ b/addons/website_event_sale/static/src/js/website.tour.event_sale.js
@@ -69,18 +69,7 @@ base.ready().done(function () {
},
{
title: "Complete the checkout",
- element: 'form[action="/shop/confirm_order"] .btn:contains("Confirm")',
- onload: function () {
- if ($("input[name='name']").val() === "")
- $("input[name='name']").val("website_sale-test-shoptest");
- if ($("input[name='email']").val() === "")
- $("input[name='email']").val("website_event_sale_test_shoptest@websiteeventsaletest.odoo.com");
- $("input[name='phone']").val("123");
- $("input[name='street2']").val("123");
- $("input[name='city']").val("123");
- $("input[name='zip']").val("123");
- $("select[name='country_id']").val("21");
- },
+ element: 'a[href="/shop/confirm_order"]:contains("Confirm")',
},
{
title: "Check that the subtotal is 5,500.00",
diff --git a/addons/website_event_sale/tests/test_ui.py b/addons/website_event_sale/tests/test_ui.py
index 1ae1c7f2820..cad7ae99040 100644
--- a/addons/website_event_sale/tests/test_ui.py
+++ b/addons/website_event_sale/tests/test_ui.py
@@ -10,5 +10,4 @@ class TestUi(odoo.tests.HttpCase):
def test_demo(self):
self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('event_buy_tickets', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.event_buy_tickets", login="demo")
- def test_public(self):
- self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('event_buy_tickets', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.event_buy_tickets")
+ # TO DO - add public test with new address when convert to web.tour format.
diff --git a/addons/website_sale/static/src/js/website_sale_tour_buy.js b/addons/website_sale/static/src/js/website_sale_tour_buy.js
index 38212847fdb..03bcfe02921 100644
--- a/addons/website_sale/static/src/js/website_sale_tour_buy.js
+++ b/addons/website_sale/static/src/js/website_sale_tour_buy.js
@@ -57,27 +57,9 @@ Tour.register({
element: 'a[href="/shop/checkout"]',
},
{
- title: "test with input error",
- element: 'form[action="/shop/confirm_order"] .btn:contains("Confirm")',
- onload: function (tour) {
- $("input[name='phone']").val("");
- },
- },
- {
- 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) {
- if ($("input[name='name']").val() === "")
- $("input[name='name']").val("website_sale-test-shoptest");
- if ($("input[name='email']").val() === "")
- $("input[name='email']").val("website_sale_test_shoptest@websitesaletest.odoo.com");
- $("input[name='phone']").val("123");
- $("input[name='street2']").val("123");
- $("input[name='city']").val("123");
- $("input[name='zip']").val("123");
- $("select[name='country_id']").val("21");
- },
+ title: "Confirm checkout",
+ waitFor: "div.all_shipping .panel",
+ element: 'a[href="/shop/confirm_order"]',
},
{
title: "select payment",
diff --git a/addons/website_sale/tests/test_sale_process.py b/addons/website_sale/tests/test_sale_process.py
index b3ff03802b9..bcdf740385b 100644
--- a/addons/website_sale/tests/test_sale_process.py
+++ b/addons/website_sale/tests/test_sale_process.py
@@ -15,5 +15,4 @@ class TestUi(odoo.tests.HttpCase):
def test_03_demo_checkout(self):
self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('shop_buy_product', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.shop_buy_product", login="demo")
- def test_04_public_checkout(self):
- self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('shop_buy_product', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.shop_buy_product")
+ # TO DO - add public test with new address when convert to web.tour format.