Merge branch 'dev' of http://git.verdnatura.es/salix into dev

This commit is contained in:
Carlos Jimenez 2018-11-21 16:59:16 +01:00
commit 635a80104b
56 changed files with 173 additions and 138 deletions

View File

@ -47,8 +47,8 @@
</vn-td> </vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate> <vn-empty-rows ng-if="!model.data || model.data.length === 0" translate>
No results Enter a new search
</vn-empty-rows> </vn-empty-rows>
</vn-table> </vn-table>
</vn-card> </vn-card>

View File

@ -13,6 +13,7 @@
panel="vn-claim-search-panel" panel="vn-claim-search-panel"
model="model" model="model"
expr-builder="$ctrl.exprBuilder(param, value)" expr-builder="$ctrl.exprBuilder(param, value)"
auto-load="true"
vn-focus> vn-focus>
</vn-searchbar> </vn-searchbar>
</vn-card> </vn-card>
@ -42,15 +43,15 @@
<vn-td>{{::claim.claimState.description}}</vn-td> <vn-td>{{::claim.claimState.description}}</vn-td>
<vn-td> <vn-td>
<vn-icon-button <vn-icon-button
ng-click="$ctrl.preview(claim)" ng-click="$ctrl.preview($event, claim)"
vn-tooltip="Preview" vn-tooltip="Preview"
icon="desktop_windows"> icon="desktop_windows">
</vn-icon-button> </vn-icon-button>
</vn-td> </vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate> <vn-empty-rows ng-if="!model.data || model.data.length === 0" translate>
No results Enter a new search
</vn-empty-rows> </vn-empty-rows>
</vn-table> </vn-table>
</vn-card> </vn-card>

View File

@ -6,6 +6,7 @@ Responsible: Responsable
Remove sale: Borrar linea Remove sale: Borrar linea
Claim Id: Id reclamación Claim Id: Id reclamación
Created: Creado Created: Creado
Enter a new search: Introduce una nueva búsqueda
#sections #sections
Claims: Reclamaciones Claims: Reclamaciones

View File

@ -22,6 +22,10 @@
ng-repeat="client in clients track by client.id" ng-repeat="client in clients track by client.id"
client="::client"> client="::client">
</vn-item-client> </vn-item-client>
<vn-empty-rows class="vn-list-item" style="text-align: center"
ng-if="!model.data || model.data.length === 0" translate>
Enter a new search
</vn-empty-rows>
</vn-card> </vn-card>
<vn-pagination <vn-pagination
model="model" model="model"

View File

@ -28,6 +28,7 @@ export default class Controller {
case 'fi': case 'fi':
case 'postcode': case 'postcode':
case 'email': case 'email':
case 'salesPersonFk':
return {[param]: value}; return {[param]: value};
} }
} }

View File

@ -24,6 +24,7 @@ Sample: Plantilla
Credit: Crédito Credit: Crédito
Are you sure you want to delete this expedition?: ¿Está seguro de borrar esta expedición? Are you sure you want to delete this expedition?: ¿Está seguro de borrar esta expedición?
Others: Otros Others: Otros
Enter a new search: Introduce una nueva búsqueda
# Sections # Sections
Clients: Clientes Clients: Clientes

View File

@ -25,6 +25,15 @@
vn-one label="Name" vn-one label="Name"
model="filter.name"> model="filter.name">
</vn-textfield> </vn-textfield>
<vn-autocomplete
vn-one
field="filter.salesPersonFk"
url="/client/api/Clients/activeSalesPerson"
show-field="name"
value-field="id"
label="Salesperson">
<tpl-item>{{firstName}} {{name}}</tpl-item>
</vn-autocomplete>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield <vn-textfield

View File

