Bug 38993: Fix sysprefs fetch from cypress
Conflict between bug 38993 and bug 36025 We pass the token in the header, and retrieve it from the meta tag. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
cfb5d05ed9
commit
2fc1b5f825
|
|
@ -14,10 +14,9 @@ export class SysprefAPIClient {
|
|||
update: (variable, value) =>
|
||||
this.httpClient.post({
|
||||
endpoint: "",
|
||||
body: "pref_%s=%s&csrf_token=%s".format(
|
||||
body: "pref_%s=%s".format(
|
||||
encodeURIComponent(variable),
|
||||
encodeURIComponent(value),
|
||||
csrf_token
|
||||
encodeURIComponent(value)
|
||||
),
|
||||
headers: {
|
||||
"Content-Type":
|
||||
|
|
|
|||
|
|
@ -1818,7 +1818,7 @@ mysql.addCommands();
|
|||
|
||||
Cypress.Commands.add("set_syspref", (variable, value) => {
|
||||
cy.window().then(win => {
|
||||
const client = win.APIClient.syspref;
|
||||
const client = win.APIClient.sysprefs;
|
||||
return client.sysprefs.update(variable, value);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue