test: Add assert statement for value
This commit is contained in:
parent
9ce7f6c6ab
commit
7cf5dee097
3 changed files with 17 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
export default {
|
||||
name: 'Custom Submittable Doctype',
|
||||
name: 'Custom Submittable DocType',
|
||||
custom: 1,
|
||||
actions: [],
|
||||
is_submittable: 1,
|
||||
|
|
@ -41,7 +41,9 @@ export default {
|
|||
read: 1,
|
||||
role: 'System Manager',
|
||||
share: 1,
|
||||
write: 1
|
||||
write: 1,
|
||||
submit: 1,
|
||||
cancel: 1
|
||||
}
|
||||
],
|
||||
quick_entry: 1,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ context('Report View', () => {
|
|||
'enabled': 0,
|
||||
// submit document
|
||||
'docstatus': 1
|
||||
}, true);
|
||||
}, true).as('doc');
|
||||
|
||||
});
|
||||
it('Field with enabled allow_on_submit should be editable.', () => {
|
||||
|
|
@ -25,5 +25,16 @@ context('Report View', () => {
|
|||
cell.find('input[data-fieldname="enabled"]').check({force: true});
|
||||
cy.get('.dt-row-0 > .dt-cell--col-4').click();
|
||||
cy.wait('@value-update');
|
||||
cy.get('@doc').then(doc => {
|
||||
cy.call('frappe.client.get_value', {
|
||||
doctype: doc.doctype,
|
||||
filters: {
|
||||
name: doc.name,
|
||||
},
|
||||
fieldname: 'enabled'
|
||||
}).then(r => {
|
||||
expect(r.message.enabled).to.equals(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -207,7 +207,7 @@ Cypress.Commands.add('insert_doc', (doctype, args, ignore_duplicate) => {
|
|||
status_codes.push(409);
|
||||
}
|
||||
expect(res.status).to.be.oneOf(status_codes);
|
||||
return res.body;
|
||||
return res.body.data;
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue