fix test and refactor transferlines #397

Merged
bernat merged 2 commits from 2480-transfer_line into dev 2020-09-30 12:20:14 +00:00
7 changed files with 30 additions and 30 deletions

View File

@ -20,7 +20,8 @@ export default {
userConfigFirstAutocomplete: '#localWarehouse', userConfigFirstAutocomplete: '#localWarehouse',
userConfigSecondAutocomplete: '#localBank', userConfigSecondAutocomplete: '#localBank',
userConfigThirdAutocomplete: '#localCompany', userConfigThirdAutocomplete: '#localCompany',
acceptButton: '.vn-confirm.shown button[response=accept]' acceptButton: '.vn-confirm.shown button[response=accept]',
searchButton: 'vn-searchbar vn-icon[icon="search"]',
}, },
clientsIndex: { clientsIndex: {
topbarSearch: 'vn-topbar', topbarSearch: 'vn-topbar',

View File

@ -124,7 +124,6 @@ describe('Item regularize path', () => {
page.waitForNavigation({waitUntil: ['load', 'networkidle0', 'domcontentloaded']}), page.waitForNavigation({waitUntil: ['load', 'networkidle0', 'domcontentloaded']}),
page.waitToClick(selectors.globalItems.ticketsButton) page.waitToClick(selectors.globalItems.ticketsButton)
]); ]);
await page.waitForTransitionEnd('vn-searchbar');
await page.waitForState('ticket.index'); await page.waitForState('ticket.index');
}); });

View File

@ -20,7 +20,7 @@ describe('Ticket index payout path', () => {
}); });
it('should check the second ticket from a client and 1 of another', async() => { it('should check the second ticket from a client and 1 of another', async() => {
await page.keyboard.press('Enter'); await page.waitToClick(selectors.globalItems.searchButton);
await page.waitToClick(selectors.ticketsIndex.secondTicketCheckbox); await page.waitToClick(selectors.ticketsIndex.secondTicketCheckbox);
await page.waitToClick(selectors.ticketsIndex.sixthTicketCheckbox); await page.waitToClick(selectors.ticketsIndex.sixthTicketCheckbox);
await page.waitToClick(selectors.ticketsIndex.payoutButton); await page.waitToClick(selectors.ticketsIndex.payoutButton);

View File

@ -18,7 +18,7 @@ describe('Entry lastest buys path', () => {
it('should access the latest buys seccion and search not seeing the edit buys button yet', async() => { it('should access the latest buys seccion and search not seeing the edit buys button yet', async() => {
await page.waitToClick(selectors.entryLatestBuys.latestBuysSectionButton); await page.waitToClick(selectors.entryLatestBuys.latestBuysSectionButton);
await page.waitFor(250); await page.waitFor(250);
await page.keyboard.press('Enter'); await page.waitToClick(selectors.globalItems.searchButton);
await page.waitForSelector(selectors.entryLatestBuys.editBuysButton, {visible: false}); await page.waitForSelector(selectors.entryLatestBuys.editBuysButton, {visible: false});
}); });

View File

@ -35,8 +35,9 @@ module.exports = Self => {
WHERE t.shipped >= CURDATE() AND t.clientFk = ? AND ts.alertLevel = 0 WHERE t.shipped >= CURDATE() AND t.clientFk = ? AND ts.alertLevel = 0
AND t.id <> ? AND t.warehouseFk = ? AND t.id <> ? AND t.warehouseFk = ?
ORDER BY t.shipped ORDER BY t.shipped
LIMIT 3`; LIMIT 10`;
return Self.rawSql(query, [id, ticketId, ticket.warehouseFk]); return Self.rawSql(query, [id, ticketId, ticket.warehouseFk]);
}; };
}; };

View File

@ -323,32 +323,31 @@
icon="info"> icon="info">
</vn-icon> </vn-icon>
</vn-horizontal> </vn-horizontal>
<table class="vn-table"> <vn-table class="destinationTable">
<thead> <vn-thead>
<tr> <vn-tr>
<th number>Id</th> <vn-th number>Id</vn-th>
<th number translate>Shipped</th> <vn-th number>Shipped</vn-th>
<th number translate>Agency</th> <vn-th number>Agency</vn-th>
<th number translate>Warehouse</th> <vn-th number>Warehouse</vn-th>
<th number translate>Address</th> <vn-th number>Address</vn-th>
</tr> </vn-tr>
</thead> </vn-thead>
<tbody> <vn-tbody>
<tr ng-if="$ctrl.transfer.lastActiveTickets.length === 0" > <vn-data-viewer data="$ctrl.transfer.lastActiveTickets">
<td colspan="4" style="text-align: center" translate>No results</td> </vn-data-viewer>
</tr> <vn-tr
<tr
class="clickable" class="clickable"
ng-repeat="ticket in $ctrl.transfer.lastActiveTickets track by ticket.id" ng-repeat="ticket in $ctrl.transfer.lastActiveTickets track by ticket.id"
ng-click="$ctrl.transferSales(ticket.id)"> ng-click="$ctrl.transferSales(ticket.id)">
<td number>{{::ticket.id}}</td> <vn-td number>{{::ticket.id}}</vn-td>
<td number>{{::ticket.shipped | date: 'dd/MM/yyyy'}}</td> <vn-td number>{{::ticket.shipped | date: 'dd/MM/yyyy'}}</vn-td>
<td number>{{::ticket.agencyName}}</td> <vn-td number>{{::ticket.agencyName}}</vn-td>
<td number>{{::ticket.warehouseName}}</td> <vn-td number>{{::ticket.warehouseName}}</vn-td>
<td number>{{::ticket.address}}</td> <vn-td number>{{::ticket.address}}</vn-td>
</tr> </vn-tr>
</tbody> </vn-tbody>
</table> </vn-table>
<form name="form"> <form name="form">
<vn-horizontal class="vn-py-md"> <vn-horizontal class="vn-py-md">
<vn-input-number vn-one <vn-input-number vn-one

View File

@ -80,8 +80,8 @@ vn-ticket-sale {
max-height: 400px; max-height: 400px;
width: 480px; width: 480px;
} }
table { .destinationTable {
width: 400px width: 700px
} }
} }
.vn-popover .edit-popover { .vn-popover .edit-popover {