Selaa lähdekoodia

test: Fix recorder and datetime tests

version-14
Suraj Shetty 4 vuotta sitten
vanhempi
commit
f14bd1bb0b
2 muutettua tiedostoa jossa 9 lisäystä ja 13 poistoa
  1. +1
    -1
      cypress/integration/datetime.js
  2. +8
    -12
      cypress/integration/recorder.js

+ 1
- 1
cypress/integration/datetime.js Näytä tiedosto

@@ -42,7 +42,7 @@ context('Control Date, Time and DateTime', () => {
.should('be.visible');
cy.get(
'.datepickers-container .datepicker.active .datepicker--cell-day.-current-'
).click();
).click({ force: true });

cy.window()
.its('cur_frm')


+ 8
- 12
cypress/integration/recorder.js Näytä tiedosto

@@ -42,14 +42,13 @@ context('Recorder', () => {
cy.get('.result-list').should('contain', '/api/method/frappe.desk.reportview.get');

cy.get('#page-recorder .primary-action').should('contain', 'Stop').click();
cy.wait(500);
cy.get('#page-recorder .btn-secondary').should('contain', 'Clear').click();
cy.get('.msg-box').should('contain', 'Inactive');
});

it('Recorder View Request', () => {
cy.visit('/app/recorder');
cy.get('#page-recorder .primary-action').should('contain', 'Stop').click();
cy.get('#page-recorder .btn-secondary').should('contain', 'Clear').click();
cy.get('.primary-action').should('contain', 'Start').click();

cy.visit('/app/List/DocType/List');
@@ -59,18 +58,15 @@ context('Recorder', () => {
cy.get('.title-text').should('contain', 'DocType');
cy.get('.list-count').should('contain', '20 of ');

// temporarily commenting out theses tests as they seem to be
// randomly failing maybe due a background event

// cy.visit('/app/recorder');
cy.visit('/app/recorder');

// cy.get('.list-row-container span').contains('/api/method/frappe').click();
cy.get('.list-row-container span').contains('/api/method/frappe').click();

// cy.location('hash').should('contain', '#recorder/request/');
// cy.get('form').should('contain', '/api/method/frappe');
cy.url().should('include', '/recorder/request');
cy.get('form').should('contain', '/api/method/frappe');

// cy.get('#page-recorder .primary-action').should('contain', 'Stop').click();
// cy.get('#page-recorder .btn-secondary').should('contain', 'Clear').click();
// cy.location('hash').should('eq', '#recorder');
cy.get('#page-recorder .primary-action').should('contain', 'Stop').click();
cy.wait(200);
cy.get('#page-recorder .btn-secondary').should('contain', 'Clear').click();
});
});

Ladataan…
Peruuta
Tallenna