| 1 |
|
| 2 |
|
| 3 |
from odoo import fields, tests |
| 4 |
from odoo.addons.website_slides.tests import test_ui_wslides |
| 5 |
|
| 6 |
|
| 7 |
@tests.common.tagged('post_install', '-at_install') |
| 8 |
class TestUiWebsiteSaleSlides(test_ui_wslides.TestUICommon): |
| 9 |
|
| 10 |
def setUp(self): |
| 11 |
super(TestUiWebsiteSaleSlides, self).setUp() |
| 12 |
self.course_product = self.env['product.product'].create({ |
| 13 |
'name': "Course Product", |
| 14 |
'standard_price': 100, |
| 15 |
'list_price': 150, |
| 16 |
'type': 'service', |
| 17 |
'invoice_policy': 'order', |
| 18 |
'is_published': True, |
| 19 |
}) |
| 20 |
|
| 21 |
self.channel.write({ |
| 22 |
'enroll': 'payment', |
| 23 |
'product_id': self.course_product.id, |
| 24 |
'visibility': 'connected', |
| 25 |
}) |
| 26 |
|
| 27 |
self.channel_partner_portal = self.env['slide.channel.partner'].create({ |
| 28 |
'channel_id': self.channel.id, |
| 29 |
'partner_id': self.user_portal.partner_id.id, |
| 30 |
'member_status': 'invited', |
| 31 |
'last_invitation_date': fields.Datetime.now(), |
| 32 |
}) |
| 33 |
self.portal_invite_url = self.channel_partner_portal.invitation_link |
| 34 |
|
| 35 |
def test_invited_on_payment_course_logged_connected(self): |
| 36 |
self.start_tour(self.portal_invite_url, 'invited_on_payment_course_logged', login='portal') |
| 37 |
|
| 38 |
def test_invited_on_payment_course_public_connected(self): |
| 39 |
self.start_tour(self.portal_invite_url, 'invited_on_payment_course_public', login=None) |