Merge pull request #16791 from rmehta/fix-control-test
test: Fixes `control_dynamic_link` test
This commit is contained in:
commit
a59e5d7aac
1 changed files with 8 additions and 3 deletions
|
|
@ -62,8 +62,8 @@ context('Dynamic Link', () => {
|
|||
"label": "Document ID",
|
||||
"fieldname": "doc_id",
|
||||
"fieldtype": "Dynamic Link",
|
||||
"get_options": () => {
|
||||
return "User";
|
||||
"get_options": () => {
|
||||
return "User";
|
||||
},
|
||||
"in_list_view": 1,
|
||||
}]
|
||||
|
|
@ -118,11 +118,16 @@ context('Dynamic Link', () => {
|
|||
cy.get_field('doc_type').clear();
|
||||
|
||||
//Entering System Settings in the Doctype field
|
||||
cy.intercept('/api/method/frappe.desk.search.search_link').as('search_query');
|
||||
cy.fill_field('doc_type', 'System Settings', 'Link', {delay: 500});
|
||||
cy.wait('@search_query');
|
||||
cy.get(`[data-fieldname="doc_type"] ul:visible li:first-child`)
|
||||
.click({scrollBehavior: false});
|
||||
|
||||
cy.get_field('doc_id').click();
|
||||
|
||||
//Checking if the system throws error
|
||||
cy.get('.modal-title').should('have.text', 'Error');
|
||||
cy.get('.msgprint').should('have.text', 'System Settings is not a valid DocType for Dynamic Link');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue