summaryrefslogtreecommitdiff
path: root/addons/website_sale_wishlist/tests
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website_sale_wishlist/tests')
-rw-r--r--addons/website_sale_wishlist/tests/__init__.py1
-rw-r--r--addons/website_sale_wishlist/tests/test_wishlist_process.py63
2 files changed, 64 insertions, 0 deletions
diff --git a/addons/website_sale_wishlist/tests/__init__.py b/addons/website_sale_wishlist/tests/__init__.py
new file mode 100644
index 00000000..c19627a9
--- /dev/null
+++ b/addons/website_sale_wishlist/tests/__init__.py
@@ -0,0 +1 @@
+from . import test_wishlist_process
diff --git a/addons/website_sale_wishlist/tests/test_wishlist_process.py b/addons/website_sale_wishlist/tests/test_wishlist_process.py
new file mode 100644
index 00000000..dc995eda
--- /dev/null
+++ b/addons/website_sale_wishlist/tests/test_wishlist_process.py
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+import odoo.tests
+
+
+@odoo.tests.tagged('-at_install', 'post_install')
+class TestUi(odoo.tests.HttpCase):
+ def test_01_wishlist_tour(self):
+
+ self.env['product.template'].search([]).write({'website_published': False})
+ # Setup attributes and attributes values
+ self.product_attribute_1 = self.env['product.attribute'].create({
+ 'name': 'Legs',
+ 'sequence': 10,
+ })
+ product_attribute_value_1 = self.env['product.attribute.value'].create({
+ 'name': 'Steel',
+ 'attribute_id': self.product_attribute_1.id,
+ 'sequence': 1,
+ })
+ product_attribute_value_2 = self.env['product.attribute.value'].create({
+ 'name': 'Aluminium',
+ 'attribute_id': self.product_attribute_1.id,
+ 'sequence': 2,
+ })
+ product_attribute_2 = self.env['product.attribute'].create({
+ 'name': 'Color',
+ 'sequence': 20,
+ })
+ product_attribute_value_3 = self.env['product.attribute.value'].create({
+ 'name': 'White',
+ 'attribute_id': product_attribute_2.id,
+ 'sequence': 1,
+ })
+ product_attribute_value_4 = self.env['product.attribute.value'].create({
+ 'name': 'Black',
+ 'attribute_id': product_attribute_2.id,
+ 'sequence': 2,
+ })
+
+ # Create product template
+ self.product_product_4_product_template = self.env['product.template'].create({
+ 'name': 'Customizable Desk (TEST)',
+ 'standard_price': 500.0,
+ 'list_price': 750.0,
+ 'website_published': True,
+ })
+
+ # Generate variants
+ self.env['product.template.attribute.line'].create([{
+ 'product_tmpl_id': self.product_product_4_product_template.id,
+ 'attribute_id': self.product_attribute_1.id,
+ 'value_ids': [(4, product_attribute_value_1.id), (4, product_attribute_value_2.id)],
+ }, {
+ 'product_tmpl_id': self.product_product_4_product_template.id,
+ 'attribute_id': product_attribute_2.id,
+ 'value_ids': [(4, product_attribute_value_3.id), (4, product_attribute_value_4.id)],
+
+ }])
+
+ self.env.ref('base.user_admin').name = 'Mitchell Admin'
+
+ self.start_tour("/", 'shop_wishlist')