@ -26,6 +26,7 @@ export default class Controller extends Component {
this.filter = {}; this.filter = {};
this.searchString = ''; this.searchString = '';
this.autoLoad = false;
} }
$onInit() { $onInit() {
@ -33,7 +34,9 @@ export default class Controller extends Component {
this.filter = JSON.parse(decodeURIComponent(this.$state.params.q)); this.filter = JSON.parse(decodeURIComponent(this.$state.params.q));
this.refreshString(); this.refreshString();
this.doSearch();
if (this.autoLoad || !angular.equals({}, this.filter))
this.doSearch();
} }
changeState(transition) { changeState(transition) {
@ -63,9 +66,10 @@ export default class Controller extends Component {
onPanelSubmit(filter) { onPanelSubmit(filter) {
this.$.popover.hide(); this.$.popover.hide();
for (let param in filter) for (let param in filter) {
if (filter[param] == null) if (filter[param] == null)
delete filter[param]; delete filter[param];
}
this.filter = filter; this.filter = filter;
this.refreshString(); this.refreshString();
@ -94,7 +98,7 @@ export default class Controller extends Component {
let userParams = {}; let userParams = {};
let hasParams = false; let hasParams = false;
if (this.paramBuilder) if (this.paramBuilder) {
for (let param in this.filter) { for (let param in this.filter) {
let value = this.filter[param]; let value = this.filter[param];
if (value == null) continue; if (value == null) continue;
@ -104,6 +108,7 @@ export default class Controller extends Component {
hasParams = true; hasParams = true;
} }
} }
}
this.model.applyFilter( this.model.applyFilter(
where ? {where} : null, where ? {where} : null,
@ -128,13 +133,14 @@ export default class Controller extends Component {
if (value instanceof Date) if (value instanceof Date)
hashFilter[key] = value; hashFilter[key] = value;
else else {
switch (typeof value) { switch (typeof value) {
case 'number': case 'number':
case 'string': case 'string':
case 'boolean': case 'boolean':
hashFilter[key] = value; hashFilter[key] = value;
} }
}
}); });
let search = encodeURIComponent(JSON.stringify(hashFilter)); let search = encodeURIComponent(JSON.stringify(hashFilter));
@ -159,13 +165,14 @@ export default class Controller extends Component {
let regex = /((([\w_]+):([\w_]+))|([\w_]+):\(([\w_ ]+)\))/gi; let regex = /((([\w_]+):([\w_]+))|([\w_]+):\(([\w_ ]+)\))/gi;
let findPattern = searchString.match(regex); let findPattern = searchString.match(regex);
let remnantString = searchString.replace(regex, '').trim(); let remnantString = searchString.replace(regex, '').trim();
if (findPattern) if (findPattern) {
for (let i = 0; i < findPattern.length; i++) { for (let i = 0; i < findPattern.length; i++) {
let aux = findPattern[i].split(':'); let aux = findPattern[i].split(':');
let property = aux[0]; let property = aux[0];
let value = aux[1].replace(/\(|\)/g, ''); let value = aux[1].replace(/\(|\)/g, '');
result[property] = value.trim(); result[property] = value.trim();
} }
}
if (remnantString) if (remnantString)
result.search = remnantString; result.search = remnantString;
} }
@ -193,13 +200,14 @@ export default class Controller extends Component {
valueString = `(${value})`; valueString = `(${value})`;
else if (value instanceof Date) else if (value instanceof Date)
valueString = value.toJSON(); valueString = value.toJSON();
else else {
switch (typeof value) { switch (typeof value) {
case 'number': case 'number':
case 'string': case 'string':
case 'boolean': case 'boolean':
valueString = `${value}`; valueString = `${value}`;
} }
}
if (valueString) if (valueString)
search.push(`${key}:${valueString}`); search.push(`${key}:${valueString}`);
@ -226,7 +234,8 @@ ngModule.component('vnSearchbar', {
panel: '@', panel: '@',
model: '<?', model: '<?',
exprBuilder: '&?', exprBuilder: '&?',
paramBuilder: '&?' paramBuilder: '&?',
autoLoad: '<?'
}, },
controller: Controller controller: Controller
}); });

View File

@ -27,7 +27,7 @@ export default class Table {
} }
$onChanges() { $onChanges() {
if (this.model && this.model.filter) if (this.model)
this.applyOrder(); this.applyOrder();
} }

View File

@ -22,6 +22,10 @@
ng-repeat="item in items track by item.id" ng-repeat="item in items track by item.id"
item="::item"> item="::item">
</vn-item-product> </vn-item-product>
<vn-empty-rows class="vn-list-item" style="text-align: center"
ng-if="!model.data || model.data.length === 0" translate>
Enter a new search
</vn-empty-rows>
</vn-card> </vn-card>
<vn-pagination <vn-pagination
model="model" model="model"

View File

@ -34,6 +34,7 @@ Add barcode: Añadir código de barras
Remove barcode: Quitar código de barras Remove barcode: Quitar código de barras
Buyer: Comprador Buyer: Comprador
No results: Sin resultados No results: Sin resultados
Enter a new search: Introduce una nueva búsqueda
Tag: Etiqueta Tag: Etiqueta
Worker: Trabajador Worker: Trabajador
Available: Disponible Available: Disponible

