fix: pass fields as array in cypress dialog
This commit is contained in:
parent
e6c6aeb98e
commit
b5d1a3aa18
2 changed files with 5 additions and 7 deletions
|
|
@ -5,10 +5,10 @@ context('Rating Control', () => {
|
|||
|
||||
it('click on the star rating to record value', () => {
|
||||
cy.visit('/desk');
|
||||
cy.dialog('Rating', {
|
||||
cy.dialog('Rating', [{
|
||||
'fieldname': 'rate',
|
||||
'fieldtype': 'Rating',
|
||||
}).as('dialog');
|
||||
}]).as('dialog');
|
||||
|
||||
cy.get('div.rating')
|
||||
.children('i.fa')
|
||||
|
|
@ -23,10 +23,10 @@ context('Rating Control', () => {
|
|||
|
||||
it('hover on the star', () => {
|
||||
cy.visit('/desk');
|
||||
cy.dialog('Rating', {
|
||||
cy.dialog('Rating', [{
|
||||
'fieldname': 'rate',
|
||||
'fieldtype': 'Rating',
|
||||
});
|
||||
}]);
|
||||
cy.get('div.rating')
|
||||
.children('i.fa')
|
||||
.first()
|
||||
|
|
|
|||
|
|
@ -66,9 +66,7 @@ Cypress.Commands.add('dialog', (title, fields) => {
|
|||
cy.window().then(win => {
|
||||
var d = new win.frappe.ui.Dialog({
|
||||
title: title,
|
||||
fields: [
|
||||
fields
|
||||
],
|
||||
fields: fields,
|
||||
primary_action: function(){
|
||||
d.hide();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue