forked from verdnatura/hedera-web
Create confirmDialog command
This commit is contained in:
parent
40444ac46a
commit
e4bc14ef3b
|
@ -16,8 +16,7 @@ describe('NewsView', () => {
|
|||
.within(() => {
|
||||
cy.dataCy('deleteNewBtn').click();
|
||||
});
|
||||
cy.dataCy('confirmDialogButton').should('exist');
|
||||
cy.dataCy('confirmDialogButton').click();
|
||||
cy.setConfirmDialog();
|
||||
cy.dataCy('positiveNotify').should('contain', 'Datos guardados');
|
||||
cy.dataCy('newsCard').should('have.length', 2);
|
||||
});
|
||||
|
|
|
@ -12,8 +12,7 @@ describe('PendingOrders', () => {
|
|||
cy.get('input[data-testid="payAmountInput"]').clear();
|
||||
if (typeAmount || typeAmount === 0)
|
||||
cy.get('input[data-testid="payAmountInput"]').type(typeAmount);
|
||||
cy.dataCy('confirmDialogButton').should('exist');
|
||||
cy.dataCy('confirmDialogButton').click();
|
||||
cy.setConfirmDialog();
|
||||
};
|
||||
|
||||
// it('confirm payment redirects to payment site', () => {
|
||||
|
|
|
@ -40,8 +40,7 @@ describe('PendingOrders', () => {
|
|||
checkExistingOrder();
|
||||
cy.dataCy('pendingOrderCard').should('have.length', 1);
|
||||
cy.dataCy('pendingOrderCardDelete').click();
|
||||
cy.dataCy('confirmDialogButton').should('exist');
|
||||
cy.dataCy('confirmDialogButton').click();
|
||||
cy.setConfirmDialog();
|
||||
cy.dataCy('positiveNotify').should('contain', 'Datos guardados');
|
||||
checkEmptyList();
|
||||
});
|
||||
|
|
|
@ -82,3 +82,8 @@ Cypress.Commands.add('setSessionStorage', (key, value) => {
|
|||
Cypress.Commands.add('resetDB', () => {
|
||||
cy.exec('npm run resetDatabase');
|
||||
});
|
||||
|
||||
Cypress.Commands.add('setConfirmDialog', () => {
|
||||
cy.dataCy('confirmDialogButton').should('exist');
|
||||
cy.dataCy('confirmDialogButton').click();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue