Merge pull request 'feat(ExtraCommunity): refs #8105 add data-cy attribute for testing and create integration tests' (!1786) from 8105-travels_bySupplier into dev
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #1786
Reviewed-by: Jon Elias <jon@verdnatura.es>
This commit is contained in:
Alex Moreno 2025-05-09 08:01:24 +00:00
commit 8b61d1a4c7
2 changed files with 17 additions and 0 deletions

View File

@ -547,6 +547,7 @@ watch(route, () => {
},
]"
v-text="col.value"
:data-cy="`extra-community-${col.name}`"
/>
<TravelDescriptorProxy
v-if="col.name === 'id'"

View File

@ -0,0 +1,16 @@
describe('Travel Extracommunity', () => {
it('Should show travels', () => {
cy.login('logistic');
cy.visit(`/#/travel/extra-community`);
cy.get('.q-page').should('be.visible');
});
it('Should show travels when user is supplier', () => {
cy.login('petterparker');
cy.visit(`/#/travel/extra-community`);
cy.get('[data-cy="vnFilterPanelChip_continent"] > .q-chip__icon--remove').click();
cy.dataCy('extra-community-cargoSupplierNickname').each(($el) => {
cy.wrap($el).should('contain.text', 'The farmer');
});
});
});