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
3 changed files with 17 additions and 17 deletions
Showing only changes of commit eea2ad7984 - Show all commits

View File

@ -1,4 +1,8 @@
describe('User flow: Login, create a new order, add item to basket and go to confirm view', () => {
before(() => {
cy.resetDB();
});
it('success', () => {
// 1- Loguear como empleado
cy.login('employee');
@ -17,6 +21,5 @@ describe('User flow: Login, create a new order, add item to basket and go to con
cy.dataCy('basketToConfirmBtn').should('exist');
cy.dataCy('basketToConfirmBtn').click();
cy.url().should('contain', '/#/ecomerce/confirm');
cy.resetDB();
});
});

View File

@ -1,4 +1,8 @@
describe('UsersView', () => {
before(() => {
cy.resetDB();
});
beforeEach(() => {
cy.login('adminboss');
cy.visit('/#/admin/users');
@ -23,6 +27,5 @@ describe('UsersView', () => {
'contain',
'New test nickname'
);
cy.resetDB();
});
});

View File

@ -1,17 +1,11 @@
describe('CatalogView', () => {
// beforeEach(() => {
// // 1- Loguear usuario
// cy.login('developer');
// // 2- Crear una orden
// cy.resetDB();
// cy.createOrderReceiveFlow();
// });
// it('Adds item to basket', () => {
// cy.addItemToBasketFlow();
// });
// it('Goes to basket', () => {
// cy.dataCy('catalogGoToBasketButton').should('exist');
// cy.dataCy('catalogGoToBasketButton').click();
// cy.url().should('contain', '/#/ecomerce/basket');
// });
it('Adds item to basket and goes to basket', () => {
cy.resetDB();
cy.login('developer');
cy.createOrderReceiveFlow();
cy.addItemToBasketFlow();
cy.dataCy('catalogGoToBasketButton').should('exist');
cy.dataCy('catalogGoToBasketButton').click();
cy.url().should('contain', '/#/ecomerce/basket');
});
});