|
|
@ -39,30 +39,31 @@ let cn = [ "Name", "Notes", "Status", "Tags", "Done", "Date", "Phone", |
|
|
|
"Actor", "Status (from Actor)", "RollUp", "Computation", "Producer" ] |
|
|
|
"Actor", "Status (from Actor)", "RollUp", "Computation", "Producer" ] |
|
|
|
|
|
|
|
|
|
|
|
function openWebhook(index) { |
|
|
|
function openWebhook(index) { |
|
|
|
cy.get(".nc-btn-webhook").should("exist").click(); |
|
|
|
cy.get('.nc-actions-menu-btn').should('exist').click(); |
|
|
|
cy.get(".nc-hook").eq(index).click({ force: true }); |
|
|
|
cy.getActiveMenu().find('.ant-dropdown-menu-title-content').contains('Webhooks').click() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cy.get(".nc-hook").eq(index).click(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// to be invoked after open
|
|
|
|
// to be invoked after open
|
|
|
|
function verifyWebhook(config) { |
|
|
|
function verifyWebhook(config) { |
|
|
|
cy.get(".nc-text-field-hook-title") |
|
|
|
cy.get(".nc-text-field-hook-title").then(($element) => { |
|
|
|
.find('input').then(($element) => { |
|
|
|
|
|
|
|
expect($element[0].value).to.have.string(config.title) |
|
|
|
expect($element[0].value).to.have.string(config.title) |
|
|
|
}) |
|
|
|
}) |
|
|
|
cy.get(".nc-text-field-hook-event") |
|
|
|
cy.get(".nc-text-field-hook-event") |
|
|
|
.find('.v-select__selection') |
|
|
|
.find('.ant-select-selection-item') |
|
|
|
.contains(config.event) |
|
|
|
.contains(config.event) |
|
|
|
.should('exist') |
|
|
|
.should('exist') |
|
|
|
cy.get(".nc-text-field-hook-notification-type") |
|
|
|
cy.get(".nc-select-hook-notification-type") |
|
|
|
.find('.v-select__selection') |
|
|
|
.find('.ant-select-selection-item') |
|
|
|
.contains(config.notification) |
|
|
|
.contains(config.notification) |
|
|
|
.should('exist') |
|
|
|
.should('exist') |
|
|
|
cy.get('.nc-select-hook-url-method') |
|
|
|
cy.get('.nc-select-hook-url-method') |
|
|
|
.find('.v-select__selection') |
|
|
|
.find('.ant-select-selection-item') |
|
|
|
.contains(config.type) |
|
|
|
.contains(config.type) |
|
|
|
.should('exist') |
|
|
|
.should('exist') |
|
|
|
cy.get(".nc-text-field-hook-url-path") |
|
|
|
cy.get(".nc-text-field-hook-url-path") |
|
|
|
.find('input').then(($element) => { |
|
|
|
.then(($element) => { |
|
|
|
expect($element[0].value).to.have.string(config.url) |
|
|
|
expect($element[0].value).to.have.string(config.url) |
|
|
|
}) |
|
|
|
}) |
|
|
|
cy.get(".nc-icon-hook-navigate-left").click({force:true}) |
|
|
|
cy.get(".nc-icon-hook-navigate-left").click({force:true}) |
|
|
|