fix: fixed e2e
This commit is contained in:
parent
eab1994fb8
commit
eb4340122d
|
@ -3,7 +3,7 @@
|
||||||
describe('InvoiceInList', () => {
|
describe('InvoiceInList', () => {
|
||||||
const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
|
const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
|
||||||
const firstId = `${firstRow} > td:nth-child(2) span`;
|
const firstId = `${firstRow} > td:nth-child(2) span`;
|
||||||
const firstDetailBtn = `${firstRow} .q-btn:nth-child(1)`;
|
const firstDetailBtn = '[data-col-field="id"]:contains("6")';
|
||||||
const summaryHeaders = (opt) => `.summaryBody > .${opt} > .q-pb-lg > .header-link`;
|
const summaryHeaders = (opt) => `.summaryBody > .${opt} > .q-pb-lg > .header-link`;
|
||||||
const mockInvoiceRef = `createMockInvoice${Math.floor(Math.random() * 100)}`;
|
const mockInvoiceRef = `createMockInvoice${Math.floor(Math.random() * 100)}`;
|
||||||
const mock = {
|
const mock = {
|
||||||
|
@ -31,7 +31,7 @@ describe('InvoiceInList', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open the details', () => {
|
it('should open the details', () => {
|
||||||
cy.get(firstDetailBtn).click();
|
cy.get(firstDetailBtn).closest('tr').find('.q-btn:nth-child(1)').click();
|
||||||
cy.get(summaryHeaders('max-width')).contains('Basic data');
|
cy.get(summaryHeaders('max-width')).contains('Basic data');
|
||||||
cy.get(summaryHeaders('vat')).contains('Vat');
|
cy.get(summaryHeaders('vat')).contains('Vat');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue