This commit is contained in:
Gerard 2019-01-14 13:40:42 +01:00
commit bac033a6b8
1 changed files with 10 additions and 3 deletions

View File

@ -1,8 +1,7 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
// Bug #961 ticket.service fallo en borrado
xdescribe('Ticket services path', () => {
describe('Ticket services path', () => {
const nightmare = createNightmare();
beforeAll(() => {
@ -57,9 +56,17 @@ xdescribe('Ticket services path', () => {
expect(result).toEqual('Reduced VAT');
});
it('should delete the service and check there are none now', async() => {
it('should delete the service', async() => {
const result = await nightmare
.waitToClick(selectors.ticketService.fistDeleteServiceButton)
.waitToClick(selectors.ticketService.saveServiceButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
it('should confirm the service was sucessfully removed', async() => {
const result = await nightmare
.waitToClick(selectors.ticketBasicData.basicDataButton)
.wait(selectors.ticketBasicData.clientAutocomplete)
.click(selectors.ticketService.serviceButton)