瀏覽代碼

chore: pretty logging for dialog command

version-14
Faris Ansari 3 年之前
父節點
當前提交
fc4e2780bd
共有 1 個文件被更改,包括 14 次插入2 次删除
  1. +14
    -2
      cypress/support/commands.js

+ 14
- 2
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;
});


Loading…
取消
儲存