mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-30 18:07:20 +00:00
* Add CSA for table * Add CSA for button * Add CSA for textinput * Remove it.only * Add CSA for text * Add CSA for modal * Add CSA for multiselect * Add CSA fix for text input
34 lines
1 KiB
JavaScript
34 lines
1 KiB
JavaScript
export const selectEvent = (event, action) => {
|
|
cy.get('[data-cy="add-event-handler"]').click();
|
|
cy.get('[data-cy="event-handler"]').eq(0).click();
|
|
cy.get('[data-cy="event-selection"]')
|
|
.click()
|
|
.find("input")
|
|
.type(`{selectAll}{backspace}${event}{enter}`);
|
|
cy.get('[data-cy="action-selection"]')
|
|
.click()
|
|
.find("input")
|
|
.type(`{selectAll}{backspace}${action}{enter}`);
|
|
};
|
|
|
|
export const selectCSA = (
|
|
component,
|
|
componentAction,
|
|
debounce = `{selectAll}{backspace}`
|
|
) => {
|
|
cy.get('[data-cy="action-options-component-selection-field"]')
|
|
.click()
|
|
.find("input")
|
|
.type(`{selectAll}{backspace}${component}{enter}`);
|
|
cy.get('[data-cy="action-options-action-selection-field"]')
|
|
.click()
|
|
.find("input")
|
|
.type(`{selectAll}{backspace}${componentAction}{enter}`);
|
|
cy.get('[data-cy="-input-field"]').type(
|
|
`{selectAll}{backspace}${debounce}{enter}`
|
|
);
|
|
};
|
|
|
|
export const addSupportCSAData = (field, data) => {
|
|
cy.get(`[data-cy="${field}-input-field"]`).clearAndTypeOnCodeMirror(data);
|
|
};
|