test: refs #8441 ensure buttons are visible before clicking in vehicle invoice tests

This commit is contained in:
Jose Antonio Tubau 2025-04-03 15:20:06 +02:00
parent 49dd8e2432
commit c65a0f131c
1 changed files with 10 additions and 4 deletions

View File

@ -52,7 +52,9 @@ describe('Vehicle Invoice In', () => {
.invoke('text')
.then((supplierName) => {
supplierName = supplierName.trim();
cy.get(selectors.descriptorGoToSummaryBtn).click();
cy.get(selectors.descriptorGoToSummaryBtn)
.should('be.visible')
.click();
cy.url().should('match', supplierSummaryUrlRegex);
cy.containContent(selectors.descriptorSupplierTitle, supplierName);
});
@ -81,7 +83,9 @@ describe('Vehicle Invoice In', () => {
.invoke('text')
.then((invoice) => {
invoice = invoice.trim();
cy.get(selectors.descriptorGoToSummaryBtn).click();
cy.get(selectors.descriptorGoToSummaryBtn)
.should('be.visible')
.click();
cy.url().should('match', invoiceInSummaryUrlRegex);
cy.containContent(selectors.descriptorInvoiceInTitle, invoice);
});
@ -93,8 +97,10 @@ describe('Vehicle Invoice In', () => {
.invoke('text')
.then((invoice) => {
invoice = invoice.trim();
cy.get(selectors.descriptorOpenSummaryBtn).click();
cy.get(selectors.summaryGoToSummaryBtn).click();
cy.get(selectors.descriptorOpenSummaryBtn)
.should('be.visible')
.click();
cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
cy.url().should('match', invoiceInSummaryUrlRegex);
cy.containContent(selectors.descriptorInvoiceInTitle, invoice);
});