Merge pull request 'warmFix: fix own test' (!1041) from fix_js_e2e_test into test
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1041 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
fb7f982356
|
@ -62,6 +62,7 @@ defineExpose({
|
||||||
@click="emit('onDataCanceled')"
|
@click="emit('onDataCanceled')"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
data-cy="FormModelPopup_cancel"
|
data-cy="FormModelPopup_cancel"
|
||||||
|
z-max
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.save')"
|
:label="t('globals.save')"
|
||||||
|
@ -72,6 +73,7 @@ defineExpose({
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
data-cy="FormModelPopup_save"
|
data-cy="FormModelPopup_save"
|
||||||
|
z-max
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -7,8 +7,8 @@ describe('Client basic data', () => {
|
||||||
});
|
});
|
||||||
it('Should load layout', () => {
|
it('Should load layout', () => {
|
||||||
cy.get('.q-card').should('be.visible');
|
cy.get('.q-card').should('be.visible');
|
||||||
cy.dataCy('customerPhone').filter('input').should('be.visible');
|
cy.dataCy('customerPhone').find('input').should('be.visible');
|
||||||
cy.dataCy('customerPhone').filter('input').type('123456789');
|
cy.dataCy('customerPhone').find('input').type('123456789');
|
||||||
cy.get('.q-btn-group > .q-btn--standard').click();
|
cy.get('.q-btn-group > .q-btn--standard').click();
|
||||||
cy.intercept('PATCH', '/api/Clients/1102', (req) => {
|
cy.intercept('PATCH', '/api/Clients/1102', (req) => {
|
||||||
const { body } = req;
|
const { body } = req;
|
||||||
|
|
|
@ -22,10 +22,10 @@ describe('Client list', () => {
|
||||||
const data = {
|
const data = {
|
||||||
Name: { val: `Name ${randomInt}` },
|
Name: { val: `Name ${randomInt}` },
|
||||||
'Social name': { val: `TEST ${randomInt}` },
|
'Social name': { val: `TEST ${randomInt}` },
|
||||||
'Tax number': { val: `20852${randomInt.length}3Z` },
|
'Tax number': { val: `20852${randomInt}3Z` },
|
||||||
'Web user': { val: `user_test_${randomInt}` },
|
'Web user': { val: `user_test_${randomInt}` },
|
||||||
Street: { val: `C/ STREET ${randomInt}` },
|
Street: { val: `C/ STREET ${randomInt}` },
|
||||||
Email: { val: 'user.test@1.com' },
|
Email: { val: `user.test${randomInt}@cypress.com` },
|
||||||
'Sales person': { val: 'employee', type: 'select' },
|
'Sales person': { val: 'employee', type: 'select' },
|
||||||
Location: { val: '46000, Valencia(Province one), España', type: 'select' },
|
Location: { val: '46000, Valencia(Province one), España', type: 'select' },
|
||||||
'Business type': { val: 'Otros', type: 'select' },
|
'Business type': { val: 'Otros', type: 'select' },
|
||||||
|
@ -34,7 +34,7 @@ describe('Client list', () => {
|
||||||
|
|
||||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||||
|
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data created');
|
||||||
cy.url().should('include', '/summary');
|
cy.url().should('include', '/summary');
|
||||||
});
|
});
|
||||||
it('Client list search client', () => {
|
it('Client list search client', () => {
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe('TicketList', () => {
|
||||||
cy.dataCy('ticketSummary').should('exist');
|
cy.dataCy('ticketSummary').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Client list create new client', () => {
|
it.only('Client list create new client', () => {
|
||||||
cy.dataCy('vnTableCreateBtn').should('exist');
|
cy.dataCy('vnTableCreateBtn').should('exist');
|
||||||
cy.dataCy('vnTableCreateBtn').click();
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
const data = {
|
const data = {
|
||||||
|
@ -47,7 +47,8 @@ describe('TicketList', () => {
|
||||||
Landed: { val: '01-01-2024', type: 'date' },
|
Landed: { val: '01-01-2024', type: 'date' },
|
||||||
};
|
};
|
||||||
cy.fillInForm(data);
|
cy.fillInForm(data);
|
||||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
cy.dataCy('Agency_select').click();
|
||||||
|
cy.dataCy('FormModelPopup_save').click();
|
||||||
cy.checkNotification('Data created');
|
cy.checkNotification('Data created');
|
||||||
cy.url().should('match', /\/ticket\/\d+\/summary/);
|
cy.url().should('match', /\/ticket\/\d+\/summary/);
|
||||||
});
|
});
|
||||||
|
|
|
@ -110,14 +110,14 @@ Cypress.Commands.add('fillInForm', (obj, form = '.q-form > .q-card') => {
|
||||||
const { type, val } = field;
|
const { type, val } = field;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'select':
|
case 'select':
|
||||||
cy.wrap(el).type(val);
|
cy.get(el).click();
|
||||||
cy.get('.q-menu .q-item').contains(val).click();
|
cy.get('.q-menu .q-item').contains(val).click();
|
||||||
break;
|
break;
|
||||||
case 'date':
|
case 'date':
|
||||||
cy.wrap(el).type(val.split('-').join(''));
|
cy.get(el).type(val.split('-').join(''));
|
||||||
break;
|
break;
|
||||||
case 'time':
|
case 'time':
|
||||||
cy.wrap(el).click();
|
cy.get(el).click();
|
||||||
cy.get('.q-time .q-time__clock').contains(val.h).click();
|
cy.get('.q-time .q-time__clock').contains(val.h).click();
|
||||||
cy.get('.q-time .q-time__clock').contains(val.m).click();
|
cy.get('.q-time .q-time__clock').contains(val.m).click();
|
||||||
cy.get('.q-time .q-time__link').contains(val.x).click();
|
cy.get('.q-time .q-time__link').contains(val.x).click();
|
||||||
|
|
Loading…
Reference in New Issue