diff --git a/e2e/paths/05-ticket/18_index_payout.spec.js b/e2e/paths/05-ticket/18_index_payout.spec.js index 46619b5ae..749428c44 100644 --- a/e2e/paths/05-ticket/18_index_payout.spec.js +++ b/e2e/paths/05-ticket/18_index_payout.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import getBrowser from '../../helpers/puppeteer'; -xdescribe('Ticket index payout path', () => { +describe('Ticket index payout path', () => { let browser; let page; @@ -47,67 +47,12 @@ xdescribe('Ticket index payout path', () => { expect(result).toEqual('Data saved!'); }); - it('should navigate to the client balance section', async() => { + it('should navigate to the client balance section and check a new balance line was entered', async() => { await page.waitToClick(selectors.globalItems.homeButton); - // await page.selectModule('client'); - // await page.accessToSearchResult('Bruce Wayne'); - // await page.accessToSection('client.card.balance.index'); - // await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr'); - // let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr'); - - // expect(result).toEqual(4); - }); - - it('should B', async() => { - // await page.waitToClick(selectors.globalItems.homeButton); await page.selectModule('client'); - // await page.accessToSearchResult('Bruce Wayne'); - // await page.accessToSection('client.card.balance.index'); - // await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr'); - // let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr'); - - // expect(result).toEqual(4); - }); - - it('should C', async() => { - // await page.waitToClick(selectors.globalItems.homeButton); - // await page.selectModule('client'); - await page.accessToSearchResult('Bruce Wayne'); - // await page.accessToSection('client.card.balance.index'); - // await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr'); - // let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr'); - - // expect(result).toEqual(4); - }); - - it('should D', async() => { - // await page.waitToClick(selectors.globalItems.homeButton); - // await page.selectModule('client'); - // await page.accessToSearchResult('Bruce Wayne'); + await page.accessToSearchResult('101'); await page.accessToSection('client.card.balance.index'); - // await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr'); - // let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr'); - - // expect(result).toEqual(4); - }); - - it('should E', async() => { - // await page.waitToClick(selectors.globalItems.homeButton); - // await page.selectModule('client'); - // await page.accessToSearchResult('Bruce Wayne'); - // await page.accessToSection('client.card.balance.index'); await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr'); - // let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr'); - - // expect(result).toEqual(4); - }); - - it('should F', async() => { - // await page.waitToClick(selectors.globalItems.homeButton); - // await page.selectModule('client'); - // await page.accessToSearchResult('Bruce Wayne'); - // await page.accessToSection('client.card.balance.index'); - // await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr'); let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr'); expect(result).toEqual(4); diff --git a/modules/ticket/front/index/index.js b/modules/ticket/front/index/index.js index e9f522839..3f0146846 100644 --- a/modules/ticket/front/index/index.js +++ b/modules/ticket/front/index/index.js @@ -37,7 +37,7 @@ export default class Controller { } get checked() { - const tickets = this.$.tickets || []; + const tickets = this.$.model.data || []; const checkedLines = []; for (let ticket of tickets) { if (ticket.checked)