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