From fc4e2780bd1e82f22d91920d50abbd7f11b8b379 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 19 Apr 2022 16:49:34 +0530 Subject: [PATCH] chore: pretty logging for dialog command --- cypress/support/commands.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index ec24212f01..026c622e78 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -241,8 +241,20 @@ Cypress.Commands.add('clear_cache', () => { }); Cypress.Commands.add('dialog', opts => { - return cy.window().then(win => { - var d = new win.frappe.ui.Dialog(opts); + return cy.window({ log: false }).its('frappe', { log: false }).then(frappe => { + Cypress.log({ + name: "dialog", + displayName: "dialog", + message: 'frappe.ui.Dialog', + consoleProps: () => { + return { + options: opts, + dialog: d + } + } + }); + + var d = new frappe.ui.Dialog(opts); d.show(); return d; });