Browse Source

Merge pull request #16317 from shariquerik/list-paging-test-fix

test: failing list_paging UI test
version-14
mergify[bot] 3 years ago
committed by GitHub
parent
commit
0374e1511f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions
  1. +3
    -0
      cypress/integration/list_paging.js
  2. +6
    -5
      frappe/tests/ui_test_helpers.py

+ 3
- 0
cypress/integration/list_paging.js View File

@@ -31,5 +31,8 @@ context('List Paging', () => {
cy.get('.list-paging-area .btn-group .btn-paging[data-value="500"]').click();

cy.get('.list-paging-area .list-count').should('contain.text', '500 of');
cy.get('.list-paging-area .btn-more').click();

cy.get('.list-paging-area .list-count').should('contain.text', '1000 of');
});
});

+ 6
- 5
frappe/tests/ui_test_helpers.py View File

@@ -136,13 +136,14 @@ def create_contact_records():

@frappe.whitelist()
def create_multiple_todo_records():
values = []
if frappe.db.get_all('ToDo', {'description': 'Multiple ToDo 1'}):
return
for index in range(501):
frappe.get_doc({
'doctype': 'ToDo',
'description': 'Multiple ToDo {}'.format(index+1)
}).insert()
for index in range(1, 1002):
values.append(('100{}'.format(index), 'Multiple ToDo {}'.format(index)))
frappe.db.bulk_insert('ToDo', fields=['name', 'description'], values=set(values))

def insert_contact(first_name, phone_number):
doc = frappe.get_doc({


Loading…
Cancel
Save