# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import tests from odoo.addons.base.tests.common import HttpCaseWithUserDemo from odoo.addons.website_livechat.tests.common import TestLivechatCommon @tests.tagged('post_install', '-at_install') class TestLivechatRequestHttpCase(HttpCaseWithUserDemo, TestLivechatCommon): def test_livechat_request_complete_flow(self): self._clean_livechat_sessions() # Send first chat request - Open chat from operator side channel_1 = self._common_chat_request_flow() # Visitor Rates the conversation (Good) self._send_rating(channel_1, self.visitor, 5) # Operator Re-Send a chat request channel_2 = self._common_chat_request_flow() # Visitor Rates the conversation (Bad) self._send_rating(channel_2, self.visitor, 1, "Stop bothering me! I hate you