mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
test(editor): Add more workflow actions tests (#4799)
* ⚡ Making workflow actions tests skip setup, changing suite number * 🔥 Removing unnecessary imports and vars * ✅ Adding workflow tags and copy/paste tests * ✅ Added tests for copying and pasting nodes * Update cypress/support/commands.ts Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👌 Moving paste data to fixtures Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
committed by
GitHub
parent
1b7952a516
commit
e07e32f14d
@@ -128,3 +128,15 @@ Cypress.Commands.add('resetAll', () => {
|
||||
Cypress.Commands.add('setupOwner', (payload) => {
|
||||
cy.task('setup-owner', payload);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('paste', { prevSubject: true }, (selector, pastePayload) => {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event
|
||||
cy.wrap(selector).then($destination => {
|
||||
const pasteEvent = Object.assign(new Event('paste', { bubbles: true, cancelable: true }), {
|
||||
clipboardData: {
|
||||
getData: () => pastePayload
|
||||
}
|
||||
});
|
||||
$destination[0].dispatchEvent(pasteEvent);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user