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-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
<vn-empty-rows ng-if="!model.data || model.data.length === 0" translate>
Enter a new search
</vn-empty-rows>
</vn-table>
</vn-card>

View File

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

View File

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

View File

@ -22,6 +22,10 @@
ng-repeat="client in clients track by client.id"
client="::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-pagination
model="model"

View File

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

View File

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

View File

@ -25,6 +25,15 @@
vn-one label="Name"
model="filter.name">
</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-textfield

View File

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

View File

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

View File

@ -22,6 +22,10 @@
ng-repeat="item in items track by item.id"
item="::item">
</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-pagination
model="model"

View File

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

View File

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

View File

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

View File

@ -1,2 +1,3 @@
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;
}
a.vn-list-item {
@extend %clickable;
}
.vn-list-item {
@extend .pad-medium;
@extend .border-solid-bottom;
@extend %clickable;
display: block;
text-decoration: none;

View File

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

View File

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

View File

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

View File

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

View File

@ -22,7 +22,7 @@ describe('Claim edit basic data path', () => {
it('should search for the claim with id 1', async () => {
const resultCount = await nightmare
.wait(selectors.claimsIndex.searchResult)
.wait(selectors.claimsIndex.searchClaimInput)
.type(selectors.claimsIndex.searchClaimInput, '1')
.click(selectors.claimsIndex.searchButton)
.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 () => {
const result = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const result = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Wayne')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -139,7 +139,7 @@ describe('Client Edit basicData path', () => {
it('should now search for the user Ptonomy Wallace', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Ptonomy Wallace')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -106,7 +106,7 @@ describe('Client Edit fiscalData path', () => {
it('should now search for the user Bruce Banner', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Hank Pym')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)

View File

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

View File

@ -22,7 +22,7 @@ describe('Client risk path', () => {
it('should search for the user Petter Parker', async () => {
let resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
@ -137,7 +137,7 @@ describe('Client risk path', () => {
it('should now search for the user Petter Parker', async () => {
let resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.wait(selectors.clientsIndex.searchClientInput)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton)
.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 () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Mind')
.click(selectors.itemsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton)
.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 () => {
const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)

View File

@ -20,7 +20,7 @@ describe('Item Create botanical path', () => {
it('should search for the item Mjolnir', async () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Mjolnir')
.click(selectors.itemsIndex.searchButton)
.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 () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton)
.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 () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 0)
@ -110,7 +110,7 @@ describe('Item Create/Clone path', () => {
it(`should search for the item Infinity Gauntlet`, async () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton)
.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 () => {
const result = await nightmare
.waitToClick(selectors.itemTags.goToItemIndexButton)
.wait(selectors.itemsIndex.searchResult)
.wait(selectors.itemsIndex.searchItemInput)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 2)

View File

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

View File

@ -10,44 +10,44 @@ describe('Ticket', () => {
.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
.click(selectors.moduleAccessView.ticketsSectionButton)
.wait(selectors.ticketsIndex.searchResult)
.wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl()
.then((url) => {
.then(url => {
expect(url.hash).toEqual('#!/ticket/index');
done();
}).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
.wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
.click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
.countElement(selectors.ticketsIndex.searchResult)
.then((result) => {
.then(result => {
expect(result).toEqual(1);
done();
}).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
.waitForTextInElement(selectors.ticketsIndex.searchResult, '1')
.waitToClick(selectors.ticketsIndex.searchResult)
.waitToClick(selectors.ticketNotes.notesButton)
.waitForURL('observation')
.url()
.then((url) => {
.then(url => {
expect(url).toContain('observation');
done();
}).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
.waitToClick(selectors.ticketNotes.firstNoteRemoveButton)
.waitToClick(selectors.ticketNotes.addNoteButton)
@ -56,24 +56,24 @@ describe('Ticket', () => {
.type(selectors.ticketNotes.firstDescriptionInput, 'description')
.click(selectors.ticketNotes.submitNotesButton)
.waitForLastSnackbar()
.then((result) => {
.then(result => {
expect(result).toEqual('Data saved!');
done();
}).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
.click(selectors.ticketPackages.packagesButton)
.wait(selectors.ticketPackages.firstPackageSelect)
.click(selectors.ticketNotes.notesButton)
.waitProperty(selectors.ticketNotes.firstNoteSelect, 'value')
.then((result) => {
.then(result => {
expect(result).toEqual('observation one');
return nightmare
.getProperty(selectors.ticketNotes.firstDescriptionInput, 'value');
})
.then((result) => {
.then(result => {
expect(result).toEqual('description');
done();
}).catch(done.fail);

View File

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

View File

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

View File

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

View File

@ -10,97 +10,97 @@ describe('Ticket', () => {
.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
.waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.ticketsButton)
.wait(selectors.ticketsIndex.searchResult)
.wait(selectors.ticketsIndex.searchTicketInput)
.parsedUrl()
.then((url) => {
.then(url => {
expect(url.hash).toEqual('#!/ticket/index');
done();
}).catch(done.fail);
});
it('should search for the ticket 1', (done) => {
it('should search for the ticket 1', done => {
return nightmare
.wait(selectors.ticketsIndex.searchResult)
.wait(selectors.ticketsIndex.searchTicketInput)
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
.click(selectors.ticketsIndex.searchButton)
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
.countElement(selectors.ticketsIndex.searchResult)
.then((result) => {
.then(result => {
expect(result).toEqual(1);
done();
}).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
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
.waitToClick(selectors.ticketsIndex.searchResult)
.waitToClick(selectors.ticketTracking.trackingButton)
.waitForURL('tracking/index')
.url()
.then((url) => {
.then(url => {
expect(url).toContain('tracking/index');
done();
}).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
.click(selectors.ticketTracking.createStateButton)
.wait(selectors.createStateView.stateInput)
.parsedUrl()
.then((url) => {
.then(url => {
expect(url.hash).toContain('tracking/edit');
done();
}).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
.click(selectors.createStateView.saveStateButton)
.waitForLastSnackbar()
.then((result) => {
.then(result => {
expect(result).toEqual('No changes to save');
done();
}).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
.waitToClick(selectors.createStateView.stateInput)
.waitToClick(selectors.createStateView.stateInputOptionOne)
.waitToClick(selectors.createStateView.clearStateInputButton)
.click(selectors.createStateView.saveStateButton)
.waitForLastSnackbar()
.then((result) => {
.then(result => {
expect(result).toEqual('Data saved!');
done();
}).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
.click(selectors.ticketTracking.createStateButton)
.wait(selectors.createStateView.stateInput)
.parsedUrl()
.then((url) => {
.then(url => {
expect(url.hash).toContain('tracking/edit');
done();
}).catch(done.fail);
});
it(`should create a new state`, (done) => {
it(`should create a new state`, done => {
return nightmare
.waitToClick(selectors.createStateView.stateInput)
.waitToClick(selectors.createStateView.stateInputOptionOne)
.click(selectors.createStateView.saveStateButton)
.waitForLastSnackbar()
.then((result) => {
.then(result => {
expect(result).toEqual('Data saved!');
done();
}).catch(done.fail);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -149,14 +149,6 @@ module.exports = Self => {
stmt.merge(conn.makeSuffix(filter));
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(`
CREATE TEMPORARY TABLE tmp.ticketGetProblems
@ -166,6 +158,13 @@ module.exports = Self => {
FROM tmp.filter`);
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(`
SELECT
f.*,