mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-21 04:32:07 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
48
odoo-bringout-oca-ocb-mail/mail/tests/discuss/test_ui.py
Normal file
48
odoo-bringout-oca-ocb-mail/mail/tests/discuss/test_ui.py
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import odoo.tests
|
||||
from odoo import Command
|
||||
from odoo.addons.base.tests.common import HttpCaseWithUserDemo, new_test_user
|
||||
|
||||
|
||||
@odoo.tests.tagged('post_install', '-at_install')
|
||||
class TestUi(HttpCaseWithUserDemo):
|
||||
|
||||
def test_01_mail_tour(self):
|
||||
self.start_tour("/odoo", 'discuss_channel_tour', login="admin")
|
||||
|
||||
def test_02_mail_create_channel_no_mail_tour(self):
|
||||
self.env['res.users'].create({
|
||||
'email': '', # User should be able to create a channel even if no email is defined
|
||||
'group_ids': [Command.set([self.ref('base.group_user')])],
|
||||
'name': 'Test User',
|
||||
'login': 'testuser',
|
||||
'password': 'testuser',
|
||||
})
|
||||
self.start_tour("/odoo", 'discuss_channel_tour', login='testuser')
|
||||
|
||||
# basic rendering test of the configuration menu in Discuss
|
||||
def test_03_mail_discuss_configuration_tour(self):
|
||||
self.start_tour("/odoo", "discuss_configuration_tour", login="admin")
|
||||
|
||||
def test_04_meeting_view_tour(self):
|
||||
bob = new_test_user(self.env, "bob", groups="base.group_user", email="bob@test.com")
|
||||
john = new_test_user(self.env, "john", groups="base.group_user", email="john@test.com")
|
||||
group_chat = (
|
||||
self.env["discuss.channel"]
|
||||
.with_user(bob)
|
||||
._create_group(
|
||||
partners_to=john.partner_id.ids, default_display_mode="video_full_screen"
|
||||
)
|
||||
)
|
||||
self.authenticate("bob", "bob")
|
||||
self.make_jsonrpc_request("/mail/rtc/channel/join_call", {"channel_id": group_chat.id})
|
||||
self.start_tour(
|
||||
f"/odoo/discuss?active_id=discuss.channel_{group_chat.id}&fullscreen=1",
|
||||
"discuss.meeting_view_tour",
|
||||
login="john",
|
||||
)
|
||||
self.start_tour(group_chat.invitation_url, "discuss.meeting_view_public_tour", login="john")
|
||||
|
||||
def test_05_can_create_channel_tour(self):
|
||||
self.start_tour("odoo/discuss", "can_create_channel_from_form_view", login="demo")
|
||||
Loading…
Add table
Add a link
Reference in a new issue