fix test ticketservice, update selectors and acl
gitea/salix/dev This commit looks good Details

This commit is contained in:
Bernat 2019-04-11 12:25:01 +02:00
parent a4e9555dd1
commit c6203a0654
3 changed files with 5 additions and 5 deletions

View File

@ -0,0 +1 @@
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('160', 'TicketServiceType', '*', 'READ', 'ALLOW', 'ROLE', 'employee');

View File

@ -455,7 +455,7 @@ export default {
}, },
ticketService: { ticketService: {
addServiceButton: 'vn-ticket-service > form > vn-card > div > vn-one:nth-child(3) > vn-icon-button > button > vn-icon', addServiceButton: 'vn-ticket-service > form > vn-card > div > vn-one:nth-child(3) > vn-icon-button > button > vn-icon',
firstDescriptionInput: 'vn-ticket-service vn-autocomplete[label="Documentos"]', firstDescriptionAutocomplete: 'vn-ticket-service vn-autocomplete[field="service.description"]',
firstQuantityInput: 'vn-ticket-service vn-input-number[label="Quantity"] input', firstQuantityInput: 'vn-ticket-service vn-input-number[label="Quantity"] input',
firstPriceInput: 'vn-ticket-service vn-input-number[label="Price"] input', firstPriceInput: 'vn-ticket-service vn-input-number[label="Price"] input',
firstVatTypeAutocomplete: 'vn-ticket-service vn-autocomplete[label="Tax class"]', firstVatTypeAutocomplete: 'vn-ticket-service vn-autocomplete[label="Tax class"]',

View File

@ -13,8 +13,7 @@ describe('Ticket services path', () => {
it('should edit the first service', async() => { it('should edit the first service', async() => {
const result = await nightmare const result = await nightmare
.clearInput(selectors.ticketService.firstDescriptionInput) .autocompleteSearch(selectors.ticketService.firstDescriptionAutocomplete, 'Documentos')
.write(selectors.ticketService.firstDescriptionInput, 'my service')
.clearInput(selectors.ticketService.firstQuantityInput) .clearInput(selectors.ticketService.firstQuantityInput)
.write(selectors.ticketService.firstQuantityInput, 99) .write(selectors.ticketService.firstQuantityInput, 99)
.clearInput(selectors.ticketService.firstPriceInput) .clearInput(selectors.ticketService.firstPriceInput)
@ -29,9 +28,9 @@ describe('Ticket services path', () => {
it('should confirm the service description was edited correctly', async() => { it('should confirm the service description was edited correctly', async() => {
const result = await nightmare const result = await nightmare
.reloadSection('ticket.card.service') .reloadSection('ticket.card.service')
.waitToGetProperty(selectors.ticketService.firstDescriptionInput, 'value'); .waitToGetProperty(`${selectors.ticketService.firstDescriptionAutocomplete} input`, 'value');
expect(result).toEqual('my service'); expect(result).toEqual('Documentos');
}); });
it('should confirm the service quantity was edited correctly', async() => { it('should confirm the service quantity was edited correctly', async() => {