#8599: Modified tests to be more complete and added new ones #1409

Merged
jon merged 11 commits from 8599-ModifyAndCreateInvoiceOutTests into dev 2025-02-21 11:36:48 +00:00
Member
No description provided.
jon added 1 commit 2025-02-17 12:54:09 +00:00
jon added 2 commits 2025-02-18 13:14:25 +00:00
jon added 2 commits 2025-02-20 07:09:13 +00:00
jon changed title from WIP: #8599: Modified tests to be more complete and added new ones to #8599: Modified tests to be more complete and added new ones 2025-02-20 07:22:50 +00:00
jon requested review from jsegarra 2025-02-20 07:22:56 +00:00
jsegarra requested changes 2025-02-20 20:36:15 +00:00
Dismissed
@ -1,11 +1,30 @@
/// <reference types="cypress" />
describe('InvoiceOut negative bases', () => {
const clientDescriptor =
Member

Entiendo que al ser solo 3 variables no abulta mucho, pero creo que lo podemos dejar algo mas linpio
Opcion A

  • definir una funcion con un parametro que nos devuelva lo mismo siempre
    Opcion B
    Definir un objeto que la clave se le pase a la funcion de la opcion A y que el valor de esa clave sea lo que le pasemos en el should
Entiendo que al ser solo 3 variables no abulta mucho, pero creo que lo podemos dejar algo mas linpio Opcion A - definir una funcion con un parametro que nos devuelva lo mismo siempre Opcion B Definir un objeto que la clave se le pase a la funcion de la opcion A y que el valor de esa clave sea lo que le pasemos en el should
jon marked this conversation as resolved
@ -5,25 +5,54 @@ describe('InvoiceOut summary', () => {
Type: { val: 'Error in customer data', type: 'select' },
};
const firstTicketRowDescriptor = 'tbody > :nth-child(1) > :nth-child(1) > .q-btn';
Member

Intentar que ambas líneas acaben en el mismo punto, o q-btn o q-btn__content.
Una vez salvado esto, hacer una función que le pasemos el segundo índice

Intentar que ambas líneas acaben en el mismo punto, o q-btn o q-btn__content. Una vez salvado esto, hacer una función que le pasemos el segundo índice
jon marked this conversation as resolved
@ -22,0 +35,4 @@
it('should open the ticket list', () => {
cy.get(toTicketList).click();
cy.get('.descriptor').should('be.visible');
cy.get('[data-cy="vnFilterPanelChip"]').should('include.text', 'T1111111');
Member

dataCy

dataCy
jon marked this conversation as resolved
@ -27,0 +50,4 @@
it('should send the invoice', () => {
cy.dataCy('descriptor-more-opts').click();
cy.get('.q-menu > .q-list > :nth-child(3)').click();
cy.get('#q-portal--menu--3 > .q-menu > .q-list > :nth-child(1)').click();
Member

ufffff...dangerous. Puede generar intermitencias
Has probado a darle un dataCy?

ufffff...dangerous. Puede generar intermitencias Has probado a darle un dataCy?
jon marked this conversation as resolved
@ -43,0 +72,4 @@
it('should generate the invoice PDF', () => {
cy.dataCy('descriptor-more-opts').click();
cy.get('.q-menu > .q-list > :nth-child(6)').click();
Member

se repite un patrón

se repite un patrón
jon marked this conversation as resolved
jon added 2 commits 2025-02-21 07:20:52 +00:00
jon added 1 commit 2025-02-21 07:21:43 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
56da517c0d
Merge branch 'dev' into 8599-ModifyAndCreateInvoiceOutTests
jon requested review from jsegarra 2025-02-21 07:23:12 +00:00
jon added 3 commits 2025-02-21 10:30:39 +00:00
jsegarra approved these changes 2025-02-21 11:21:46 +00:00
jon merged commit 15a1098506 into dev 2025-02-21 11:36:48 +00:00
jon deleted branch 8599-ModifyAndCreateInvoiceOutTests 2025-02-21 11:36:48 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix-front#1409
No description provided.