summaryrefslogtreecommitdiff
path: root/addons/test_website/static/tests/tours/json_auth.js
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/test_website/static/tests/tours/json_auth.js
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/test_website/static/tests/tours/json_auth.js')
-rw-r--r--addons/test_website/static/tests/tours/json_auth.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/addons/test_website/static/tests/tours/json_auth.js b/addons/test_website/static/tests/tours/json_auth.js
new file mode 100644
index 00000000..ba89bed4
--- /dev/null
+++ b/addons/test_website/static/tests/tours/json_auth.js
@@ -0,0 +1,26 @@
+odoo.define('test_website.json_auth', function (require) {
+'use strict';
+
+var tour = require('web_tour.tour');
+var session = require('web.session')
+
+tour.register('test_json_auth', {
+ test: true,
+}, [{
+ trigger: 'body',
+ run: async function () {
+ await session.rpc('/test_get_dbname').then( function (result){
+ return session.rpc("/web/session/authenticate", {
+ db: result,
+ login: 'admin',
+ password: 'admin'
+ });
+ });
+ window.location.href = window.location.origin;
+ },
+}, {
+ trigger: 'span:contains(Mitchell Admin), span:contains(Administrator)',
+ run: function () {},
+}
+]);
+});