Cypress initial config and tests #90

Merged
jsegarra merged 26 commits from wbuezas/hedera-web-mindshore:feature/CypressInit into 4922-vueMigration 2024-11-12 12:24:41 +00:00
4 changed files with 8 additions and 6 deletions
Showing only changes of commit e4bc14ef3b - Show all commits

View File

@ -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);
});

View File

@ -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();

Estas 2 podrian ser candidatas a irse a un comando global

Estas 2 podrian ser candidatas a irse a un comando global

Coincido, aplicado.

Commit: e4bc14ef3b

Coincido, aplicado. Commit: https://gitea.verdnatura.es/verdnatura/hedera-web/commit/e4bc14ef3b7b8eb5f4951088c9b077a8b022363f
};
// it('confirm payment redirects to payment site', () => {

View File

@ -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();
});

View File

@ -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();
});