Merge branch 'test' into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Gerard 2019-02-20 17:53:10 +01:00
commit a3dab9013c
4 changed files with 38 additions and 38 deletions

View File

@ -269,7 +269,7 @@ export default {
sale: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr',
firstSaleItemId: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > span',
popoverDiaryButton: 'vn-ticket-summary vn-item-descriptor-popover vn-item-descriptor vn-icon[icon="icon-transaction"]',
firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4)',
firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3)',
firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6)'
},
ticketsIndex: {
@ -337,18 +337,18 @@ export default {
firstSaleQuantity: `vn-textfield[model="sale.quantity"]:nth-child(1) input`,
firstSaleQuantityClearInput: `vn-textfield[model="sale.quantity"] div.suffix > i`,
firstSaleID: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(4) > span',
firstSalePrice: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(7)',
firstSalePrice: 'vn-ticket-sale:nth-child(1) vn-tr:nth-child(1) > vn-td:nth-child(7) > span',
firstSalePriceInput: 'vn-ticket-sale:nth-child(1) > vn-vertical > vn-popover.edit.dialog-summary.ng-isolate-scope.vn-popover.shown > div > div.content > div > vn-textfield',
firstSaleDiscount: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(8)',
firstSaleDiscount: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(8) > span',
firstSaleDiscountInput: 'vn-ticket-sale:nth-child(1) vn-ticket-sale-edit-discount > div > vn-textfield > div > div > div.infix > input.ng-not-empty',
firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(9)',
firstSaleReservedIcon: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td:nth-child(2) > vn-icon:nth-child(3)',
firstSaleColour: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(5) section:nth-child(1)`,
firstSaleLength: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(5) section:nth-child(3)`,
firstSaleColour: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(6) section:nth-child(1)`,
firstSaleLength: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(6) section:nth-child(3)`,
firstSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(1) vn-check[field="sale.checked"] md-checkbox`,
secondSaleClaimIcon: 'vn-ticket-sale > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(2) > a > vn-icon',
secondSaleColour: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(5) section:nth-child(5)`,
secondSalePrice: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(7)`,
secondSaleColour: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(6) section:nth-child(5)`,
secondSalePrice: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(7) > span`,
secondSaleDiscount: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(8)`,
secondSaleImport: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(9)`,
secondSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(2)`,

View File

@ -538,16 +538,16 @@ xdescribe('Ticket Edit sale path', () => {
describe('when state is preparation and loged as Production', () => {
it(`should not be able to edit the sale price`, async() => {
const result = await nightmare
.waitToClick(selectors.ticketSales.firstSalePrice)
.exists(selectors.ticketSales.firstSalePriceInput);
.wait(selectors.ticketSales.firstSaleID)
.exists(selectors.ticketSales.firstSalePrice);
expect(result).toBeFalsy();
});
it(`should not be able to edit the sale discount`, async() => {
const result = await nightmare
.waitToClick(selectors.ticketSales.firstSaleDiscount)
.exists(selectors.ticketSales.firstSaleDiscountInput);
.waitToClick(selectors.ticketSales.firstSaleID)
.exists(selectors.ticketSales.firstSaleDiscount);
expect(result).toBeFalsy();
});

View File

@ -62,8 +62,8 @@
<vn-th shrink></vn-th>
<vn-th shrink></vn-th>
<vn-th number>Id</vn-th>
<vn-th>Quantity</vn-th>
<vn-th>Item</vn-th>
<vn-th number>Quantity</vn-th>
<vn-th number>Price</vn-th>
<vn-th number>Disc</vn-th>
<vn-th number>Amount</vn-th>
@ -94,7 +94,7 @@
icon="icon-reserve"
vn-tooltip="{{::$ctrl.$translate.instant('Reserved')}}"></vn-icon>
</vn-td>
<vn-td shrink>
<vn-td shrink>
<img
ng-src="{{::$ctrl.imagesPath}}/50x50/{{::sale.image}}"
zoom-image="{{::$ctrl.imagesPath}}/1600x900/{{::sale.image}}"
@ -107,13 +107,6 @@
{{::sale.itemFk | zeroFill:6}}
</span>
</vn-td>
<vn-td expand>
<vn-fetched-tags
max-length="6"
item="::sale.tags"
title="::sale.concept">
</vn-fetched-tags>
</vn-td>
<vn-td ng-if="!$ctrl.isEditable" number>{{sale.quantity}}</vn-td>
<vn-td ng-if="$ctrl.isEditable" number>
<vn-textfield
@ -122,22 +115,29 @@
type="text">
</vn-textfield>
</vn-td>
<vn-td number
ng-if="$ctrl.isEditable"
class="link"
ng-click="$ctrl.showEditPricePopover($event, sale)"
vn-tooltip="Edit price">
{{sale.price | currency: 'EUR':2}}
<vn-td expand>
<vn-fetched-tags
max-length="6"
item="::sale.tags"
title="::sale.concept">
</vn-fetched-tags>
</vn-td>
<vn-td number ng-if="$ctrl.isEditable">
<span class="link"
vn-tooltip="Edit price"
ng-click="$ctrl.showEditPricePopover($event, sale)">
{{sale.price | currency: 'EUR':2}}
</span>
</vn-td>
<vn-td number ng-if="!$ctrl.isEditable">
{{sale.price | currency: 'EUR':2}}
</vn-td>
<vn-td number
ng-if="$ctrl.isEditable"
class="link"
ng-click="$ctrl.showEditPopover($event, sale)"
vn-tooltip="Edit discount">
{{sale.discount}} %
<vn-td number ng-if="$ctrl.isEditable">
<span class="link"
vn-tooltip="Edit discount"
ng-click="$ctrl.showEditPopover($event, sale)">
{{sale.discount}} %
</span>
</vn-td>
<vn-td number
ng-if="!$ctrl.isEditable">
@ -158,7 +158,7 @@
<!-- Edit Price Popover -->
<vn-popover
class="edit dialog-summary"
vn-id="editPricePopover"
vn-id="edit-price-popover"
on-open="$ctrl.getManaSalespersonMana()">
<vn-horizontal pad-medium class="header">
<h5>MANÁ: {{$ctrl.mana | currency: 'EUR':0}}</h5>
@ -185,7 +185,7 @@
<!-- Edit Popover -->
<vn-popover
class="edit dialog-summary"
vn-id="editPopover"
vn-id="edit-popover"
on-open="$ctrl.getManaSalespersonMana()">
<vn-ticket-sale-edit-discount
mana="$ctrl.mana"

View File

@ -57,8 +57,8 @@
<vn-tr>
<vn-th shrink></vn-th>
<vn-th number>Item</vn-th>
<vn-th>Description</vn-th>
<vn-th number>Quantity</vn-th>
<vn-th>Description</vn-th>
<vn-th number>Price</vn-th>
<vn-th number>Discount</vn-th>
<vn-th number>Amount</vn-th>
@ -89,8 +89,8 @@
{{sale.itemFk | zeroFill:6}}
</span>
</vn-td>
<vn-td expand><vn-fetched-tags max-length="6" item="sale.item" title="sale.concept"/></vn-td>
<vn-td number>{{::sale.quantity}}</vn-td>
<vn-td expand><vn-fetched-tags max-length="6" item="sale.item" title="sale.concept"/></vn-td>
<vn-td number>{{::sale.price | currency: 'EUR':2}}</vn-td>
<vn-td number>{{::sale.discount}} %</vn-td>
<vn-td number>{{::sale.quantity * sale.price | currency: 'EUR':2}}</vn-td>
@ -123,8 +123,8 @@
<vn-thead>
<vn-tr>
<vn-th number>Id</vn-th>
<vn-th>Description</vn-th>
<vn-th number>Quantity</vn-th>
<vn-th>Description</vn-th>
<vn-th number>Price</vn-th>
<vn-th>Tax class</vn-th>
</vn-tr>
@ -132,8 +132,8 @@
<vn-tbody>
<vn-tr ng-repeat="service in $ctrl.summary.services">
<vn-td number>{{::service.id}}</vn-td>
<vn-td expand>{{::service.description}}</vn-td>
<vn-td number>{{::service.quantity}}</vn-td>
<vn-td expand>{{::service.description}}</vn-td>
<vn-td number>{{::service.price}}</vn-td>
<vn-td>{{::service.taxClass.description}}</vn-td>
</vn-tr>