Ver código fonte

fix: Keep checkbox checked after updating checked rows (#14110)

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
version-14
Shariq Ansari 3 anos atrás
committed by GitHub
pai
commit
33aa4c2372
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
2 arquivos alterados com 23 adições e 1 exclusões
  1. +22
    -1
      cypress/integration/list_view.js
  2. +1
    -0
      frappe/public/js/frappe/list/list_view.js

+ 22
- 1
cypress/integration/list_view.js Ver arquivo

@@ -6,6 +6,28 @@ context('List View', () => {
return frappe.xcall("frappe.tests.ui_test_helpers.setup_workflow");
});
});

it('Keep checkbox checked after Bulk Update', () => {
cy.go_to_list('ToDo');
cy.get('.list-row-container .list-row-checkbox').click({ multiple: true, force: true });
cy.get('.actions-btn-group button').contains('Actions').should('be.visible').click();
cy.get('.dropdown-menu li:visible .dropdown-item .menu-item-label[data-label="Edit"]').click();

cy.get('.modal-body .form-control[data-fieldname="field"]').first().select('Due Date').wait(200);
cy.get('.modal-body .frappe-control[data-fieldname="value"] input:visible').first().focus();
cy.get('.datepickers-container .datepicker.active').should('be.visible');

cy.get('.datepickers-container .datepicker.active .datepicker--cell-day.-current-').click({force: true});
cy.get('.modal-body .frappe-control[data-fieldname="value"] input:visible').first().focus();
cy.get('.datepickers-container .datepicker.active .datepicker--cell-day.-current-').click({force: true});

cy.get('.modal-footer .standard-actions .btn-primary').click();
cy.wait(500);

cy.get('.actions-btn-group button').contains('Actions').should('be.visible').click();
cy.get('.list-row-container .list-row-checkbox:checked').should('be.visible');
});

it('enables "Actions" button', () => {
const actions = ['Approve', 'Reject', 'Edit', 'Export', 'Assign To', 'Apply Assignment Rule', 'Add Tags', 'Print', 'Delete'];
cy.go_to_list('ToDo');
@@ -30,4 +52,3 @@ context('List View', () => {
});
});
});


+ 1
- 0
frappe/public/js/frappe/list/list_view.js Ver arquivo

@@ -572,6 +572,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {

render() {
this.render_list();
this.set_rows_as_checked();
this.on_row_checked();
this.render_count();
}


Carregando…
Cancelar
Salvar