This commit is contained in:
parent
94278e2f53
commit
c84aeed202
|
@ -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`);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue