0
1
Fork 0

Adjustments

This commit is contained in:
William Buezas 2024-10-24 14:04:07 -03:00
parent 0bec75b2d3
commit eea2ad7984
3 changed files with 17 additions and 17 deletions

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