test: Fix flaky tests in list_view.js, navigation.js

This commit is contained in:
MitulDavid 2021-09-29 13:34:53 +05:30
parent 58b3cdeb9a
commit 400a604f2e
2 changed files with 2 additions and 6 deletions

View file

@ -14,12 +14,7 @@ context('List View', () => {
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.fill_field('value', '09-28-21', 'Date');
cy.get('.modal-footer .standard-actions .btn-primary').click();
cy.wait(500);

View file

@ -13,6 +13,7 @@ context('Navigation', () => {
it.only('Navigate to previous page after login', () => {
cy.visit('/app/todo');
cy.findByTitle('To Do').should('be.visible');
cy.request('/api/method/logout');
cy.reload();
cy.get('.btn-primary').contains('Login').click();