8093-devToTest_2442_3 #3100
|
@ -1,68 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('SmartTable SearchBar integration', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('salesPerson', 'item');
|
|
||||||
await page.waitToClick(selectors.globalItems.searchButton);
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should search by type in searchBar, reload page and have same results', async() => {
|
|
||||||
await page.waitToClick(selectors.itemsIndex.openAdvancedSearchButton);
|
|
||||||
await page.autocompleteSearch(selectors.itemsIndex.advancedSearchItemType, 'Anthurium');
|
|
||||||
await page.waitToClick(selectors.itemsIndex.advancedSearchButton);
|
|
||||||
await page.waitForNumberOfElements(selectors.itemsIndex.searchResult, 4);
|
|
||||||
|
|
||||||
await page.reload({
|
|
||||||
waitUntil: 'networkidle2'
|
|
||||||
});
|
|
||||||
|
|
||||||
await page.waitForNumberOfElements(selectors.itemsIndex.searchResult, 4);
|
|
||||||
|
|
||||||
await page.write(selectors.itemsIndex.advancedSmartTableGrouping, '1');
|
|
||||||
await page.keyboard.press('Enter');
|
|
||||||
await page.waitForNumberOfElements(selectors.itemsIndex.searchResult, 2);
|
|
||||||
|
|
||||||
await page.reload({
|
|
||||||
waitUntil: 'networkidle2'
|
|
||||||
});
|
|
||||||
|
|
||||||
await page.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should filter in section without smart-table and search in searchBar go to zone section', async() => {
|
|
||||||
await page.loginAndModule('salesPerson', 'zone');
|
|
||||||
await page.waitToClick(selectors.globalItems.searchButton);
|
|
||||||
|
|
||||||
await page.doSearch('A');
|
|
||||||
const firstCount = await page.countElement(selectors.zoneIndex.searchResult);
|
|
||||||
|
|
||||||
await page.doSearch('A');
|
|
||||||
const secondCount = await page.countElement(selectors.zoneIndex.searchResult);
|
|
||||||
|
|
||||||
expect(firstCount).toEqual(7);
|
|
||||||
expect(secondCount).toEqual(7);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should order orders by first id and order by last id, reload page and have same order', async() => {
|
|
||||||
await page.loginAndModule('developer', 'item');
|
|
||||||
await page.accessToSection('item.fixedPrice');
|
|
||||||
await page.keyboard.press('Enter');
|
|
||||||
|
|
||||||
await page.waitForTextInField(selectors.itemFixedPrice.firstItemID, '1');
|
|
||||||
|
|
||||||
await page.waitToClick(selectors.itemFixedPrice.orderColumnId);
|
|
||||||
await page.reload({
|
|
||||||
waitUntil: 'networkidle2'
|
|
||||||
});
|
|
||||||
await page.waitForTextInField(selectors.itemFixedPrice.firstItemID, '3');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,7 +1,7 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../module';
|
||||||
import ModuleMain from 'salix/components/module-main';
|
import ModuleMain from 'salix/components/module-main';
|
||||||
|
|
||||||
export default class InvoiceOut extends ModuleMain {
|
export default class Zone extends ModuleMain {
|
||||||
constructor($element, $) {
|
constructor($element, $) {
|
||||||
super($element, $);
|
super($element, $);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
"menus": {
|
"menus": {
|
||||||
"main": [
|
"main": [
|
||||||
{"state": "zone.index", "icon": "icon-zone"},
|
{"state": "zone.index", "icon": "icon-zone"},
|
||||||
{"state": "zone.deliveryDays", "icon": "today"},
|
|
||||||
{"state": "zone.upcomingDeliveries", "icon": "today"}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"keybindings": [
|
"keybindings": [
|
||||||
|
@ -27,18 +25,6 @@
|
||||||
"state": "zone.index",
|
"state": "zone.index",
|
||||||
"component": "vn-zone-index",
|
"component": "vn-zone-index",
|
||||||
"description": "Zones"
|
"description": "Zones"
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "/delivery-days?q&deliveryMethodFk&geoFk&agencyModeFk",
|
|
||||||
"state": "zone.deliveryDays",
|
|
||||||
"component": "vn-zone-delivery-days",
|
|
||||||
"description": "Delivery days"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "/upcoming-deliveries",
|
|
||||||
"state": "zone.upcomingDeliveries",
|
|
||||||
"component": "vn-upcoming-deliveries",
|
|
||||||
"description": "Upcoming deliveries"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue