fix test refs #5835
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Jorge Penadés 2023-12-18 15:39:26 +01:00
parent 94278e2f53
commit c84aeed202
1 changed files with 5 additions and 4 deletions

View File

@ -1,8 +1,8 @@
/// <reference types="cypress" />
describe('InvoiceInList', () => {
const firstCard = '.q-card:nth-child(1)';
const firstId =
'.q-card:nth-child(1) .list-items > .vn-label-value:first-child > .value > span';
const firstChipId =
':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
const firstDetailBtn = '.q-card:nth-child(1) .q-btn:nth-child(2)';
const summaryHeaders = '.summaryBody .header';
@ -12,9 +12,10 @@ describe('InvoiceInList', () => {
});
it('should redirect on clicking a invoice', () => {
cy.get(firstId)
cy.get(firstChipId)
.invoke('text')
.then((id) => {
.then((content) => {
const id = content.substring(4);
cy.get(firstCard).click();
cy.url().should('include', `/invoice-in/${id}/summary`);
});