You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 rivejä
904 B

  1. context('Dynamic Link', () => {
  2. before(() => {
  3. cy.login();
  4. cy.visit('/app/doctype');
  5. return cy.window().its('frappe').then(frappe => {
  6. return frappe.xcall('frappe.tests.ui_test_helpers.create_doctype', {
  7. name: 'Test Dynamic Link',
  8. fields: [
  9. {
  10. "label": "Document Type",
  11. "fieldname": "doc_type",
  12. "fieldtype": "Link",
  13. "options": "DocType",
  14. "in_list_view": 1,
  15. },
  16. {
  17. "label": "Document ID",
  18. "fieldname": "doc_id",
  19. "fieldtype": "Dynamic Link",
  20. "options": "doc_type",
  21. "in_list_view": 1,
  22. },
  23. ]
  24. });
  25. });
  26. });
  27. it('Creating a dynamic link and verifying it', () => {
  28. cy.new_form('Test Dynamic Link');
  29. cy.get('form > [data-fieldname="doc_type"]').type('User');
  30. cy.get('form > [data-fieldname="doc_id"]').click();
  31. cy.get('[id="awesomplete_list_4"]').its('length').should('be.gte', 0);
  32. });
  33. });