Merge pull request #8787 from netchampfaris/fix-listview-actions-test

test: More robust Listview Actions test
This commit is contained in:
mergify[bot] 2019-11-12 06:49:40 +00:00 committed by GitHub
commit b882f72f8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View file

@ -28,14 +28,12 @@ context('Control Link', () => {
cy.server();
cy.route('POST', '/api/method/frappe.desk.search.search_link').as('search_link');
cy.get('.frappe-control[data-fieldname=link] input')
.focus()
.type('todo for li')
.type('n', { delay: 600 })
.type('k', { delay: 700 });
cy.get('.frappe-control[data-fieldname=link] input').focus().as('input');
cy.wait('@search_link');
cy.get('@input').type('todo for link');
cy.wait('@search_link');
cy.get('.frappe-control[data-fieldname=link] ul').should('be.visible');
cy.get('.frappe-control[data-fieldname=link] input').type('{downarrow}{enter}', { delay: 100 });
cy.get('.frappe-control[data-fieldname=link] input').type('{enter}', { delay: 100 });
cy.get('.frappe-control[data-fieldname=link] input').blur();
cy.get('@dialog').then(dialog => {
cy.get('@todos').then(todos => {
@ -45,7 +43,7 @@ context('Control Link', () => {
});
});
it.only('should unset invalid value', () => {
it('should unset invalid value', () => {
get_dialog_with_link().as('dialog');
cy.server();

View file

@ -10,7 +10,7 @@ context('List View', () => {
it('enables "Actions" button', () => {
const actions = ['Approve', 'Reject', 'Edit', 'Assign To', 'Apply Assignment Rule', 'Print', 'Delete'];
cy.go_to_list('ToDo');
cy.get('.level-item.list-row-checkbox.hidden-xs').click({ multiple: true, force: true });
cy.get('.list-row-container:contains("Pending") .list-row-checkbox').click({ multiple: true, force: true });
cy.get('.btn.btn-primary.btn-sm.dropdown-toggle').contains('Actions').should('be.visible').click();
cy.get('.dropdown-menu li:visible').should('have.length', 7).each((el, index) => {
cy.wrap(el).contains(actions[index]);