oca-ocb-test/odoo-bringout-oca-ocb-test_website/test_website/static/tests/tours/json_auth.js
Ernad Husremovic d9452d2060 19.0 vanilla
2026-03-09 09:32:39 +01:00

21 lines
640 B
JavaScript

import { registry } from "@web/core/registry";
import { rpc } from "@web/core/network/rpc";
registry.category("web_tour.tours").add('test_json_auth', {
steps: () => [{
trigger: 'body',
run: async function () {
await rpc('/test_get_dbname').then( function (result){
return rpc("/web/session/authenticate", {
db: result,
login: 'admin',
password: 'admin'
});
});
window.location.href = window.location.origin;
},
expectUnloadPage: true,
}, {
trigger: 'span:contains(Mitchell Admin), span:contains(Administrator)',
}
]});