E2E fixes
gitea/salix/1838-searchbar_refactor This commit has test failures
Details
gitea/salix/1838-searchbar_refactor This commit has test failures
Details
This commit is contained in:
parent
976782738e
commit
cf6961f5c5
|
@ -7,8 +7,6 @@ import config from './config.js';
|
|||
let currentUser;
|
||||
|
||||
let actions = {
|
||||
// Generic extensions
|
||||
|
||||
clickIfExists: async function(selector) {
|
||||
let exists = await this.exists(selector);
|
||||
if (exists) await this.click(selector);
|
||||
|
@ -25,8 +23,6 @@ let actions = {
|
|||
}, selector);
|
||||
},
|
||||
|
||||
// Salix specific extensions
|
||||
|
||||
changeLanguageToEnglish: async function() {
|
||||
let langSelector = '.user-popover vn-autocomplete[ng-model="$ctrl.lang"]';
|
||||
|
||||
|
@ -72,7 +68,7 @@ let actions = {
|
|||
|
||||
currentUser = userName;
|
||||
} else
|
||||
await this.waitToClick('vn-topbar a[ui-sref="home"]');
|
||||
await this.waitToClick('a[ui-sref=home]');
|
||||
},
|
||||
|
||||
waitForLogin: async function(userName) {
|
||||
|
@ -367,7 +363,7 @@ let actions = {
|
|||
if (!nested)
|
||||
return this.waitToClick(`vn-left-menu li > a[ui-sref="${sectionRoute}"]`);
|
||||
|
||||
return this.waitToClick('vn-left-menu .collapsed')
|
||||
return this.waitToClick('vn-left-menu vn-item-section > vn-icon[icon=keyboard_arrow_down]')
|
||||
.wait('vn-left-menu .expanded')
|
||||
.waitToClick(`vn-left-menu li > a[ui-sref="${sectionRoute}"]`);
|
||||
});
|
||||
|
@ -421,7 +417,7 @@ let actions = {
|
|||
},
|
||||
|
||||
waitForSpinnerLoad: function() {
|
||||
return this.waitForClassNotPresent('vn-spinner > div', 'is-active');
|
||||
return this.waitUntilNotPresent('vn-topbar vn-spinner');
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ export default {
|
|||
invoiceOutButton: '.modules-menu > li[ui-sref="invoiceOut.index"]',
|
||||
claimsButton: '.modules-menu > li[ui-sref="claim.index"]',
|
||||
returnToModuleIndexButton: 'a[ui-sref="order.index"]',
|
||||
userMenuButton: 'vn-topbar #user',
|
||||
userMenuButton: '#user',
|
||||
userLocalWarehouse: '.user-popover vn-autocomplete[ng-model="$ctrl.localWarehouseFk"]',
|
||||
userLocalBank: '.user-popover vn-autocomplete[ng-model="$ctrl.localBankFk"]',
|
||||
userLocalCompany: '.user-popover vn-autocomplete[ng-model="$ctrl.localCompanyFk"]',
|
||||
|
@ -23,7 +23,7 @@ export default {
|
|||
clientsIndex: {
|
||||
searchClientInput: `vn-textfield input`,
|
||||
searchButton: 'vn-searchbar vn-icon[icon="search"]',
|
||||
search-result: 'vn-client-index .vn-item',
|
||||
searchResult: 'vn-client-index .vn-item',
|
||||
createClientButton: `vn-float-button`,
|
||||
othersButton: 'vn-left-menu li[name="Others"] > a'
|
||||
},
|
||||
|
@ -180,11 +180,11 @@ export default {
|
|||
acceptDeleteButton: '.vn-confirm.shown button[response="accept"]'
|
||||
},
|
||||
itemsIndex: {
|
||||
searchIcon: 'vn-item-index vn-searchbar vn-icon[icon="search"]',
|
||||
searchIcon: 'vn-searchbar vn-icon[icon="search"]',
|
||||
createItemButton: `vn-float-button`,
|
||||
search-result: 'vn-item-index a.vn-tr',
|
||||
search-resultPreviewButton: 'vn-item-index .buttons > [icon="desktop_windows"]',
|
||||
search-resultCloneButton: 'vn-item-index .buttons > [icon="icon-clone"]',
|
||||
searchResult: 'vn-item-index a.vn-tr',
|
||||
searchResultPreviewButton: 'vn-item-index .buttons > [icon="desktop_windows"]',
|
||||
searchResultCloneButton: 'vn-item-index .buttons > [icon="icon-clone"]',
|
||||
acceptClonationAlertButton: '.vn-confirm.shown [response="accept"]',
|
||||
searchItemInput: 'vn-searchbar vn-textfield input',
|
||||
searchButton: 'vn-searchbar vn-icon[icon="search"]',
|
||||
|
@ -323,18 +323,18 @@ export default {
|
|||
setOk: 'vn-ticket-summary vn-button[label="SET OK"] > button'
|
||||
},
|
||||
ticketsIndex: {
|
||||
openAdvancedSearchButton: 'vn-ticket-index vn-searchbar .append vn-icon[icon="arrow_drop_down"]',
|
||||
openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]',
|
||||
advancedSearchInvoiceOut: 'vn-ticket-search-panel vn-textfield[ng-model="filter.refFk"] input',
|
||||
newTicketButton: 'vn-ticket-index > a',
|
||||
search-result: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
||||
searchResult: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
||||
searchWeeklyResult: 'vn-ticket-weekly-index vn-table vn-tbody > vn-tr',
|
||||
search-resultDate: 'vn-ticket-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(5)',
|
||||
searchTicketInput: `vn-ticket-index vn-textfield input`,
|
||||
searchWeeklyTicketInput: `vn-ticket-weekly-index vn-textfield input`,
|
||||
searchWeeklyClearInput: 'vn-ticket-weekly-index vn-searchbar vn-icon[icon=clear]',
|
||||
searchResultDate: 'vn-ticket-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(5)',
|
||||
searchTicketInput: `vn-searchbar input`,
|
||||
searchWeeklyTicketInput: `vn-searchbar input`,
|
||||
searchWeeklyClearInput: 'vn-searchbar vn-icon[icon=clear]',
|
||||
advancedSearchButton: 'vn-ticket-search-panel button[type=submit]',
|
||||
searchButton: 'vn-ticket-index vn-searchbar vn-icon[icon="search"]',
|
||||
searchWeeklyButton: 'vn-ticket-weekly-index vn-searchbar vn-icon[icon="search"]',
|
||||
searchButton: 'vn-searchbar vn-icon[icon="search"]',
|
||||
searchWeeklyButton: 'vn-searchbar vn-icon[icon="search"]',
|
||||
moreMenu: 'vn-ticket-index vn-icon-menu[icon=more_vert]',
|
||||
moreMenuWeeklyTickets: '.vn-drop-down.shown li:nth-child(2)',
|
||||
sixthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tr:nth-child(6) vn-autocomplete[ng-model="weekly.weekDay"] input',
|
||||
|
@ -516,9 +516,9 @@ export default {
|
|||
saveStateButton: `button[type=submit]`
|
||||
},
|
||||
claimsIndex: {
|
||||
searchClaimInput: `vn-claim-index vn-textfield input`,
|
||||
search-result: 'vn-claim-index vn-card > vn-table > div > vn-tbody > a',
|
||||
searchButton: 'vn-claim-index vn-searchbar vn-icon[icon="search"]'
|
||||
searchClaimInput: `vn-searchbar input`,
|
||||
searchResult: 'vn-claim-index vn-card > vn-table > div > vn-tbody > a',
|
||||
searchButton: 'vn-searchbar vn-icon[icon="search"]'
|
||||
},
|
||||
claimDescriptor: {
|
||||
moreMenu: 'vn-claim-descriptor vn-icon-menu[icon=more_vert]',
|
||||
|
@ -580,11 +580,11 @@ export default {
|
|||
isPaidWithManaCheckbox: 'vn-check[ng-model="$ctrl.claim.isChargedToMana"]'
|
||||
},
|
||||
ordersIndex: {
|
||||
search-result: 'vn-order-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
||||
search-resultDate: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(4)',
|
||||
search-resultAddress: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(6)',
|
||||
searchResult: 'vn-order-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
||||
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)',
|
||||
searchOrderInput: `vn-order-index vn-textfield input`,
|
||||
searchButton: 'vn-order-index vn-searchbar vn-icon[icon="search"]',
|
||||
searchButton: 'vn-searchbar vn-icon[icon="search"]',
|
||||
createOrderButton: `vn-float-button`,
|
||||
},
|
||||
orderDescriptor: {
|
||||
|
@ -720,9 +720,9 @@ export default {
|
|||
navigateBackToIndex: 'vn-worker-descriptor vn-icon[icon="chevron_left"]'
|
||||
},
|
||||
invoiceOutIndex: {
|
||||
searchInvoiceOutInput: `vn-invoice-out-index vn-textfield input`,
|
||||
searchButton: 'vn-invoice-out-index vn-searchbar vn-icon[icon="search"]',
|
||||
search-result: 'vn-invoice-out-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
||||
searchInvoiceOutInput: `vn-searchbar input`,
|
||||
searchButton: 'vn-searchbar vn-icon[icon="search"]',
|
||||
searchResult: 'vn-invoice-out-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
||||
},
|
||||
invoiceOutDescriptor: {
|
||||
moreMenu: 'vn-invoice-out-descriptor vn-icon-menu[icon=more_vert]',
|
||||
|
|
|
@ -13,8 +13,8 @@ describe('Client create path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
||||
.waitToClick(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.search-result, 0)
|
||||
.countElement(selectors.clientsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 0)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(0);
|
||||
});
|
||||
|
@ -117,8 +117,8 @@ describe('Client create path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
||||
.waitToClick(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.search-result, 1)
|
||||
.countElement(selectors.clientsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
|
|
@ -135,16 +135,16 @@ describe('Client balance path', () => {
|
|||
let resultCount = await nightmare
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.waitToClick(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.search-result, 1)
|
||||
.countElement(selectors.clientsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
||||
expect(resultCount).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the client's balance`, async() => {
|
||||
let url = await nightmare
|
||||
.waitForTextInElement(selectors.clientsIndex.search-result, 'Petter Parker')
|
||||
.waitToClick(selectors.clientsIndex.search-result)
|
||||
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
|
||||
.waitToClick(selectors.clientsIndex.searchResult)
|
||||
.waitToClick(selectors.clientBalance.balanceButton)
|
||||
.waitForURL('/balance')
|
||||
.parsedUrl();
|
||||
|
|
|
@ -14,16 +14,16 @@ describe('Item summary path', () => {
|
|||
.clearInput(selectors.itemsIndex.searchItemInput)
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon longbow 2m')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.search-result, 1)
|
||||
.countElement(selectors.itemsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result summary button to open the item summary popup`, async() => {
|
||||
const isVisible = await nightmare
|
||||
.waitForTextInElement(selectors.itemsIndex.search-result, 'Ranged weapon longbow 2m')
|
||||
.waitToClick(selectors.itemsIndex.search-resultPreviewButton)
|
||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Ranged weapon longbow 2m')
|
||||
.waitToClick(selectors.itemsIndex.searchResultPreviewButton)
|
||||
.isVisible(selectors.itemSummary.basicData);
|
||||
|
||||
expect(isVisible).toBeTruthy();
|
||||
|
@ -80,20 +80,20 @@ describe('Item summary path', () => {
|
|||
|
||||
it('should search for other item', async() => {
|
||||
const result = await nightmare
|
||||
.clearInput('vn-item-index vn-searchbar input')
|
||||
.clearInput('vn-searchbar input')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Melee weapon combat fist 15cm')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.search-result, 1)
|
||||
.countElement(selectors.itemsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should now click on the search result summary button to open the item summary popup`, async() => {
|
||||
const isVisible = await nightmare
|
||||
.waitForTextInElement(selectors.itemsIndex.search-result, 'Melee weapon combat fist 15cm')
|
||||
.waitToClick(selectors.itemsIndex.search-resultPreviewButton)
|
||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Melee weapon combat fist 15cm')
|
||||
.waitToClick(selectors.itemsIndex.searchResultPreviewButton)
|
||||
.isVisible(selectors.itemSummary.basicData);
|
||||
|
||||
|
||||
|
@ -151,7 +151,7 @@ describe('Item summary path', () => {
|
|||
|
||||
it(`should navigate to the one of the items detailed section`, async() => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.itemsIndex.search-result)
|
||||
.waitToClick(selectors.itemsIndex.searchResult)
|
||||
.waitForURL('summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ describe('Item Create/Clone path', () => {
|
|||
.clearInput(selectors.itemsIndex.searchItemInput)
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.search-result, 0)
|
||||
.countElement(selectors.itemsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 0)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(0);
|
||||
});
|
||||
|
@ -99,16 +99,16 @@ describe('Item Create/Clone path', () => {
|
|||
.clearInput(selectors.itemsIndex.searchItemInput)
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.search-result, 1)
|
||||
.countElement(selectors.itemsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should clone the Infinity Gauntlet`, async() => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.itemsIndex.search-result, 'Infinity Gauntlet')
|
||||
.waitToClick(selectors.itemsIndex.search-resultCloneButton)
|
||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Infinity Gauntlet')
|
||||
.waitToClick(selectors.itemsIndex.searchResultCloneButton)
|
||||
.waitToClick(selectors.itemsIndex.acceptClonationAlertButton)
|
||||
.waitForURL('tags')
|
||||
.parsedUrl();
|
||||
|
@ -122,8 +122,8 @@ describe('Item Create/Clone path', () => {
|
|||
.clearInput(selectors.itemsIndex.searchItemInput)
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.search-result, 2)
|
||||
.countElement(selectors.itemsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 2)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(2);
|
||||
});
|
||||
|
|
|
@ -32,16 +32,16 @@ describe('Item regularize path', () => {
|
|||
.clearInput(selectors.itemsIndex.searchItemInput)
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon pistol 9mm')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.search-result, 1)
|
||||
.countElement(selectors.itemsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(resultCount).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the item tax`, async() => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.itemsIndex.search-result, 'Ranged weapon pistol 9mm')
|
||||
.waitToClick(selectors.itemsIndex.search-result)
|
||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Ranged weapon pistol 9mm')
|
||||
.waitToClick(selectors.itemsIndex.searchResult)
|
||||
.waitForURL('/summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
@ -91,16 +91,16 @@ describe('Item regularize path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'missing')
|
||||
.waitToClick(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 1)
|
||||
.countElement(selectors.ticketsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the ticket summary`, async() => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.ticketsIndex.search-result, 'Missing')
|
||||
.waitToClick(selectors.ticketsIndex.search-result)
|
||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'Missing')
|
||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||
.waitForURL('/summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
@ -138,16 +138,16 @@ describe('Item regularize path', () => {
|
|||
.clearInput(selectors.itemsIndex.searchItemInput)
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon pistol 9mm')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.search-result, 1)
|
||||
.countElement(selectors.itemsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(resultCount).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the item tax`, async() => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.itemsIndex.search-result, 'Ranged weapon pistol 9mm')
|
||||
.waitToClick(selectors.itemsIndex.search-result)
|
||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Ranged weapon pistol 9mm')
|
||||
.waitToClick(selectors.itemsIndex.searchResult)
|
||||
.waitForURL('/summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
@ -181,16 +181,16 @@ describe('Item regularize path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 25)
|
||||
.waitToClick(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 1)
|
||||
.countElement(selectors.ticketsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should now click on the search result to access to the ticket summary`, async() => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.ticketsIndex.search-result, '25')
|
||||
.waitToClick(selectors.ticketsIndex.search-result)
|
||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, '25')
|
||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||
.waitForURL('/summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
|
|
@ -38,10 +38,10 @@ describe('Item index path', () => {
|
|||
|
||||
it('should navigate forth and back to see the images column is still visible', async() => {
|
||||
const imageVisible = await nightmare
|
||||
.waitToClick(selectors.itemsIndex.search-result)
|
||||
.waitToClick(selectors.itemsIndex.searchResult)
|
||||
.waitToClick(selectors.itemDescriptor.goBackToModuleIndexButton)
|
||||
.waitToClick(selectors.itemsIndex.searchIcon)
|
||||
.wait(selectors.itemsIndex.search-result)
|
||||
.wait(selectors.itemsIndex.searchResult)
|
||||
.isVisible(selectors.itemsIndex.firstItemImage);
|
||||
|
||||
expect(imageVisible).toBeTruthy();
|
||||
|
@ -75,10 +75,10 @@ describe('Item index path', () => {
|
|||
|
||||
it('should now navigate forth and back to see the ids column is now visible', async() => {
|
||||
const idVisible = await nightmare
|
||||
.waitToClick(selectors.itemsIndex.search-result)
|
||||
.waitToClick(selectors.itemsIndex.searchResult)
|
||||
.waitToClick(selectors.itemDescriptor.goBackToModuleIndexButton)
|
||||
.waitToClick(selectors.itemsIndex.searchIcon)
|
||||
.wait(selectors.itemsIndex.search-result)
|
||||
.wait(selectors.itemsIndex.searchResult)
|
||||
.isVisible(selectors.itemsIndex.firstItemId);
|
||||
|
||||
expect(idVisible).toBeTruthy();
|
||||
|
|
|
@ -12,8 +12,8 @@ describe('Item log path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Knowledge artifact')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.search-result, 0)
|
||||
.countElement(selectors.itemsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 0)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(0);
|
||||
});
|
||||
|
|
|
@ -213,8 +213,8 @@ xdescribe('Ticket Edit sale path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.claimsIndex.searchClaimInput, 4)
|
||||
.waitToClick(selectors.claimsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.claimsIndex.search-result, 1)
|
||||
.countElement(selectors.claimsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.claimsIndex.searchResult, 1)
|
||||
.countElement(selectors.claimsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
|
|
@ -7,7 +7,7 @@ describe('Ticket expeditions and log path', () => {
|
|||
beforeAll(() => {
|
||||
return nightmare
|
||||
.loginAndModule('production', 'ticket')
|
||||
.accessToSearchResult('id:1')
|
||||
.accessToSearchResult('1')
|
||||
.accessToSection('ticket.card.expedition');
|
||||
});
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ describe('Ticket Create packages path', () => {
|
|||
beforeAll(() => {
|
||||
return nightmare
|
||||
.loginAndModule('employee', 'ticket')
|
||||
.accessToSearchResult('id:1')
|
||||
.accessToSearchResult('1')
|
||||
.accessToSection('ticket.card.package');
|
||||
});
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('Ticket Create new tracking state path', () => {
|
|||
beforeAll(() => {
|
||||
return nightmare
|
||||
.loginAndModule('production', 'ticket')
|
||||
.accessToSearchResult('id:1')
|
||||
.accessToSearchResult('1')
|
||||
.accessToSection('ticket.card.tracking.index');
|
||||
});
|
||||
|
||||
|
@ -44,7 +44,7 @@ describe('Ticket Create new tracking state path', () => {
|
|||
beforeAll(() => {
|
||||
return nightmare
|
||||
.loginAndModule('salesPerson', 'ticket')
|
||||
.accessToSearchResult('id:1')
|
||||
.accessToSearchResult('1')
|
||||
.accessToSection('ticket.card.tracking.index');
|
||||
});
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ describe('Ticket List components path', () => {
|
|||
beforeAll(() => {
|
||||
return nightmare
|
||||
.loginAndModule('employee', 'ticket')
|
||||
.accessToSearchResult('id:1')
|
||||
.accessToSearchResult('1')
|
||||
.accessToSection('ticket.card.components');
|
||||
});
|
||||
|
||||
|
|
|
@ -34,15 +34,15 @@ describe('Ticket descriptor path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 11)
|
||||
.waitToClick(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 1)
|
||||
.countElement(selectors.ticketsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the ticket`, async() => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.ticketsIndex.search-result)
|
||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||
.waitForURL('/summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
@ -94,15 +94,15 @@ describe('Ticket descriptor path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 11)
|
||||
.waitToClick(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 1)
|
||||
.countElement(selectors.ticketsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the ticket`, async() => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.ticketsIndex.search-result)
|
||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||
.waitForURL('/summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
@ -160,7 +160,7 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
it('should confirm the sixth weekly ticket was deleted', async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick('vn-ticket-weekly-index vn-searchbar vn-icon[icon=clear]')
|
||||
.waitToClick('vn-searchbar vn-icon[icon=clear]')
|
||||
.waitToClick(selectors.ticketsIndex.searchWeeklyButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchWeeklyResult, 5)
|
||||
.countElement(selectors.ticketsIndex.searchWeeklyResult);
|
||||
|
|
|
@ -7,7 +7,7 @@ describe('Ticket purchase request path', () => {
|
|||
beforeAll(() => {
|
||||
nightmare
|
||||
.loginAndModule('salesPerson', 'ticket')
|
||||
.accessToSearchResult('id:16')
|
||||
.accessToSearchResult('16')
|
||||
.accessToSection('ticket.card.request.index');
|
||||
});
|
||||
|
||||
|
|
|
@ -14,16 +14,16 @@ describe('Ticket diary path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 1)
|
||||
.waitToClick(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 1)
|
||||
.countElement(selectors.ticketsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the ticket summary`, async() => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.ticketsIndex.search-result, 'Bat cave')
|
||||
.waitToClick(selectors.ticketsIndex.search-result)
|
||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'Bat cave')
|
||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||
.waitForURL('/summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
|
|
@ -14,16 +14,16 @@ describe('Ticket descriptor path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 18)
|
||||
.waitToClick(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 1)
|
||||
.countElement(selectors.ticketsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the ticket summary`, async() => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.ticketsIndex.search-result, 'Cerebro')
|
||||
.waitToClick(selectors.ticketsIndex.search-result)
|
||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'Cerebro')
|
||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||
.waitForURL('/summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
@ -69,9 +69,9 @@ describe('Ticket descriptor path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 18)
|
||||
.waitToClick(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 1)
|
||||
.wait(selectors.ticketsIndex.search-resultDate)
|
||||
.waitToGetProperty(selectors.ticketsIndex.search-resultDate, 'innerText');
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.wait(selectors.ticketsIndex.searchResultDate)
|
||||
.waitToGetProperty(selectors.ticketsIndex.searchResultDate, 'innerText');
|
||||
|
||||
expect(result).toContain(2000);
|
||||
});
|
||||
|
@ -83,16 +83,16 @@ describe('Ticket descriptor path', () => {
|
|||
.clearInput(selectors.ticketsIndex.searchTicketInput)
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 16)
|
||||
.waitToClick(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 1)
|
||||
.countElement(selectors.ticketsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should now click on the search result to access to the ticket summary`, async() => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.ticketsIndex.search-result, 'Many Places')
|
||||
.waitToClick(selectors.ticketsIndex.search-result)
|
||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'Many Places')
|
||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||
.waitForURL('/summary')
|
||||
.parsedUrl();
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ describe('claim Descriptor path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.claimsIndex.searchClaimInput, claimId)
|
||||
.waitToClick(selectors.claimsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.claimsIndex.search-result, 0)
|
||||
.countElement(selectors.claimsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.claimsIndex.searchResult, 0)
|
||||
.countElement(selectors.claimsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(0);
|
||||
});
|
||||
|
|
|
@ -15,8 +15,8 @@ describe('InvoiceOut descriptor path', () => {
|
|||
.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton)
|
||||
.write(selectors.ticketsIndex.advancedSearchInvoiceOut, 'T2222222')
|
||||
.waitToClick(selectors.ticketsIndex.advancedSearchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 1)
|
||||
.countElement(selectors.ticketsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
@ -36,8 +36,8 @@ describe('InvoiceOut descriptor path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.invoiceOutIndex.searchInvoiceOutInput, 'T2222222')
|
||||
.waitToClick(selectors.invoiceOutIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.invoiceOutIndex.search-result, 1)
|
||||
.countElement(selectors.invoiceOutIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.invoiceOutIndex.searchResult, 1)
|
||||
.countElement(selectors.invoiceOutIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
@ -72,8 +72,8 @@ describe('InvoiceOut descriptor path', () => {
|
|||
const result = await nightmare
|
||||
.write(selectors.invoiceOutIndex.searchInvoiceOutInput, 'T2222222')
|
||||
.waitToClick(selectors.invoiceOutIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.invoiceOutIndex.search-result, 0)
|
||||
.countElement(selectors.invoiceOutIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.invoiceOutIndex.searchResult, 0)
|
||||
.countElement(selectors.invoiceOutIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(0);
|
||||
});
|
||||
|
@ -94,8 +94,8 @@ describe('InvoiceOut descriptor path', () => {
|
|||
.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton)
|
||||
.write(selectors.ticketsIndex.advancedSearchInvoiceOut, 'T2222222')
|
||||
.waitToClick(selectors.ticketsIndex.advancedSearchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.search-result, 0)
|
||||
.countElement(selectors.ticketsIndex.search-result);
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 0)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
expect(result).toEqual(0);
|
||||
});
|
||||
|
|
|
@ -99,13 +99,10 @@ export default class Popup extends Component {
|
|||
|
||||
onClose() {
|
||||
this.closeTimeout = null;
|
||||
this.document.body.removeChild(this.popup);
|
||||
|
||||
this.$contentScope.$destroy();
|
||||
this.popup.remove();
|
||||
this.popup = null;
|
||||
this.$contentScope.$destroy();
|
||||
this.windowEl = null;
|
||||
|
||||
this.emit('close');
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,11 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.landsThatDay = async filter => {
|
||||
let query = `CALL vn.zone_getAvailable(?, ?);`;
|
||||
let query = `
|
||||
CALL vn.zoneGetAgency(?, ?);
|
||||
SELECT * FROM tmp.zoneGetAgency;
|
||||
DROP TEMPORARY TABLE tmp.zoneGetAgency;
|
||||
`;
|
||||
let result = await Self.rawSql(query, [filter.addressFk, filter.landed]);
|
||||
|
||||
return result[1];
|
||||
|
|
|
@ -10,13 +10,12 @@
|
|||
</vn-crud-model>
|
||||
<vn-portal slot="topbar">
|
||||
<vn-searchbar
|
||||
vn-id="turnSearchbar"
|
||||
style="width: 100%"
|
||||
on-search="$ctrl.onSearch($params)"
|
||||
info="Search weekly ticket by id or client id"
|
||||
vn-focus>
|
||||
info="Search weekly ticket by id or client id">
|
||||
</vn-searchbar>
|
||||
</vn-portal>
|
||||
<vn-auto-search
|
||||
on-search="$ctrl.onSearch($params)">
|
||||
</vn-auto-search>
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md vn-mb-xl">
|
||||
|
|
Loading…
Reference in New Issue