summaryrefslogtreecommitdiff
path: root/addons/test_website
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-09-13 18:07:59 +0200
committerChristophe Simonis <chs@odoo.com>2019-09-13 18:07:59 +0200
commit6c948c36bbf72dd896e0bff03aa7fbddadcbb0cd (patch)
treef8620905c011735d8a3c340c46d1417a54a75972 /addons/test_website
parent48503fcf08eac6fed12e080d4f501f9bbc8d257d (diff)
parent197474e5b9ad43ab2d587a98136a1a809ce9a2e7 (diff)
[MERGE] forward port branch saas-12.5 up to 197474e5b9a
Diffstat (limited to 'addons/test_website')
-rw-r--r--addons/test_website/__manifest__.py1
-rw-r--r--addons/test_website/controllers/main.py11
-rw-r--r--addons/test_website/data/test_website_data.xml2
-rw-r--r--addons/test_website/static/tests/tours/error_views.js25
4 files changed, 1 insertions, 38 deletions
diff --git a/addons/test_website/__manifest__.py b/addons/test_website/__manifest__.py
index e1bac638412..557722971d4 100644
--- a/addons/test_website/__manifest__.py
+++ b/addons/test_website/__manifest__.py
@@ -14,7 +14,6 @@ dependencies. Neither we want to add in website module some routes, views and
models which only purpose is to run tests.""",
'depends': [
'website',
- 'gamification',
],
'data': [
'views/templates.xml',
diff --git a/addons/test_website/controllers/main.py b/addons/test_website/controllers/main.py
index 0a8210881c7..ec94cbc3aee 100644
--- a/addons/test_website/controllers/main.py
+++ b/addons/test_website/controllers/main.py
@@ -7,8 +7,7 @@ import werkzeug
from odoo import http
from odoo.http import request
from odoo.addons.portal.controllers.web import Home
-from odoo.exceptions import UserError, ValidationError, AccessError, MissingError, AccessError, AccessDenied
-from odoo.addons.gamification.models.gamification_karma_rank import KarmaError
+from odoo.exceptions import UserError, ValidationError, AccessError, MissingError, AccessDenied
class WebsiteTest(Home):
@@ -81,14 +80,6 @@ class WebsiteTest(Home):
def test_missing_error_http(self, **kwargs):
raise MissingError("This is a missing http test")
- @http.route('/test_karma_error_json', type='json', auth='public', website=True)
- def test_karma_error_rpc(self, **kwargs):
- raise KarmaError("This is a karma rpc test")
-
- @http.route('/test_karma_error_http', type='http', auth='public', website=True)
- def test_karma_error_http(self, **kwargs):
- raise KarmaError("This is a karma http test")
-
@http.route('/test_internal_error_json', type='json', auth='public', website=True)
def test_internal_error_json(self, **kwargs):
raise werkzeug.exceptions.InternalServerError()
diff --git a/addons/test_website/data/test_website_data.xml b/addons/test_website/data/test_website_data.xml
index 37a0949f0bb..4327bf597f8 100644
--- a/addons/test_website/data/test_website_data.xml
+++ b/addons/test_website/data/test_website_data.xml
@@ -45,7 +45,6 @@
<li class="list-group-item"><a href="/test_user_error_http">http UserError (400)</a></li>
<li class="list-group-item"><a href="/test_validation_error_http">http ValidationError (400)</a></li>
<li class="list-group-item"><a href="/test_missing_error_http">http MissingError (400)</a></li>
- <li class="list-group-item"><a href="/test_karma_error_http">http KarmaError (400)</a></li>
<li class="list-group-item"><a href="/test_access_error_http">http AccessError (403)</a></li>
<li class="list-group-item"><a href="/test_access_denied_http">http AccessDenied (403)</a></li>
<li class="list-group-item"><a href="/test_internal_error_http">http InternalServerError (500)</a></li>
@@ -56,7 +55,6 @@
<li class="list-group-item"><a href="/test_user_error_json">rpc UserError</a></li>
<li class="list-group-item"><a href="/test_validation_error_json">rpc ValidationError</a></li>
<li class="list-group-item"><a href="/test_missing_error_json">rpc MissingError</a></li>
- <li class="list-group-item"><a href="/test_karma_error_json">rpc KarmaError</a></li>
<li class="list-group-item"><a href="/test_access_error_json">rpc AccessError</a></li>
<li class="list-group-item"><a href="/test_access_denied_json">rpc AccessDenied</a></li>
<li class="list-group-item list-group-item-primary"><h2>rpc Errors</h2></li>
diff --git a/addons/test_website/static/tests/tours/error_views.js b/addons/test_website/static/tests/tours/error_views.js
index 8adb470d505..0d0d4961ea8 100644
--- a/addons/test_website/static/tests/tours/error_views.js
+++ b/addons/test_website/static/tests/tours/error_views.js
@@ -45,13 +45,6 @@ tour.register('test_error_website', {
extra_trigger: 'div.toast-body:contains("This is an access denied rpc test")',
trigger: 'button.o_notification_close',
}, {
- content: "trigger rpc missing error",
- trigger: 'a[href="/test_karma_error_json"]',
- }, {
- content: "rpc missing error modal has message",
- extra_trigger: 'div.toast-body:contains("This is a karma rpc test")',
- trigger: 'button.o_notification_close',
- }, {
content: "trigger rpc error 500",
trigger: 'a[href="/test_internal_error_json"]',
}, {
@@ -136,24 +129,6 @@ tour.register('test_error_website', {
content: "http missing error page debug has traceback closed",
trigger: 'body:has(div#error_traceback.collapse:not(.show) pre#exception_traceback)',
run: function () {
- window.location.href = window.location.origin + '/test_karma_error_http?debug=0';
- },
- }, {
- content: "http karma error page has title and message",
- extra_trigger: 'h1:contains("Something went wrong.")',
- trigger: 'div.container pre:contains("This is a karma http test")',
- run: function () {
- window.location.href = window.location.origin + '/test_karma_error_http?debug=1';
- },
- }, {
- content: "http karma error page debug has title and message open",
- extra_trigger: 'h1:contains("Something went wrong.")',
- trigger: 'div#error_main.collapse.show pre:contains("This is a karma http test")',
- run: function () {},
- }, {
- content: "http karma error page debug has traceback closed",
- trigger: 'body:has(div#error_traceback.collapse:not(.show) pre#exception_traceback)',
- run: function () {
window.location.href = window.location.origin + '/test_access_denied_http?debug=0';
},
}, {