test: refs #8626 enable route listing and creation tests, add assigned tickets redirection test
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jose Antonio Tubau 2025-03-13 08:21:45 +01:00
parent 8bbd3a63ab
commit b5b863bc4f
1 changed files with 15 additions and 6 deletions

View File

@ -32,14 +32,14 @@ describe('Route', () => {
cy.typeSearchbar('{enter}'); cy.typeSearchbar('{enter}');
}); });
xit('Should list routes', () => { it('Should list routes', () => {
cy.get('.q-table') cy.get('.q-table')
.children() .children()
.should('be.visible') .should('be.visible')
.should('have.length.greaterThan', 0); .should('have.length.greaterThan', 0);
}); });
xit('Should create new route', () => { it('Should create new route', () => {
cy.addBtnClick(); cy.addBtnClick();
cy.fillInForm(data); cy.fillInForm(data);
@ -55,7 +55,7 @@ describe('Route', () => {
}); });
}); });
xit('Should open route summary by clicking a route', () => { it('Should open route summary by clicking a route', () => {
cy.get(selectors.lastRow).should('be.visible').click(); cy.get(selectors.lastRow).should('be.visible').click();
cy.url().should('include', summaryUrl); cy.url().should('include', summaryUrl);
cy.get(selectors.summaryTitle) cy.get(selectors.summaryTitle)
@ -65,9 +65,9 @@ describe('Route', () => {
}); });
}); });
xit('Should redirect to the summary from the route pop-up summary', () => { it('Should redirect to the summary from the route pop-up summary', () => {
cy.dataCy(selectors.rowSummaryBtn).last().should('be.visible').click(); cy.dataCy(selectors.rowSummaryBtn).last().should('be.visible').click();
cy.get(selectors.descriptorTitle) cy.get(selectors.summaryTitle)
.invoke('text') .invoke('text')
.then((text) => { .then((text) => {
expect(text).to.include(data.Description.val); expect(text).to.include(data.Description.val);
@ -80,6 +80,15 @@ describe('Route', () => {
}); });
}); });
it('Should redirect to the route assigned tickets from the row assignedTicketsBtn', () => {
cy.dataCy(selectors.assignedTicketsBtn).first().should('be.visible').click();
cy.url().should('include', '1/tickets');
cy.get('.q-table')
.children()
.should('be.visible')
.should('have.length.greaterThan', 0);
});
describe('Worker pop-ups', () => { describe('Worker pop-ups', () => {
it('Should redirect to summary from the worker pop-up descriptor', () => { it('Should redirect to summary from the worker pop-up descriptor', () => {
cy.get(selectors.workerLink).click(); cy.get(selectors.workerLink).click();
@ -156,7 +165,7 @@ describe('Route', () => {
}); });
}); });
describe.only('Vehicle pop-ups', () => { describe('Vehicle pop-ups', () => {
it('Should redirect to summary from the vehicle pop-up descriptor', () => { it('Should redirect to summary from the vehicle pop-up descriptor', () => {
cy.get(selectors.vehicleLink).click(); cy.get(selectors.vehicleLink).click();
cy.get(selectors.descriptorTitle) cy.get(selectors.descriptorTitle)