test: refs #6943 more e2e customer tests

This commit is contained in:
Javier Segarra 2024-11-25 22:51:28 +01:00
parent 4263bb3ec0
commit e04c7d843e
3 changed files with 41 additions and 8 deletions

View File

@ -0,0 +1,12 @@
/// <reference types="cypress" />
describe('Client notes', () => {
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('#/customer/1101/sms');
});
it('Should load layout', () => {
cy.get('.q-page').should('be.visible');
cy.get('.q-page > :nth-child(2) > :nth-child(1)').should('be.visible');
});
});

View File

@ -3,11 +3,26 @@ describe('Client web-access', () => {
beforeEach(() => { beforeEach(() => {
cy.viewport(1280, 720); cy.viewport(1280, 720);
cy.login('developer'); cy.login('developer');
cy.visit('#/customer/1110/web-access', {
timeout: 5000,
}); });
}); it('Should test buttons ', () => {
it('Should load layout', () => { cy.visit('#/customer/1101/web-access');
cy.get('.q-page').should('be.visible');
cy.get('#formModel').should('be.visible');
cy.get('.q-card').should('be.visible'); cy.get('.q-card').should('be.visible');
cy.get('.q-btn-group > :nth-child(1)').should('not.be.disabled');
cy.get('.q-checkbox__inner').click();
cy.get('.q-btn-group > .q-btn--standard.q-btn--actionable').should(
'not.be.disabled'
);
cy.get('.q-btn-group > .q-btn--flat').should('not.be.disabled');
cy.get('.q-btn-group > :nth-child(1)').click();
cy.get('.q-dialog__inner > .q-card > :nth-child(1)')
.should('be.visible')
.find('.text-h6')
.should('have.text', 'Change password');
});
it('Should disabled buttons', () => {
cy.visit('#/customer/1110/web-access');
cy.get('.q-btn-group > :nth-child(1)').should('be.disabled');
}); });
}); });

View File

@ -3,11 +3,17 @@ describe('Client unpaid', () => {
beforeEach(() => { beforeEach(() => {
cy.viewport(1280, 720); cy.viewport(1280, 720);
cy.login('developer'); cy.login('developer');
cy.visit('#/customer/1110/others/unpaid', {
timeout: 5000,
}); });
}); it('Should add unpaid', () => {
it('Should load layout', () => { cy.visit('#/customer/1102/others/unpaid');
cy.get('.q-card').should('be.visible'); cy.get('.q-card').should('be.visible');
cy.get('.q-checkbox__inner').click();
cy.dataCy('customerUnpaidAmount').find('input').type('100');
cy.dataCy('customerUnpaidDate').find('input').type('01/01/2001');
cy.get('.q-btn-group > .q-btn--standard').click();
cy.reload();
cy.get('.q-checkbox__inner')
.should('be.visible')
.and('not.have.class', 'q-checkbox__inner--active');
}); });
}); });