parent
da4d961c8b
commit
a0cf617cca
|
@ -484,7 +484,8 @@ export default {
|
|||
orderByAutocomplete: `vn-autocomplete[label="Order by"]`,
|
||||
},
|
||||
orderBasicData: {
|
||||
clientAutocomplete: `vn-autocomplete[label=Client]`,
|
||||
clientAutocomplete: `vn-autocomplete[label="Client"]`,
|
||||
addressAutocomplete: `vn-autocomplete[label="Address"]`,
|
||||
observationInput: `vn-textarea[label="Observation"] textarea`,
|
||||
saveButton: `${components.vnSubmit}`
|
||||
},
|
||||
|
|
|
@ -2,7 +2,7 @@ import selectors from '../../helpers/selectors.js';
|
|||
import createNightmare from '../../helpers/nightmare';
|
||||
|
||||
// Bug #808 order.basic-data
|
||||
xdescribe('Order edit basic data path', () => {
|
||||
fdescribe('Order edit basic data path', () => {
|
||||
const nightmare = createNightmare();
|
||||
describe('when confirmed order', () => {
|
||||
beforeAll(() => {
|
||||
|
@ -15,11 +15,13 @@ xdescribe('Order edit basic data path', () => {
|
|||
it('should not be able to change the client', async() => {
|
||||
const result = await nightmare
|
||||
.autocompleteSearch(selectors.orderBasicData.clientAutocomplete, 'Tony Stark')
|
||||
.autocompleteSearch(selectors.orderBasicData.addressAutocomplete, 'Tony Stark')
|
||||
.wait(1999)
|
||||
.waitToClick(selectors.orderBasicData.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual(`You can't make changes on the basic data of an confirmed order or with rows`);
|
||||
});
|
||||
}, 15000);
|
||||
});
|
||||
|
||||
describe('when order with rows', () => {
|
||||
|
|
|
@ -36,5 +36,6 @@
|
|||
"The warehouse can't be repeated": "The warehouse can't be repeated",
|
||||
"Barcode must be unique": "Barcode must be unique",
|
||||
"You don't have enough privileges to do that": "You don't have enough privileges to do that",
|
||||
"You can't create a ticket for a frozen client": "You can't create a ticket for a frozen client"
|
||||
"You can't create a ticket for a frozen client": "You can't create a ticket for a frozen client",
|
||||
"can't be blank": "can't be blank"
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
import ngModule from '../module';
|
||||
import './style.scss';
|
||||
import {runInThisContext} from 'vm';
|
||||
|
||||
class Controller {
|
||||
constructor($state, $scope, $http, vnApp, $translate) {
|
||||
|
|
|
@ -29,9 +29,10 @@
|
|||
</vn-autocomplete>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
fields="['id', 'nickname']"
|
||||
data="address"
|
||||
label="Address"
|
||||
search-function="{or: [{id: $search}, {nickname: {like: '%'+$search+'%'}}]}"
|
||||
search-function="$search"
|
||||
show-field="nickname"
|
||||
value-field="id"
|
||||
field="$ctrl.order.addressFk">
|
||||
|
|
Loading…
Reference in New Issue