mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
af3ac2db28
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
21 lines
499 B
TypeScript
21 lines
499 B
TypeScript
/**
|
|
* Actions
|
|
*/
|
|
|
|
export function vistDemoPage(theme?: 'dark' | 'light') {
|
|
const query = theme ? `?theme=${theme}` : '';
|
|
cy.visit('/workflows/demo' + query);
|
|
cy.waitForLoad();
|
|
cy.window().then((win) => {
|
|
win.preventNodeViewBeforeUnload = true;
|
|
});
|
|
}
|
|
|
|
export function importWorkflow(workflow: object) {
|
|
const OPEN_WORKFLOW = { command: 'openWorkflow', workflow };
|
|
cy.window().then(($window) => {
|
|
const message = JSON.stringify(OPEN_WORKFLOW);
|
|
$window.postMessage(message, '*');
|
|
});
|
|
}
|