231801_test_to_master #1519
|
@ -29,19 +29,16 @@ describe('Client Add greuge path', () => {
|
|||
expect(message.text).toContain('Some fields are invalid');
|
||||
});
|
||||
|
||||
it(`should create a new greuge with all its data`, async() => {
|
||||
it(`should create a new greuge with all its data and confirm the greuge was added to the list`, async() => {
|
||||
await page.write(selectors.clientGreuge.amount, '999');
|
||||
await page.waitForTextInField(selectors.clientGreuge.amount, '999');
|
||||
await page.write(selectors.clientGreuge.description, 'new armor for Batman!');
|
||||
await page.waitToClick(selectors.clientGreuge.saveButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should confirm the greuge was added to the list', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.clientGreuge.firstGreugeText, 'innerText');
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
expect(result).toContain(999);
|
||||
expect(result).toContain('new armor for Batman!');
|
||||
expect(result).toContain('Diff');
|
||||
|
|
|
@ -236,7 +236,7 @@ export default class CrudModel extends ModelProxy {
|
|||
this.canceler = this.$q.defer();
|
||||
this.isPaging = append;
|
||||
|
||||
if (!append && this.status != 'ready')
|
||||
if (!append)
|
||||
this.status = 'loading';
|
||||
|
||||
let params = Object.assign(
|
||||
|
|
|
@ -8,18 +8,8 @@ export default class Th {
|
|||
$element.on('click', () => this.onToggleOrder());
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the order if the cell has a field and defaultOrder property
|
||||
*/
|
||||
$onInit() {
|
||||
if (!this.field) return;
|
||||
|
||||
if (this.defaultOrder) {
|
||||
this.order = this.defaultOrder;
|
||||
this.table.applyOrder(this.field, this.order);
|
||||
this.updateArrow();
|
||||
}
|
||||
|
||||
this.updateArrow();
|
||||
}
|
||||
|
||||
|
@ -82,9 +72,6 @@ ngModule.vnComponent('vnTh', {
|
|||
template: require('./index.html'),
|
||||
transclude: true,
|
||||
controller: Th,
|
||||
bindings: {
|
||||
defaultOrder: '@?'
|
||||
},
|
||||
require: {
|
||||
table: '^^vnTable'
|
||||
}
|
||||
|
|
|
@ -14,10 +14,7 @@
|
|||
order="changedModel"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
is-loading="model.isLoading"
|
||||
class="vn-w-md vn-px-sm">
|
||||
<vn-data-viewer model="model" class="vn-w-md vn-px-sm">
|
||||
<div class="change vn-mb-sm" ng-repeat="log in $ctrl.logs">
|
||||
<div class="user-wrapper">
|
||||
<vn-avatar class="vn-mt-xs"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<vn-table model="model" auto-load="false">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="shipped" default-order="DESC" expand>Date</vn-th>
|
||||
<vn-th field="shipped" expand>Date</vn-th>
|
||||
<vn-th field="userFk">Created by</vn-thfield></vn-th>
|
||||
<vn-th field="description">Comment</vn-th>
|
||||
<vn-th field="greugeTypeFk">Type</vn-th>
|
||||
|
|
|
@ -11,8 +11,7 @@ class Controller extends Section {
|
|||
scope: {
|
||||
fields: ['id', 'name']
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['id', 'name']
|
||||
|
@ -24,8 +23,6 @@ class Controller extends Section {
|
|||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$element', '$scope'];
|
||||
|
||||
ngModule.vnComponent('vnClientGreugeIndex', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th shrink field="itemFk" default-order="ASC" number>Item</vn-th>
|
||||
<vn-th shrink field="itemFk" number>Item</vn-th>
|
||||
<vn-th>Description</vn-th>
|
||||
<vn-th shrink field="quantity" number>Quantity</vn-th>
|
||||
<vn-th shrink number>m³ per quantity</vn-th>
|
||||
|
|
|
@ -6,9 +6,10 @@ class Controller extends Section {
|
|||
constructor($element, $) {
|
||||
super($element, $);
|
||||
this.filter = {
|
||||
include: [{
|
||||
include: {
|
||||
relation: 'item'
|
||||
}]
|
||||
},
|
||||
order: 'itemFk'
|
||||
};
|
||||
this.order = {};
|
||||
this.ticketVolumes = [];
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<vn-crud-model auto-load="false"
|
||||
<vn-crud-model
|
||||
auto-load="true"
|
||||
vn-id="model"
|
||||
url="sales"
|
||||
filter="::$ctrl.filter"
|
||||
|
@ -23,7 +24,7 @@
|
|||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="itemFk" number>Item</vn-th>
|
||||
<vn-th field="concept" default-order="ASC">Description</vn-th>
|
||||
<vn-th field="concept">Description</vn-th>
|
||||
<vn-th field="itemPackingTypeFk" number>Packing type</vn-th>
|
||||
<vn-th field="quantity" number>Quantity</vn-th>
|
||||
<vn-th number>m³ per quantity</vn-th>
|
||||
|
|
|
@ -5,9 +5,10 @@ class Controller extends Section {
|
|||
constructor($element, $) {
|
||||
super($element, $);
|
||||
this.filter = {
|
||||
include: [{
|
||||
include: {
|
||||
relation: 'item'
|
||||
}]
|
||||
},
|
||||
order: 'concept'
|
||||
};
|
||||
|
||||
this.ticketVolumes = [];
|
||||
|
|
Loading…
Reference in New Issue