update order filter
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Bernat Exposito Domenech 2020-07-06 10:20:45 +02:00
parent c42c6c19d6
commit ee704b302c
4 changed files with 12 additions and 9 deletions

View File

@ -625,7 +625,7 @@ export default {
},
ordersIndex: {
searchResult: 'vn-order-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
firstSearchResultTotal: 'vn-order-index vn-card > vn-table > div > vn-tbody vn-tr vn-td:nth-child(7)',
secondSearchResultTotal: 'vn-order-index vn-card > vn-table > div > vn-tbody vn-tr:nth-child(2) vn-td:nth-child(9)',
searchResultDate: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(4)',
searchResultAddress: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(6)',
searchButton: 'vn-searchbar vn-icon[icon="search"]',

View File

@ -15,9 +15,9 @@ describe('Order Index', () => {
await browser.close();
});
it(`should check the first search result doesn't contain a total of 0€`, async() => {
it(`should check the second search result doesn't contain a total of 0€`, async() => {
await page.waitToClick(selectors.ordersIndex.searchButton);
const result = await page.waitToGetProperty(selectors.ordersIndex.firstSearchResultTotal, 'innerText');
const result = await page.waitToGetProperty(selectors.ordersIndex.secondSearchResultTotal, 'innerText');
expect(result).not.toContain('0.00');
});
@ -26,8 +26,8 @@ describe('Order Index', () => {
await page.waitToClick(selectors.ordersIndex.openAdvancedSearch);
await page.waitToClick(selectors.ordersIndex.advancedSearchShowEmptyCheckbox);
await page.waitToClick(selectors.ordersIndex.advancedSearchButton);
await page.waitForTextInElement(selectors.ordersIndex.firstSearchResultTotal, '0.00');
const result = await page.waitToGetProperty(selectors.ordersIndex.firstSearchResultTotal, 'innerText');
await page.waitForTextInElement(selectors.ordersIndex.secondSearchResultTotal, '0.00');
const result = await page.waitToGetProperty(selectors.ordersIndex.secondSearchResultTotal, 'innerText');
expect(result).toContain('0.00');
});

View File

@ -1,7 +1,6 @@
const app = require('vn-loopback/server/server');
// #2304
xdescribe('regularizeClaim()', () => {
describe('regularizeClaim()', () => {
const claimFk = 1;
const pendentState = 1;
const resolvedState = 3;

View File

@ -133,7 +133,6 @@ module.exports = Self => {
});
filter = mergeFilters(filter, {where});
let stmts = [];
let stmt;
@ -178,7 +177,12 @@ module.exports = Self => {
});
}
stmt.merge(conn.makeSuffix(filter));
// stmt.merge(conn.makeSuffix(filter));
stmt.merge(conn.makeWhere(filter.where));
stmt.merge({
sql: `GROUP BY o.id`
});
stmt.merge(conn.makePagination(filter));
stmts.push(stmt);
stmts.push(`