View File

@ -12,6 +12,7 @@
panel="vn-order-search-panel" panel="vn-order-search-panel"
model="model" model="model"
expr-builder="$ctrl.exprBuilder(param, value)" expr-builder="$ctrl.exprBuilder(param, value)"
auto-load="true"
vn-focus> vn-focus>
</vn-searchbar> </vn-searchbar>
</vn-card> </vn-card>
@ -55,8 +56,8 @@
</vn-td> </vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate> <vn-empty-rows ng-if="!model.data || model.data.length === 0" translate>
No results Enter a new search
</vn-empty-rows> </vn-empty-rows>
</vn-table> </vn-table>
</vn-card> </vn-card>

View File

@ -3,6 +3,7 @@ Catalog: Catálogo
from: desde from: desde
results: resultados results: resultados
No results: Sin resultados No results: Sin resultados
Enter a new search: Introduce una nueva búsqueda
Plant: Planta Plant: Planta
Flower: Flor Flower: Flor
Handmade: Confección Handmade: Confección

View File

@ -1,2 +1,3 @@
Routes: Rutas Routes: Rutas
List: Listado List: Listado
Enter a new search: Introduce una nueva búsqueda

View File

@ -239,10 +239,13 @@ vn-main-block {
margin: 0 auto; margin: 0 auto;
} }
a.vn-list-item {
@extend %clickable;
}
.vn-list-item { .vn-list-item {
@extend .pad-medium; @extend .pad-medium;
@extend .border-solid-bottom; @extend .border-solid-bottom;
@extend %clickable;
display: block; display: block;
text-decoration: none; text-decoration: none;

View File

@ -87,8 +87,8 @@
</vn-td> </vn-td>
</a> </a>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate> <vn-empty-rows ng-if="!model.data || model.data.length === 0" translate>
No results Enter a new search
</vn-empty-rows> </vn-empty-rows>
</vn-table> </vn-table>
</vn-card> </vn-card>

View File

@ -23,9 +23,6 @@ describe('Component vnTicketIndex', () => {
$window = _$window_; $window = _$window_;
$element = $compile('<vn-ticket-index></vn-ticket-index>')($rootScope); $element = $compile('<vn-ticket-index></vn-ticket-index>')($rootScope);
controller = $element.controller('vnTicketIndex'); controller = $element.controller('vnTicketIndex');
$httpBackend.whenGET(/\/ticket\/api\/Tickets\/filter.*/).respond(tickets);
$httpBackend.flush();
})); }));
afterEach(() => { afterEach(() => {

View File

@ -47,8 +47,8 @@
<vn-td></vn-td> <vn-td></vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate> <vn-empty-rows ng-if="!model.data || model.data.length === 0" translate>
No results Enter a new search
</vn-empty-rows> </vn-empty-rows>
</vn-table> </vn-table>
</vn-card> </vn-card>

View File

@ -7,6 +7,8 @@ Landed: F. llegada
Delivered: Enviado Delivered: Enviado
Received: Recibido Received: Recibido
Travel id: Id envío Travel id: Id envío
Enter a new search: Introduce una nueva búsqueda
#sections #sections
Travels: Envíos Travels: Envíos
List: Listado List: Listado

View File

@ -22,7 +22,7 @@ describe('Claim edit basic data path', () => {
it('should search for the claim with id 1', async () => { it('should search for the claim with id 1', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.claimsIndex.searchResult) .wait(selectors.claimsIndex.searchClaimInput)
.type(selectors.claimsIndex.searchClaimInput, '1') .type(selectors.claimsIndex.searchClaimInput, '1')
.click(selectors.claimsIndex.searchButton) .click(selectors.claimsIndex.searchButton)
.waitForNumberOfElements(selectors.claimsIndex.searchResult, 1) .waitForNumberOfElements(selectors.claimsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Client create path', () => {
it(`should search for the user Carol Danvers to confirm it isn't created yet`, async () => { it(`should search for the user Carol Danvers to confirm it isn't created yet`, async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers') .type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 0) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 0)
@ -112,7 +112,7 @@ describe('Client create path', () => {
it(`should search for the user Carol Danvers to confirm it exists`, async () => { it(`should search for the user Carol Danvers to confirm it exists`, async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers') .type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client Edit basicData path', () => {
it('should search for the user Bruce Wayne', async () => { it('should search for the user Bruce Wayne', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Wayne') .type(selectors.clientsIndex.searchClientInput, 'Bruce Wayne')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -139,7 +139,7 @@ describe('Client Edit basicData path', () => {
it('should now search for the user Ptonomy Wallace', async () => { it('should now search for the user Ptonomy Wallace', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Ptonomy Wallace') .type(selectors.clientsIndex.searchClientInput, 'Ptonomy Wallace')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client Edit fiscalData path', () => {
it('should search for the user Bruce Banner', async () => { it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -106,7 +106,7 @@ describe('Client Edit fiscalData path', () => {
it('should now search for the user Bruce Banner', async () => { it('should now search for the user Bruce Banner', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client Edit pay method path', () => {
it('should search for the user Bruce Banner', async () => { it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client Add address path', () => {
it('should search for the user Bruce Banner', async () => { it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client add address notes path', () => {
it('should search for the user Petter Parker', async () => { it('should search for the user Petter Parker', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client Edit web access path', () => {
it('should search for the user Bruce Banner', async () => { it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client Add notes path', () => {
it('should search for the user Bruce Banner', async () => { it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client Add credit path', () => {
it('should search for the user Hank Pym', async () => { it('should search for the user Hank Pym', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Hank Pym') .type(selectors.clientsIndex.searchClientInput, 'Hank Pym')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client Add greuge path', () => {
it('should search for the user Petter Parker', async () => { it('should search for the user Petter Parker', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client mandate path', () => {
it('should search for the user Petter Parker', async () => { it('should search for the user Petter Parker', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -23,7 +23,7 @@ describe('Client lock verified data path', () => {
it('should search for the user Petter Parker', async () => { it('should search for the user Petter Parker', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -105,7 +105,7 @@ describe('Client lock verified data path', () => {
it('should search again for the user Petter Parker', async () => { it('should search again for the user Petter Parker', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -209,7 +209,7 @@ describe('Client lock verified data path', () => {
it('should again search for the user Petter Parker', async () => { it('should again search for the user Petter Parker', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -280,7 +280,7 @@ describe('Client lock verified data path', () => {
it('should now search again for the user Petter Parker', async () => { it('should now search again for the user Petter Parker', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -362,7 +362,7 @@ describe('Client lock verified data path', () => {
it('should once again search for the user Petter Parker', async () => { it('should once again search for the user Petter Parker', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client log path', () => {
it('should search for the user David Charles Haller', async () => { it('should search for the user David Charles Haller', async () => {
let resultCount = await nightmare let resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'DavidCharlesHaller') .type(selectors.clientsIndex.searchClientInput, 'DavidCharlesHaller')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -22,7 +22,7 @@ describe('Client risk path', () => {
it('should search for the user Petter Parker', async () => { it('should search for the user Petter Parker', async () => {
let resultCount = await nightmare let resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -137,7 +137,7 @@ describe('Client risk path', () => {
it('should now search for the user Petter Parker', async () => { it('should now search for the user Petter Parker', async () => {
let resultCount = await nightmare let resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton) .click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Item summary path', () => {
it('should search for the item Gem of Time', async () => { it('should search for the item Gem of Time', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Item Edit basic data path', () => {
it('should search for the item Gem of Mind', async () => { it('should search for the item Gem of Mind', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Mind') .type(selectors.itemsIndex.searchItemInput, 'Gem of Mind')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Item edit tax path', () => {
it('should search for the item Gem of Time', async () => { it('should search for the item Gem of Time', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Item create tags path', () => {
it('should search for the item Gem of Time', async () => { it('should search for the item Gem of Time', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Item create niche path', () => {
it('should search for the item Gem of Time', async () => { it('should search for the item Gem of Time', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Item Create botanical path', () => {
it('should search for the item Mjolnir', async () => { it('should search for the item Mjolnir', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Mjolnir') .type(selectors.itemsIndex.searchItemInput, 'Mjolnir')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Item Create barcodes path', () => {
it('should search for the item Gem of Time', async () => { it('should search for the item Gem of Time', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Item Create/Clone path', () => {
it(`should search for the item Infinity Gauntlet to confirm it isn't created yet`, async () => { it(`should search for the item Infinity Gauntlet to confirm it isn't created yet`, async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet') .type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 0) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 0)
@ -110,7 +110,7 @@ describe('Item Create/Clone path', () => {
it(`should search for the item Infinity Gauntlet`, async () => { it(`should search for the item Infinity Gauntlet`, async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet') .type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
@ -133,7 +133,7 @@ describe('Item Create/Clone path', () => {
it('should search for the item Infinity Gauntlet and find two', async () => { it('should search for the item Infinity Gauntlet and find two', async () => {
const result = await nightmare const result = await nightmare
.waitToClick(selectors.itemTags.goToItemIndexButton) .waitToClick(selectors.itemTags.goToItemIndexButton)
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet') .type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 2) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 2)

View File

@ -19,7 +19,7 @@ describe('Item regularize path', () => {
it('should search for the item Mjolnir', async () => { it('should search for the item Mjolnir', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Mjolnir') .type(selectors.itemsIndex.searchItemInput, 'Mjolnir')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
@ -57,7 +57,7 @@ describe('Item regularize path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -104,7 +104,7 @@ describe('Item regularize path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.itemsButton) .waitToClick(selectors.globalItems.itemsButton)
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/item/index'); expect(url.hash).toEqual('#!/item/index');
@ -112,7 +112,7 @@ describe('Item regularize path', () => {
it('should search for the item Mjolnir once again', async () => { it('should search for the item Mjolnir once again', async () => {
const resultCount = await nightmare const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Mjolnir') .type(selectors.itemsIndex.searchItemInput, 'Mjolnir')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
@ -150,7 +150,7 @@ describe('Item regularize path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');

View File

@ -10,44 +10,44 @@ describe('Ticket', () => {
.waitForLogin('employee'); .waitForLogin('employee');
}); });
it('should access to the tickets index by clicking the tickets button', (done) => { it('should access to the tickets index by clicking the tickets button', done => {
return nightmare return nightmare
.click(selectors.moduleAccessView.ticketsSectionButton) .click(selectors.moduleAccessView.ticketsSectionButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl() .parsedUrl()
.then((url) => { .then(url => {
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it('should search for the ticket with id 1', (done) => { it('should search for the ticket with id 1', done => {
return nightmare return nightmare
.wait(selectors.ticketsIndex.searchTicketInput) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:1') .type(selectors.ticketsIndex.searchTicketInput, 'id:1')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
.countElement(selectors.ticketsIndex.searchResult) .countElement(selectors.ticketsIndex.searchResult)
.then((result) => { .then(result => {
expect(result).toEqual(1); expect(result).toEqual(1);
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it(`should click on the search result to access to the ticket notes`, (done) => { it(`should click on the search result to access to the ticket notes`, done => {
return nightmare return nightmare
.waitForTextInElement(selectors.ticketsIndex.searchResult, '1') .waitForTextInElement(selectors.ticketsIndex.searchResult, '1')
.waitToClick(selectors.ticketsIndex.searchResult) .waitToClick(selectors.ticketsIndex.searchResult)
.waitToClick(selectors.ticketNotes.notesButton) .waitToClick(selectors.ticketNotes.notesButton)
.waitForURL('observation') .waitForURL('observation')
.url() .url()
.then((url) => { .then(url => {
expect(url).toContain('observation'); expect(url).toContain('observation');
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it(`should click create a new note and delete a former one`, (done) => { it(`should click create a new note and delete a former one`, done => {
return nightmare return nightmare
.waitToClick(selectors.ticketNotes.firstNoteRemoveButton) .waitToClick(selectors.ticketNotes.firstNoteRemoveButton)
.waitToClick(selectors.ticketNotes.addNoteButton) .waitToClick(selectors.ticketNotes.addNoteButton)
@ -56,24 +56,24 @@ describe('Ticket', () => {
.type(selectors.ticketNotes.firstDescriptionInput, 'description') .type(selectors.ticketNotes.firstDescriptionInput, 'description')
.click(selectors.ticketNotes.submitNotesButton) .click(selectors.ticketNotes.submitNotesButton)
.waitForLastSnackbar() .waitForLastSnackbar()
.then((result) => { .then(result => {
expect(result).toEqual('Data saved!'); expect(result).toEqual('Data saved!');
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it(`should confirm the note is the expected one`, (done) => { it(`should confirm the note is the expected one`, done => {
return nightmare return nightmare
.click(selectors.ticketPackages.packagesButton) .click(selectors.ticketPackages.packagesButton)
.wait(selectors.ticketPackages.firstPackageSelect) .wait(selectors.ticketPackages.firstPackageSelect)
.click(selectors.ticketNotes.notesButton) .click(selectors.ticketNotes.notesButton)
.waitProperty(selectors.ticketNotes.firstNoteSelect, 'value') .waitProperty(selectors.ticketNotes.firstNoteSelect, 'value')
.then((result) => { .then(result => {
expect(result).toEqual('observation one'); expect(result).toEqual('observation one');
return nightmare return nightmare
.getProperty(selectors.ticketNotes.firstDescriptionInput, 'value'); .getProperty(selectors.ticketNotes.firstDescriptionInput, 'value');
}) })
.then((result) => { .then(result => {
expect(result).toEqual('description'); expect(result).toEqual('description');
done(); done();
}).catch(done.fail); }).catch(done.fail);

View File

@ -13,7 +13,7 @@ describe('Ticket', () => {
it('should access to the tickets index by clicking the tickets button', async () => { it('should access to the tickets index by clicking the tickets button', async () => {
const url = await nightmare const url = await nightmare
.click(selectors.moduleAccessView.ticketsSectionButton) .click(selectors.moduleAccessView.ticketsSectionButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');

View File

@ -14,7 +14,7 @@ describe('Ticket List sale path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -22,7 +22,7 @@ describe('Ticket List sale path', () => {
it('should search for the ticket 8', async () => { it('should search for the ticket 8', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:8') .type(selectors.ticketsIndex.searchTicketInput, 'id:8')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)

View File

@ -14,7 +14,7 @@ describe('Ticket Create packages path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -22,7 +22,7 @@ describe('Ticket Create packages path', () => {
it('should search for the ticket 1', async () => { it('should search for the ticket 1', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:1') .type(selectors.ticketsIndex.searchTicketInput, 'id:1')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)

View File

@ -10,97 +10,97 @@ describe('Ticket', () => {
.waitForLogin('production'); .waitForLogin('production');
}); });
it('should click on the Tickets button of the top bar menu', (done) => { it('should click on the Tickets button of the top bar menu', done => {
return nightmare return nightmare
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl() .parsedUrl()
.then((url) => { .then(url => {
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it('should search for the ticket 1', (done) => { it('should search for the ticket 1', done => {
return nightmare return nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:1') .type(selectors.ticketsIndex.searchTicketInput, 'id:1')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
.countElement(selectors.ticketsIndex.searchResult) .countElement(selectors.ticketsIndex.searchResult)
.then((result) => { .then(result => {
expect(result).toEqual(1); expect(result).toEqual(1);
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it(`should click on the search result to access to the ticket Tracking`, (done) => { it(`should click on the search result to access to the ticket Tracking`, done => {
return nightmare return nightmare
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21') .waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
.waitToClick(selectors.ticketsIndex.searchResult) .waitToClick(selectors.ticketsIndex.searchResult)
.waitToClick(selectors.ticketTracking.trackingButton) .waitToClick(selectors.ticketTracking.trackingButton)
.waitForURL('tracking/index') .waitForURL('tracking/index')
.url() .url()
.then((url) => { .then(url => {
expect(url).toContain('tracking/index'); expect(url).toContain('tracking/index');
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it('should access to the create state view by clicking the create floating button', (done) => { it('should access to the create state view by clicking the create floating button', done => {
return nightmare return nightmare
.click(selectors.ticketTracking.createStateButton) .click(selectors.ticketTracking.createStateButton)
.wait(selectors.createStateView.stateInput) .wait(selectors.createStateView.stateInput)
.parsedUrl() .parsedUrl()
.then((url) => { .then(url => {
expect(url.hash).toContain('tracking/edit'); expect(url.hash).toContain('tracking/edit');
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it(`should attempt create a new state but receive an error if state is empty`, (done) => { it(`should attempt create a new state but receive an error if state is empty`, done => {
return nightmare return nightmare
.click(selectors.createStateView.saveStateButton) .click(selectors.createStateView.saveStateButton)
.waitForLastSnackbar() .waitForLastSnackbar()
.then((result) => { .then(result => {
expect(result).toEqual('No changes to save'); expect(result).toEqual('No changes to save');
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it(`should attempt create a new state then clear and save it`, (done) => { it(`should attempt create a new state then clear and save it`, done => {
return nightmare return nightmare
.waitToClick(selectors.createStateView.stateInput) .waitToClick(selectors.createStateView.stateInput)
.waitToClick(selectors.createStateView.stateInputOptionOne) .waitToClick(selectors.createStateView.stateInputOptionOne)
.waitToClick(selectors.createStateView.clearStateInputButton) .waitToClick(selectors.createStateView.clearStateInputButton)
.click(selectors.createStateView.saveStateButton) .click(selectors.createStateView.saveStateButton)
.waitForLastSnackbar() .waitForLastSnackbar()
.then((result) => { .then(result => {
expect(result).toEqual('Data saved!'); expect(result).toEqual('Data saved!');
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it('should again access to the create state view by clicking the create floating button', (done) => { it('should again access to the create state view by clicking the create floating button', done => {
return nightmare return nightmare
.click(selectors.ticketTracking.createStateButton) .click(selectors.ticketTracking.createStateButton)
.wait(selectors.createStateView.stateInput) .wait(selectors.createStateView.stateInput)
.parsedUrl() .parsedUrl()
.then((url) => { .then(url => {
expect(url.hash).toContain('tracking/edit'); expect(url.hash).toContain('tracking/edit');
done(); done();
}).catch(done.fail); }).catch(done.fail);
}); });
it(`should create a new state`, (done) => { it(`should create a new state`, done => {
return nightmare return nightmare
.waitToClick(selectors.createStateView.stateInput) .waitToClick(selectors.createStateView.stateInput)
.waitToClick(selectors.createStateView.stateInputOptionOne) .waitToClick(selectors.createStateView.stateInputOptionOne)
.click(selectors.createStateView.saveStateButton) .click(selectors.createStateView.saveStateButton)
.waitForLastSnackbar() .waitForLastSnackbar()
.then((result) => { .then(result => {
expect(result).toEqual('Data saved!'); expect(result).toEqual('Data saved!');
done(); done();
}).catch(done.fail); }).catch(done.fail);

View File

@ -15,7 +15,7 @@ describe('Ticket', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl() .parsedUrl()
.then(url => { .then(url => {
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -25,7 +25,7 @@ describe('Ticket', () => {
it('should search for the ticket 11', done => { it('should search for the ticket 11', done => {
return nightmare return nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:11') .type(selectors.ticketsIndex.searchTicketInput, 'id:11')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)

View File

@ -14,7 +14,7 @@ describe('Ticket Edit sale path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -22,7 +22,7 @@ describe('Ticket Edit sale path', () => {
it('should search for a specific ticket', async () => { it('should search for a specific ticket', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:16') .type(selectors.ticketsIndex.searchTicketInput, 'id:16')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -57,7 +57,7 @@ describe('Ticket Edit sale path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -65,7 +65,7 @@ describe('Ticket Edit sale path', () => {
it('should again search for a specific ticket', async () => { it('should again search for a specific ticket', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:16') .type(selectors.ticketsIndex.searchTicketInput, 'id:16')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -154,7 +154,7 @@ describe('Ticket Edit sale path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:16') .type(selectors.ticketsIndex.searchTicketInput, 'id:16')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -275,7 +275,7 @@ describe('Ticket Edit sale path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -283,7 +283,7 @@ describe('Ticket Edit sale path', () => {
it('should search the ticket', async () => { it('should search the ticket', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:16') .type(selectors.ticketsIndex.searchTicketInput, 'id:16')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -354,7 +354,7 @@ describe('Ticket Edit sale path', () => {
it('should go back to the original ticket sales section', async () => { it('should go back to the original ticket sales section', async () => {
const url = await nightmare const url = await nightmare
.waitToClick(selectors.itemsIndex.goBackToModuleIndexButton) .waitToClick(selectors.itemsIndex.goBackToModuleIndexButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:16') .type(selectors.ticketsIndex.searchTicketInput, 'id:16')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -378,7 +378,7 @@ describe('Ticket Edit sale path', () => {
it('should go back to the receiver ticket sales section', async () => { it('should go back to the receiver ticket sales section', async () => {
const url = await nightmare const url = await nightmare
.waitToClick(selectors.itemsIndex.goBackToModuleIndexButton) .waitToClick(selectors.itemsIndex.goBackToModuleIndexButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:12') .type(selectors.ticketsIndex.searchTicketInput, 'id:12')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -422,7 +422,7 @@ describe('Ticket Edit sale path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -430,7 +430,7 @@ describe('Ticket Edit sale path', () => {
it('should search for a specific created ticket', async () => { it('should search for a specific created ticket', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'nickname:(address 21) stateFk:2') .type(selectors.ticketsIndex.searchTicketInput, 'nickname:(address 21) stateFk:2')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -507,7 +507,7 @@ describe('Ticket Edit sale path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -515,7 +515,7 @@ describe('Ticket Edit sale path', () => {
it('should now search for a specific ticket', async () => { it('should now search for a specific ticket', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:16') .type(selectors.ticketsIndex.searchTicketInput, 'id:16')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -599,7 +599,7 @@ describe('Ticket Edit sale path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -607,7 +607,7 @@ describe('Ticket Edit sale path', () => {
it('should once again search for a specific ticket', async () => { it('should once again search for a specific ticket', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:16') .type(selectors.ticketsIndex.searchTicketInput, 'id:16')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)

View File

@ -14,7 +14,7 @@ describe('Ticket List components path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -22,7 +22,7 @@ describe('Ticket List components path', () => {
it('should search for the ticket 1', async () => { it('should search for the ticket 1', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:1') .type(selectors.ticketsIndex.searchTicketInput, 'id:1')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)

View File

@ -14,7 +14,7 @@ describe('Ticket descriptor path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -35,7 +35,7 @@ describe('Ticket descriptor path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -43,7 +43,7 @@ describe('Ticket descriptor path', () => {
it('should search for the ticket 11', async () => { it('should search for the ticket 11', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:11') .type(selectors.ticketsIndex.searchTicketInput, 'id:11')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -76,7 +76,7 @@ describe('Ticket descriptor path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -97,7 +97,7 @@ describe('Ticket descriptor path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -105,7 +105,7 @@ describe('Ticket descriptor path', () => {
it('should now search for the ticket 11', async () => { it('should now search for the ticket 11', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:11') .type(selectors.ticketsIndex.searchTicketInput, 'id:11')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -138,7 +138,7 @@ describe('Ticket descriptor path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');

View File

@ -14,7 +14,7 @@ describe('Ticket purchase request path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -22,7 +22,7 @@ describe('Ticket purchase request path', () => {
it('should search for a specific ticket', async () => { it('should search for a specific ticket', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:16') .type(selectors.ticketsIndex.searchTicketInput, 'id:16')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)

View File

@ -15,7 +15,7 @@ describe('Ticket diary path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -23,7 +23,7 @@ describe('Ticket diary path', () => {
it('should search for a specific ticket', async () => { it('should search for a specific ticket', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:1') .type(selectors.ticketsIndex.searchTicketInput, 'id:1')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)

View File

@ -14,7 +14,7 @@ describe('Ticket descriptor path', () => {
.waitToClick(selectors.globalItems.applicationsMenuButton) .waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible) .wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton) .waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl(); .parsedUrl();
expect(url.hash).toEqual('#!/ticket/index'); expect(url.hash).toEqual('#!/ticket/index');
@ -22,7 +22,7 @@ describe('Ticket descriptor path', () => {
it('should search for a specific ticket', async () => { it('should search for a specific ticket', async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:17') .type(selectors.ticketsIndex.searchTicketInput, 'id:17')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
@ -60,7 +60,7 @@ describe('Ticket descriptor path', () => {
it(`should search for the deleted ticket and check it's date`, async () => { it(`should search for the deleted ticket and check it's date`, async () => {
const result = await nightmare const result = await nightmare
.wait(selectors.ticketsIndex.searchResult) .wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:17') .type(selectors.ticketsIndex.searchTicketInput, 'id:17')
.click(selectors.ticketsIndex.searchButton) .click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)

View File

@ -149,14 +149,6 @@ module.exports = Self => {
stmt.merge(conn.makeSuffix(filter)); stmt.merge(conn.makeSuffix(filter));
stmts.push(stmt); stmts.push(stmt);
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticket');
stmts.push(`
CREATE TEMPORARY TABLE tmp.ticket
(INDEX (ticketFk))
ENGINE = MEMORY
SELECT id ticketFk FROM tmp.filter`);
stmts.push('CALL ticketGetTotal()');
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticketGetProblems'); stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticketGetProblems');
stmts.push(` stmts.push(`
CREATE TEMPORARY TABLE tmp.ticketGetProblems CREATE TEMPORARY TABLE tmp.ticketGetProblems
@ -166,6 +158,13 @@ module.exports = Self => {
FROM tmp.filter`); FROM tmp.filter`);
stmts.push('CALL ticketGetProblems()'); stmts.push('CALL ticketGetProblems()');
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticket');
stmts.push(`
CREATE TEMPORARY TABLE tmp.ticket
(INDEX (ticketFk)) ENGINE = MEMORY
SELECT id ticketFk FROM tmp.filter`);
stmts.push('CALL ticketGetTotal()');
stmt = new ParameterizedSQL(` stmt = new ParameterizedSQL(`
SELECT SELECT
f.*, f.*,