test: refs #8441 update URL assertions to use cy.location() and ensure menu visibility in vehicle invoice tests
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jose Antonio Tubau 2025-04-04 08:49:10 +02:00
parent fcba8c7fcd
commit 6d2fa8493c
1 changed files with 12 additions and 4 deletions

View File

@ -52,10 +52,12 @@ describe('Vehicle Invoice In', () => {
.invoke('text')
.then((supplierName) => {
supplierName = supplierName.trim();
cy.get('.q-menu').should('exist').should('be.visible');
cy.get(selectors.descriptorGoToSummaryBtn)
.should('exist')
.should('be.visible')
.click();
cy.url().should('match', supplierSummaryUrlRegex);
cy.location().should('match', supplierSummaryUrlRegex);
cy.containContent(selectors.descriptorSupplierTitle, supplierName);
});
});
@ -66,11 +68,13 @@ describe('Vehicle Invoice In', () => {
.invoke('text')
.then((supplierName) => {
supplierName = supplierName.trim();
cy.get('.q-menu').should('exist').should('be.visible');
cy.get(selectors.descriptorOpenSummaryBtn)
.should('exist')
.should('be.visible')
.click();
cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
cy.url().should('match', supplierSummaryUrlRegex);
cy.location().should('match', supplierSummaryUrlRegex);
cy.containContent(selectors.descriptorSupplierTitle, supplierName);
});
});
@ -83,10 +87,12 @@ describe('Vehicle Invoice In', () => {
.invoke('text')
.then((invoice) => {
invoice = invoice.trim();
cy.get('.q-menu').should('exist').should('be.visible');
cy.get(selectors.descriptorGoToSummaryBtn)
.should('exist')
.should('be.visible')
.click();
cy.url().should('match', invoiceInSummaryUrlRegex);
cy.location().should('match', invoiceInSummaryUrlRegex);
cy.containContent(selectors.descriptorInvoiceInTitle, invoice);
});
});
@ -97,11 +103,13 @@ describe('Vehicle Invoice In', () => {
.invoke('text')
.then((invoice) => {
invoice = invoice.trim();
cy.get('.q-menu').should('exist').should('be.visible');
cy.get(selectors.descriptorOpenSummaryBtn)
.should('exist')
.should('be.visible')
.click();
cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
cy.url().should('match', invoiceInSummaryUrlRegex);
cy.location().should('match', invoiceInSummaryUrlRegex);
cy.containContent(selectors.descriptorInvoiceInTitle, invoice);
});
});