2021-12-05 15:03:29 +00:00
|
|
|
export function updatePlugin(id, name, value) {
|
|
|
|
const mutation = `mutation{
|
|
|
|
pluginUpdate(id:"${id}", input:{
|
|
|
|
configuration:{
|
|
|
|
name:"${name}"
|
|
|
|
value:"${value}"
|
|
|
|
}
|
|
|
|
}){
|
|
|
|
errors{
|
|
|
|
field
|
|
|
|
message
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`;
|
|
|
|
return cy.sendRequestWithQuery(mutation);
|
|
|
|
}
|
2022-10-27 09:40:33 +00:00
|
|
|
|
|
|
|
export function activatePlugin({ id, channel, active = true }) {
|
|
|
|
const channelLine = channel ? `channelId: "${channel}"` : "";
|
|
|
|
|
|
|
|
const mutation = `mutation{
|
|
|
|
pluginUpdate(id: "${id}" ${channelLine} input:{
|
|
|
|
active:${active}
|
|
|
|
}){
|
|
|
|
errors{
|
|
|
|
field
|
|
|
|
message
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`;
|
|
|
|
return cy.sendRequestWithQuery(mutation);
|
|
|
|
}
|