forked from verdnatura/salix-front
test: more e2e customer tests
This commit is contained in:
parent
30a2da027b
commit
4fa5d47481
|
@ -49,17 +49,21 @@ const filterClientFindOne = {
|
||||||
:form-initial-data="initialData"
|
:form-initial-data="initialData"
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
{{ data }}
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QCheckbox :label="t('Unpaid client')" v-model="data.unpaid" />
|
<QCheckbox :label="t('Unpaid client')" v-model="data.unpaid" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow class="row q-gutter-md q-mb-md" v-show="data.unpaid">
|
<VnRow class="row q-gutter-md q-mb-md" v-show="data.unpaid">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInputDate :label="t('Date')" v-model="data.dated" />
|
<VnInputDate
|
||||||
|
data-cy="customerUnpaidDate"
|
||||||
|
:label="t('Date')"
|
||||||
|
v-model="data.dated"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInputNumber
|
<VnInputNumber
|
||||||
|
data-cy="customerUnpaidAmount"
|
||||||
ref="amountInputRef"
|
ref="amountInputRef"
|
||||||
:label="t('Amount')"
|
:label="t('Amount')"
|
||||||
clearable
|
clearable
|
||||||
|
|
|
@ -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');
|
||||||
|
});
|
||||||
|
});
|
|
@ -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');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -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');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue