Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 1940-e2e-client-phone
gitea/salix/1940-e2e-client-phone This commit looks good
Details
gitea/salix/1940-e2e-client-phone This commit looks good
Details
This commit is contained in:
commit
4a9712aa48
|
@ -742,6 +742,11 @@ export default {
|
||||||
acceptBookingButton: '.vn-confirm.shown button[response="accept"]'
|
acceptBookingButton: '.vn-confirm.shown button[response="accept"]'
|
||||||
},
|
},
|
||||||
invoiceOutSummary: {
|
invoiceOutSummary: {
|
||||||
bookedLabel: 'vn-invoice-out-summary > vn-card > vn-horizontal > vn-one > vn-label-value:nth-child(4) > section > span'
|
bookedLabel: 'vn-invoice-out-summary > vn-card > vn-horizontal > vn-one > vn-label-value:nth-child(4) > section > span',
|
||||||
|
company: 'vn-invoice-out-summary vn-label-value[label="Company"]',
|
||||||
|
taxOne: 'vn-invoice-out-summary > vn-card > vn-horizontal > vn-two > vn-table > div > vn-tbody > vn-tr:nth-child(1)',
|
||||||
|
taxTwo: 'vn-invoice-out-summary > vn-card > vn-horizontal > vn-two > vn-table > div > vn-tbody > vn-tr:nth-child(2)',
|
||||||
|
ticketOne: 'vn-invoice-out-summary > vn-card > vn-horizontal > vn-auto > vn-table > div > vn-tbody > vn-tr:nth-child(1)',
|
||||||
|
ticketTwo: 'vn-invoice-out-summary > vn-card > vn-horizontal > vn-auto > vn-table > div > vn-tbody > vn-tr:nth-child(2)'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('InvoiceOut summary path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('employee', 'invoiceOut');
|
||||||
|
await page.accessToSearchResult('T1111111');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should reach the summary section', async() => {
|
||||||
|
const result = await page.expectURL('/summary');
|
||||||
|
|
||||||
|
expect(result).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should contain the company from which the invoice is emited', async() => {
|
||||||
|
await page.waitForContentLoaded();
|
||||||
|
const result = await page.waitToGetProperty(selectors.invoiceOutSummary.company, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toEqual('Company VNL');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should contain the tax breakdown', async() => {
|
||||||
|
const firstTax = await page.waitToGetProperty(selectors.invoiceOutSummary.taxOne, 'innerText');
|
||||||
|
|
||||||
|
const secondTax = await page.waitToGetProperty(selectors.invoiceOutSummary.taxTwo, 'innerText');
|
||||||
|
|
||||||
|
expect(firstTax).toContain('10%');
|
||||||
|
expect(secondTax).toContain('21%');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should contain the tickets info', async() => {
|
||||||
|
const firstTicket = await page.waitToGetProperty(selectors.invoiceOutSummary.ticketOne, 'innerText');
|
||||||
|
|
||||||
|
const secondTicket = await page.waitToGetProperty(selectors.invoiceOutSummary.ticketTwo, 'innerText');
|
||||||
|
|
||||||
|
expect(firstTicket).toContain('Bat cave');
|
||||||
|
expect(secondTicket).toContain('Stark tower');
|
||||||
|
});
|
||||||
|
});
|
|
@ -19,7 +19,7 @@
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
<vn-two>
|
<vn-two>
|
||||||
<h4 translate>Desglose impositivo</h4>
|
<h4 translate>Tax breakdown</h4>
|
||||||
<vn-table model="model">
|
<vn-table model="model">
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
|
|
|
@ -8,4 +8,5 @@ Shipped: F. envío
|
||||||
Type: Tipo
|
Type: Tipo
|
||||||
Rate: Tasa
|
Rate: Tasa
|
||||||
Fee: Cuota
|
Fee: Cuota
|
||||||
Taxable base: Base imp.
|
Taxable base: Base imp.
|
||||||
|
Tax breakdown: Desglose impositivo
|
|
@ -370,10 +370,10 @@
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
|
|
||||||
<!-- SMS Dialog -->
|
<!-- SMS Dialog -->
|
||||||
<vn-client-sms
|
<vn-ticket-sms
|
||||||
vn-id="sms"
|
vn-id="sms"
|
||||||
sms="$ctrl.newSMS">
|
sms="$ctrl.newSMS">
|
||||||
</vn-client-sms>
|
</vn-ticket-sms>
|
||||||
|
|
||||||
<vn-confirm
|
<vn-confirm
|
||||||
vn-id="delete-lines"
|
vn-id="delete-lines"
|
||||||
|
|
Loading…
Reference in New Issue