e2e for descriptor clone option
This commit is contained in:
parent
abbce74100
commit
ed97af01f2
|
@ -936,7 +936,8 @@ export default {
|
|||
invoiceInDescriptor: {
|
||||
moreMenu: 'vn-invoice-in-descriptor vn-icon-button[icon=more_vert]',
|
||||
moreMenuDeleteInvoiceIn: '.vn-menu [name="deleteInvoice"]',
|
||||
acceptDeleteButton: '.vn-confirm.shown button[response="accept"]'
|
||||
moreMenuCloneInvoiceIn: '.vn-menu [name="cloneInvoice"]',
|
||||
acceptButton: '.vn-confirm.shown button[response="accept"]'
|
||||
},
|
||||
invoiceInBasicData: {
|
||||
issued: 'vn-invoice-in-basic-data vn-date-picker[ng-model="$ctrl.invoiceIn.issued"]',
|
||||
|
|
|
@ -10,16 +10,30 @@ describe('InvoiceIn descriptor path', () => {
|
|||
page = browser.page;
|
||||
await page.loginAndModule('administrative', 'invoiceIn');
|
||||
await page.accessToSearchResult('10');
|
||||
await page.accessToSection('invoiceIn.card.basicData');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should delete the invoiceIn using the descriptor more menu', async() => {
|
||||
it('should clone the invoiceIn using the descriptor more menu', async() => {
|
||||
await page.waitToClick(selectors.invoiceInDescriptor.moreMenu);
|
||||
await page.waitToClick(selectors.invoiceInDescriptor.moreMenuCloneInvoiceIn);
|
||||
await page.waitToClick(selectors.invoiceInDescriptor.acceptButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('InvoiceIn cloned');
|
||||
});
|
||||
|
||||
it('should have been redirected to the created invoiceIn summary', async() => {
|
||||
await page.waitForState('invoiceIn.card.summary');
|
||||
});
|
||||
|
||||
it('should delete the cloned invoiceIn using the descriptor more menu', async() => {
|
||||
await page.waitToClick(selectors.invoiceInDescriptor.moreMenu);
|
||||
await page.waitToClick(selectors.invoiceInDescriptor.moreMenuDeleteInvoiceIn);
|
||||
await page.waitToClick(selectors.invoiceInDescriptor.acceptDeleteButton);
|
||||
await page.waitToClick(selectors.invoiceInDescriptor.acceptButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('InvoiceIn deleted');
|
||||
|
|
Loading…
Reference in New Issue