Debian Codegraph @

addons/test_website/static/tests/tours/json_auth.js

raw
1 import { registry } from "@web/core/registry";
2 import { rpc } from "@web/core/network/rpc";
3
4 registry.category("web_tour.tours").add('test_json_auth', {
5 steps: () => [{
6 trigger: 'body',
7 run: async function () {
8 await rpc('/test_get_dbname').then( function (result){
9 return rpc("/web/session/authenticate", {
10 db: result,
11 login: 'admin',
12 password: 'admin'
13 });
14 });
15 window.location.href = window.location.origin;
16 },
17 expectUnloadPage: true,
18 }, {
19 trigger: 'span:contains(Mitchell Admin), span:contains(Administrator)',
20 }
21 ]});