test: refs #8441 improve visibility checks and update invoice link selectors
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jose Antonio Tubau 2025-04-04 12:02:27 +02:00
parent 903345203b
commit 2dd82a55e8
2 changed files with 2 additions and 15 deletions

View File

@ -52,9 +52,7 @@ 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.location().should('match', supplierSummaryUrlRegex);
@ -68,9 +66,7 @@ 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();
@ -80,17 +76,14 @@ describe('Vehicle Invoice In', () => {
});
});
// Redmine #8863
describe.skip('Invoice pop-ups', () => {
describe('Invoice pop-ups', () => {
it('Should redirect to the invoiceIn summary from the invoice descriptor pop-up', () => {
cy.get(selectors.firstRowInvoice)
.click()
.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.location().should('match', invoiceInSummaryUrlRegex);
@ -104,9 +97,7 @@ 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();

View File

@ -6,7 +6,7 @@ describe('Vehicle summary', () => {
summaryBasicDataLink: '[dense=""] > .q-pb-lg > .header-link > .link',
basicDataSupplierLink: ':nth-child(4) > .value > .link',
assignedInvoicesSupplierLink: 'tbody > :nth-child(1) > :nth-child(2) > .link',
assignedInvoicesInvoiceLink: ':nth-child(1) > :nth-child(3) > .link',
assignedInvoicesInvoiceLink: 'tbody > :nth-child(1) > :nth-child(3) > .link',
descriptorOpenSummaryBtn: '.q-menu > .descriptor [data-cy="openSummaryBtn"]',
descriptorGoToSummaryBtn: '.q-menu > .descriptor [data-cy="goToSummaryBtn"]',
summaryGoToSummaryBtn: '.summaryHeader [data-cy="goToSummaryBtn"]',
@ -105,9 +105,7 @@ describe('Vehicle summary', () => {
.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);
@ -121,9 +119,7 @@ describe('Vehicle summary', () => {
.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();