New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@processmaker/cypress-utils

Package Overview
Dependencies
Maintainers
0
Versions
409
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@processmaker/cypress-utils - npm Package Compare versions

Comparing version 1.0.362 to 1.0.363

2

package.json
{
"name": "@processmaker/cypress-utils",
"version": "1.0.362",
"version": "1.0.363",
"description": "ProcessMaker Cypress Testing Utilities",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -349,2 +349,42 @@ import selectors from "#selectors/dataConnectors";

}
getDataSourceByNameAPI(dataSourceName){
return cy.window().then(win => {
return win.ProcessMaker.apiClient.get('/data_sources', { params: { filter: dataSourceName} }).then(response => {
const dc = response.data.data.find(dc => dc.name === dataSourceName);
//console.log('DC-id: ', dc.id);
// return cy.wrap(user);
return dc;
});
});
}
createDataSourceAPI(payload, ignoreTakenError){
return cy.window().then(win => {
return win.ProcessMaker.apiClient.post('/data_sources', payload)
.then(response => {
console.log("Created DC: ", response.data);
// return cy.wrap(response.data.data);
return response.data.data;
})
.catch(err => {
if (
ignoreTakenError &&
err.response.data.message.toLowerCase() === 'the name has already been taken.') {
return this.getDataSourceByNameAPI(payload.name);
} else {
throw err;
}
});
});
}
deleteDataSourceAPI(dc_id){
return cy.window().then(win => {
return win.ProcessMaker.apiClient.delete('/data_sources/'+dc_id).then(response => {
console.log(JSON.stringify(response));
return "data source: " + dc_id + " was deleted";
});
});
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc