small e2e refactors
This commit is contained in:
parent
747b593c90
commit
648bd46862
|
@ -16,7 +16,7 @@ describe('Claim edit basic data path', () => {
|
|||
.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Gestionado')
|
||||
.waitToClick(selectors.claimBasicData.isPaidWithManaCheckbox)
|
||||
.clearInput(selectors.claimBasicData.observationInput)
|
||||
.type(selectors.claimBasicData.observationInput, 'edited observation')
|
||||
.write(selectors.claimBasicData.observationInput, 'edited observation')
|
||||
.click(selectors.claimBasicData.saveButton)
|
||||
.waitForSnackbar();
|
||||
|
||||
|
@ -55,7 +55,7 @@ describe('Claim edit basic data path', () => {
|
|||
.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Pendiente')
|
||||
.waitToClick(selectors.claimBasicData.isPaidWithManaCheckbox)
|
||||
.clearInput(selectors.claimBasicData.observationInput)
|
||||
.type(selectors.claimBasicData.observationInput, 'Observation one')
|
||||
.write(selectors.claimBasicData.observationInput, 'Observation one')
|
||||
.click(selectors.claimBasicData.saveButton)
|
||||
.waitForSnackbar();
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ describe('Claim detail', () => {
|
|||
it('should edit de second item claimed quantity', async() => {
|
||||
const result = await nightmare
|
||||
.write(selectors.claimDetail.secondItemQuantityInput, 10)
|
||||
.type('body', '\u000d') // simulates enter
|
||||
.write('body', '\u000d') // simulates enter
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
|
@ -38,10 +38,10 @@ describe('Claim detail', () => {
|
|||
|
||||
it('should confirm the second item, and the claimed total were correctly edited', async() => {
|
||||
const claimedQuantity = await nightmare
|
||||
.getProperty(selectors.claimDetail.secondItemQuantityInput, 'value');
|
||||
.waitToGetProperty(selectors.claimDetail.secondItemQuantityInput, 'value');
|
||||
|
||||
const totalClaimed = await nightmare
|
||||
.getProperty(selectors.claimDetail.totalClaimed, 'innerText');
|
||||
.waitToGetProperty(selectors.claimDetail.totalClaimed, 'innerText');
|
||||
|
||||
expect(claimedQuantity).toEqual('10');
|
||||
expect(totalClaimed).toEqual('29.50 €');
|
||||
|
|
|
@ -11,8 +11,7 @@ describe('Client create path', () => {
|
|||
|
||||
it(`should search for the user Carol Danvers to confirm it isn't created yet`, async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.clientsIndex.searchClientInput)
|
||||
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
||||
.click(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 0)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
@ -39,9 +38,9 @@ describe('Client create path', () => {
|
|||
|
||||
it('should receive an error when clicking the create button having name and Business name fields empty', async() => {
|
||||
const result = await nightmare
|
||||
.type(selectors.createClientView.taxNumber, '74451390E')
|
||||
.type(selectors.createClientView.userName, 'CaptainMarvel')
|
||||
.type(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
|
||||
.write(selectors.createClientView.taxNumber, '74451390E')
|
||||
.write(selectors.createClientView.userName, 'CaptainMarvel')
|
||||
.write(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
|
||||
.autocompleteSearch(selectors.createClientView.salesPersonAutocomplete, 'Accessory')
|
||||
.click(selectors.createClientView.createButton)
|
||||
.waitForLastSnackbar();
|
||||
|
@ -51,10 +50,10 @@ describe('Client create path', () => {
|
|||
|
||||
it(`should attempt to create a new user with all it's data but wrong email`, async() => {
|
||||
const result = await nightmare
|
||||
.type(selectors.createClientView.name, 'Carol Danvers')
|
||||
.type(selectors.createClientView.socialName, 'AVG tax')
|
||||
.write(selectors.createClientView.name, 'Carol Danvers')
|
||||
.write(selectors.createClientView.socialName, 'AVG tax')
|
||||
.clearInput(selectors.createClientView.email)
|
||||
.type(selectors.createClientView.email, 'incorrect email format')
|
||||
.write(selectors.createClientView.email, 'incorrect email format')
|
||||
.click(selectors.createClientView.createButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -64,7 +63,7 @@ describe('Client create path', () => {
|
|||
it(`should create a new user with all correct data`, async() => {
|
||||
const result = await nightmare
|
||||
.clearInput(selectors.createClientView.email)
|
||||
.type(selectors.createClientView.email, 'caroldanvers@verdnatura.es')
|
||||
.write(selectors.createClientView.email, 'caroldanvers@verdnatura.es')
|
||||
.click(selectors.createClientView.createButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -84,8 +83,7 @@ describe('Client create path', () => {
|
|||
|
||||
it(`should search for the user Carol Danvers to confirm it exists`, async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.clientsIndex.searchClientInput)
|
||||
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
||||
.click(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
|
|
@ -24,15 +24,15 @@ describe('Client Edit basicData path', () => {
|
|||
it('should edit the client basic data but leave salesPerson untainted', async() => {
|
||||
const result = await nightmare
|
||||
.clearInput(selectors.clientBasicData.nameInput)
|
||||
.type(selectors.clientBasicData.nameInput, 'Ptonomy Wallace')
|
||||
.write(selectors.clientBasicData.nameInput, 'Ptonomy Wallace')
|
||||
.clearInput(selectors.clientBasicData.contactInput)
|
||||
.type(selectors.clientBasicData.contactInput, 'David Haller')
|
||||
.write(selectors.clientBasicData.contactInput, 'David Haller')
|
||||
.clearInput(selectors.clientBasicData.phoneInput)
|
||||
.type(selectors.clientBasicData.phoneInput, '987654321')
|
||||
.write(selectors.clientBasicData.phoneInput, '987654321')
|
||||
.clearInput(selectors.clientBasicData.mobileInput)
|
||||
.type(selectors.clientBasicData.mobileInput, '123456789')
|
||||
.write(selectors.clientBasicData.mobileInput, '123456789')
|
||||
.clearInput(selectors.clientBasicData.emailInput)
|
||||
.type(selectors.clientBasicData.emailInput, 'PWallace@verdnatura.es')
|
||||
.write(selectors.clientBasicData.emailInput, 'PWallace@verdnatura.es')
|
||||
.autocompleteSearch(selectors.clientBasicData.channelAutocomplete, 'Rumors on the streets')
|
||||
.click(selectors.clientBasicData.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
@ -108,15 +108,15 @@ describe('Client Edit basicData path', () => {
|
|||
it('should edit the client basic data including salesPerson', async() => {
|
||||
const result = await nightmare
|
||||
.clearInput(selectors.clientBasicData.nameInput)
|
||||
.type(selectors.clientBasicData.nameInput, 'Ororo Munroe')
|
||||
.write(selectors.clientBasicData.nameInput, 'Ororo Munroe')
|
||||
.clearInput(selectors.clientBasicData.contactInput)
|
||||
.type(selectors.clientBasicData.contactInput, 'Black Panther')
|
||||
.write(selectors.clientBasicData.contactInput, 'Black Panther')
|
||||
.clearInput(selectors.clientBasicData.phoneInput)
|
||||
.type(selectors.clientBasicData.phoneInput, '123456789')
|
||||
.write(selectors.clientBasicData.phoneInput, '123456789')
|
||||
.clearInput(selectors.clientBasicData.mobileInput)
|
||||
.type(selectors.clientBasicData.mobileInput, '987654321')
|
||||
.write(selectors.clientBasicData.mobileInput, '987654321')
|
||||
.clearInput(selectors.clientBasicData.emailInput)
|
||||
.type(selectors.clientBasicData.emailInput, 'Storm@verdnatura.es')
|
||||
.write(selectors.clientBasicData.emailInput, 'Storm@verdnatura.es')
|
||||
.autocompleteSearch(selectors.clientBasicData.salesPersonAutocomplete, 'Accessory')
|
||||
.autocompleteSearch(selectors.clientBasicData.channelAutocomplete, 'Metropolis newspaper')
|
||||
.click(selectors.clientBasicData.saveButton)
|
||||
|
|
|
@ -67,15 +67,15 @@ describe('Client Edit fiscalData path', () => {
|
|||
const result = await nightmare
|
||||
.wait(selectors.clientFiscalData.socialNameInput)
|
||||
.clearInput(selectors.clientFiscalData.socialNameInput)
|
||||
.type(selectors.clientFiscalData.socialNameInput, 'SMASH!')
|
||||
.write(selectors.clientFiscalData.socialNameInput, 'SMASH!')
|
||||
.clearInput(selectors.clientFiscalData.fiscalIdInput)
|
||||
.type(selectors.clientFiscalData.fiscalIdInput, '94980061C')
|
||||
.write(selectors.clientFiscalData.fiscalIdInput, '94980061C')
|
||||
.clearInput(selectors.clientFiscalData.addressInput)
|
||||
.type(selectors.clientFiscalData.addressInput, 'Somewhere edited')
|
||||
.write(selectors.clientFiscalData.addressInput, 'Somewhere edited')
|
||||
.clearInput(selectors.clientFiscalData.postcodeInput)
|
||||
.type(selectors.clientFiscalData.postcodeInput, '12345')
|
||||
.write(selectors.clientFiscalData.postcodeInput, '12345')
|
||||
.clearInput(selectors.clientFiscalData.cityInput)
|
||||
.type(selectors.clientFiscalData.cityInput, 'N/A')
|
||||
.write(selectors.clientFiscalData.cityInput, 'N/A')
|
||||
.autocompleteSearch(selectors.clientFiscalData.countryAutocomplete, 'Francia')
|
||||
.autocompleteSearch(selectors.clientFiscalData.provinceAutocomplete, 'Province two')
|
||||
.waitToClick(selectors.clientFiscalData.activeCheckboxLabel)
|
||||
|
@ -96,7 +96,7 @@ describe('Client Edit fiscalData path', () => {
|
|||
const result = await nightmare
|
||||
.waitToClick(selectors.clientFiscalData.viesCheckboxInput)
|
||||
.clearInput(selectors.clientFiscalData.fiscalIdInput)
|
||||
.type(selectors.clientFiscalData.fiscalIdInput, 'A94980061C')
|
||||
.write(selectors.clientFiscalData.fiscalIdInput, 'A94980061C')
|
||||
.waitToClick(selectors.clientFiscalData.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -106,7 +106,7 @@ describe('Client Edit fiscalData path', () => {
|
|||
it('should finally edit the fixcal data correctly as VIES isnt checked and fiscal id is valid for EQtax', async() => {
|
||||
const result = await nightmare
|
||||
.clearInput(selectors.clientFiscalData.fiscalIdInput)
|
||||
.type(selectors.clientFiscalData.fiscalIdInput, '94980061C')
|
||||
.write(selectors.clientFiscalData.fiscalIdInput, '94980061C')
|
||||
.waitToClick(selectors.clientFiscalData.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ describe('Client Edit pay method path', () => {
|
|||
.autocompleteSearch(selectors.clientPayMethod.payMethodAutocomplete, 'PayMethod with IBAN')
|
||||
.autocompleteSearch(selectors.clientPayMethod.swiftBicAutocomplete, 'BBKKESMMMMM')
|
||||
.clearInput(selectors.clientPayMethod.dueDayInput)
|
||||
.type(selectors.clientPayMethod.dueDayInput, '60')
|
||||
.write(selectors.clientPayMethod.dueDayInput, '60')
|
||||
.waitForTextInInput(selectors.clientPayMethod.dueDayInput, '60')
|
||||
.waitToClick(selectors.clientPayMethod.receivedCoreLCRCheckbox)
|
||||
.waitToClick(selectors.clientPayMethod.receivedCoreVNLCheckbox)
|
||||
|
@ -31,7 +31,7 @@ describe('Client Edit pay method path', () => {
|
|||
const snackbarMessage = await nightmare
|
||||
.waitToClick(selectors.clientPayMethod.clearswiftBicButton)
|
||||
.clearInput(selectors.clientPayMethod.IBANInput)
|
||||
.type(selectors.clientPayMethod.IBANInput, 'FR9121000418450200051332')
|
||||
.write(selectors.clientPayMethod.IBANInput, 'FR9121000418450200051332')
|
||||
.waitForTextInInput(selectors.clientPayMethod.IBANInput, 'FR9121000418450200051332')
|
||||
.wait(1000)
|
||||
.waitToClick(selectors.clientPayMethod.saveButton)
|
||||
|
@ -42,10 +42,10 @@ describe('Client Edit pay method path', () => {
|
|||
|
||||
it(`should create a new BIC code`, async() => {
|
||||
const newcode = await nightmare
|
||||
.click(selectors.clientPayMethod.newBankEntityButton)
|
||||
.type(selectors.clientPayMethod.newBankEntityName, 'Gotham City Bank')
|
||||
.type(selectors.clientPayMethod.newBankEntityBIC, 'GTHMCT')
|
||||
.click(selectors.clientPayMethod.acceptBankEntityButton)
|
||||
.waitToClick(selectors.clientPayMethod.newBankEntityButton)
|
||||
.write(selectors.clientPayMethod.newBankEntityName, 'Gotham City Bank')
|
||||
.write(selectors.clientPayMethod.newBankEntityBIC, 'GTHMCT')
|
||||
.waitToClick(selectors.clientPayMethod.acceptBankEntityButton)
|
||||
.waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value');
|
||||
|
||||
expect(newcode).toEqual('GTHMCT Gotham City Bank');
|
||||
|
@ -62,7 +62,7 @@ describe('Client Edit pay method path', () => {
|
|||
const AutomaticCode = await nightmare
|
||||
.clearInput(selectors.clientPayMethod.IBANInput)
|
||||
.waitToClick(selectors.clientPayMethod.clearswiftBicButton)
|
||||
.type(selectors.clientPayMethod.IBANInput, 'ES9121000418450200051332')
|
||||
.write(selectors.clientPayMethod.IBANInput, 'ES9121000418450200051332')
|
||||
.waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value');
|
||||
|
||||
expect(AutomaticCode).toEqual('CAIXESBB Caixa Bank');
|
||||
|
|
|
@ -24,8 +24,7 @@ describe('Client add address notes path', () => {
|
|||
it('should not save a description without observation type', async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.addObservationButton)
|
||||
.wait(selectors.clientAddresses.firstObservationDescriptionInput)
|
||||
.type(selectors.clientAddresses.firstObservationDescriptionInput, 'first description')
|
||||
.write(selectors.clientAddresses.firstObservationDescriptionInput, 'first description')
|
||||
.waitToClick(selectors.clientAddresses.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -44,10 +43,10 @@ describe('Client add address notes path', () => {
|
|||
|
||||
it('should create two new observations', async() => {
|
||||
const result = await nightmare
|
||||
.type(selectors.clientAddresses.firstObservationDescriptionInput, 'first description')
|
||||
.write(selectors.clientAddresses.firstObservationDescriptionInput, 'first description')
|
||||
.waitToClick(selectors.clientAddresses.addObservationButton)
|
||||
.autocompleteSearch(selectors.clientAddresses.secondObservationTypeAutocomplete, 'observation one')
|
||||
.type(selectors.clientAddresses.secondObservationDescriptionInput, 'second description')
|
||||
.write(selectors.clientAddresses.secondObservationDescriptionInput, 'second description')
|
||||
.waitToClick(selectors.clientAddresses.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ describe('Client Edit web access path', () => {
|
|||
const result = await nightmare
|
||||
.waitToClick(selectors.clientWebAccess.enableWebAccessCheckbox)
|
||||
.clearInput(selectors.clientWebAccess.userNameInput)
|
||||
.type(selectors.clientWebAccess.userNameInput, 'Hulk')
|
||||
.write(selectors.clientWebAccess.userNameInput, 'Hulk')
|
||||
.waitToClick(selectors.clientWebAccess.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ describe('Client Add notes path', () => {
|
|||
|
||||
it(`should create a note`, async() => {
|
||||
const result = await nightmare
|
||||
.type(selectors.clientNotes.noteInput, 'Meeting with Black Widow 21st 9am')
|
||||
.write(selectors.clientNotes.noteInput, 'Meeting with Black Widow 21st 9am')
|
||||
.click(selectors.clientNotes.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ describe('Client Add credit path', () => {
|
|||
it(`should edit the credit`, async() => {
|
||||
const result = await nightmare
|
||||
.clearInput(selectors.clientCredit.creditInput)
|
||||
.type(selectors.clientCredit.creditInput, 999)
|
||||
.write(selectors.clientCredit.creditInput, 999)
|
||||
.click(selectors.clientCredit.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@ describe('Client Add greuge path', () => {
|
|||
|
||||
it(`should create a new greuge with all its data`, async() => {
|
||||
const result = await nightmare
|
||||
.type(selectors.clientGreuge.amountInput, 999)
|
||||
.write(selectors.clientGreuge.amountInput, 999)
|
||||
.waitForTextInInput(selectors.clientGreuge.amountInput, '999')
|
||||
.type(selectors.clientGreuge.descriptionInput, 'new armor for Batman!')
|
||||
.write(selectors.clientGreuge.descriptionInput, 'new armor for Batman!')
|
||||
.click(selectors.clientGreuge.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ describe('Client lock verified data path', () => {
|
|||
const result = await nightmare
|
||||
.wait(selectors.clientFiscalData.socialNameInput)
|
||||
.clearInput(selectors.clientFiscalData.socialNameInput)
|
||||
.type(selectors.clientFiscalData.socialNameInput, 'salesPerson was here')
|
||||
.write(selectors.clientFiscalData.socialNameInput, 'salesPerson was here')
|
||||
.click(selectors.clientFiscalData.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -65,8 +65,7 @@ describe('Client lock verified data path', () => {
|
|||
|
||||
it('should search again for the user Petter Parker', async() => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.clientsIndex.searchClientInput)
|
||||
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.click(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
@ -130,7 +129,7 @@ describe('Client lock verified data path', () => {
|
|||
const result = await nightmare
|
||||
.wait(selectors.clientFiscalData.socialNameInput)
|
||||
.clearInput(selectors.clientFiscalData.socialNameInput)
|
||||
.type(selectors.clientFiscalData.socialNameInput, 'administrative was here')
|
||||
.write(selectors.clientFiscalData.socialNameInput, 'administrative was here')
|
||||
.click(selectors.clientFiscalData.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -168,8 +167,7 @@ describe('Client lock verified data path', () => {
|
|||
|
||||
it('should again search for the user Petter Parker', async() => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.clientsIndex.searchClientInput)
|
||||
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.click(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
@ -209,9 +207,8 @@ describe('Client lock verified data path', () => {
|
|||
|
||||
it('should not be able to save change throwing a verified data error', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.clientFiscalData.socialNameInput)
|
||||
.clearInput(selectors.clientFiscalData.socialNameInput)
|
||||
.type(selectors.clientFiscalData.socialNameInput, 'salesPerson was here')
|
||||
.write(selectors.clientFiscalData.socialNameInput, 'salesPerson was here')
|
||||
.click(selectors.clientFiscalData.saveButton)
|
||||
.waitForSnackbar();
|
||||
|
||||
|
@ -239,8 +236,7 @@ describe('Client lock verified data path', () => {
|
|||
|
||||
it('should now search again for the user Petter Parker', async() => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.clientsIndex.searchClientInput)
|
||||
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.click(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
@ -280,9 +276,8 @@ describe('Client lock verified data path', () => {
|
|||
|
||||
it('should now edit the social name', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.clientFiscalData.socialNameInput)
|
||||
.clearInput(selectors.clientFiscalData.socialNameInput)
|
||||
.type(selectors.clientFiscalData.socialNameInput, 'salesAssistant was here')
|
||||
.write(selectors.clientFiscalData.socialNameInput, 'salesAssistant was here')
|
||||
.click(selectors.clientFiscalData.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -320,8 +315,7 @@ describe('Client lock verified data path', () => {
|
|||
|
||||
it('should once again search for the user Petter Parker', async() => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.clientsIndex.searchClientInput)
|
||||
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.click(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
|
|
@ -13,9 +13,8 @@ describe('Client log path', () => {
|
|||
|
||||
it('should update the clients name', async() => {
|
||||
let result = await nightmare
|
||||
.wait(selectors.clientBasicData.nameInput)
|
||||
.clearInput(selectors.clientBasicData.nameInput)
|
||||
.type(selectors.clientBasicData.nameInput, 'this is a test')
|
||||
.write(selectors.clientBasicData.nameInput, 'this is a test')
|
||||
.waitToClick(selectors.clientBasicData.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ describe('Client risk path', () => {
|
|||
it('should create a new payment that clears the debt', async() => {
|
||||
let result = await nightmare
|
||||
.clearInput(selectors.clientRisk.newPaymentBankInut)
|
||||
.type(selectors.clientRisk.newPaymentBankInut, '2')
|
||||
.write(selectors.clientRisk.newPaymentBankInut, '2')
|
||||
.waitToClick(selectors.clientRisk.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -49,7 +49,7 @@ describe('Client risk path', () => {
|
|||
it('should create a new payment that sets the balance to positive value', async() => {
|
||||
let result = await nightmare
|
||||
.clearInput(selectors.clientRisk.newPaymentAmountInput)
|
||||
.type(selectors.clientRisk.newPaymentAmountInput, '100')
|
||||
.write(selectors.clientRisk.newPaymentAmountInput, '100')
|
||||
.waitToClick(selectors.clientRisk.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -75,7 +75,7 @@ describe('Client risk path', () => {
|
|||
it('should create a new payment that sets the balance back to the original negative value', async() => {
|
||||
let result = await nightmare
|
||||
.clearInput(selectors.clientRisk.newPaymentAmountInput)
|
||||
.type(selectors.clientRisk.newPaymentAmountInput, '-150')
|
||||
.write(selectors.clientRisk.newPaymentAmountInput, '-150')
|
||||
.waitToClick(selectors.clientRisk.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -103,8 +103,7 @@ describe('Client risk path', () => {
|
|||
|
||||
it('should now search for the user Petter Parker', async() => {
|
||||
let resultCount = await nightmare
|
||||
.wait(selectors.clientsIndex.searchClientInput)
|
||||
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||
.click(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
|
|
@ -11,8 +11,7 @@ describe('Item summary path', () => {
|
|||
|
||||
it('should search for an item', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.itemsIndex.searchItemInput)
|
||||
.type(selectors.itemsIndex.searchItemInput, 'Object1 Gem1 5')
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Object1 Gem1 5')
|
||||
.click(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
@ -85,7 +84,7 @@ describe('Item summary path', () => {
|
|||
const result = await nightmare
|
||||
.clearInput('vn-item-index vn-searchbar input')
|
||||
.click(selectors.itemsIndex.searchButton)
|
||||
.type(selectors.itemsIndex.searchItemInput, 'Object2 Gem2 3')
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Object2 Gem2 3')
|
||||
.click(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
|
|
@ -13,17 +13,16 @@ describe('Item Edit basic data path', () => {
|
|||
|
||||
it(`should edit the item basic data`, async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.itemBasicData.nameInput)
|
||||
.clearInput(selectors.itemBasicData.nameInput)
|
||||
.type(selectors.itemBasicData.nameInput, 'Rose of Purity')
|
||||
.write(selectors.itemBasicData.nameInput, 'Rose of Purity')
|
||||
.autocompleteSearch(selectors.itemBasicData.typeAutocomplete, 'Crisantemo')
|
||||
.autocompleteSearch(selectors.itemBasicData.intrastatAutocomplete, 'Coral y materiales similares')
|
||||
.clearInput(selectors.itemBasicData.relevancyInput)
|
||||
.type(selectors.itemBasicData.relevancyInput, '1')
|
||||
.write(selectors.itemBasicData.relevancyInput, '1')
|
||||
.autocompleteSearch(selectors.itemBasicData.originAutocomplete, 'Spain')
|
||||
.autocompleteSearch(selectors.itemBasicData.expenceAutocomplete, 'Alquiler VNH')
|
||||
.clearInput(selectors.itemBasicData.longNameInput)
|
||||
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
|
||||
.write(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
|
||||
.waitToClick(selectors.itemBasicData.isActiveCheckbox)
|
||||
.waitToClick(selectors.itemBasicData.submitBasicDataButton)
|
||||
.waitForLastSnackbar();
|
||||
|
|
|
@ -16,9 +16,9 @@ describe('Item create tags path', () => {
|
|||
.waitToClick(selectors.itemTags.fourthRemoveTagButton)
|
||||
.waitToClick(selectors.itemTags.addItemTagButton)
|
||||
.autocompleteSearch(selectors.itemTags.seventhTagAutocomplete, 'Ancho de la base')
|
||||
.type(selectors.itemTags.seventhValueInput, '50')
|
||||
.write(selectors.itemTags.seventhValueInput, '50')
|
||||
.clearInput(selectors.itemTags.seventhRelevancyInput)
|
||||
.type(selectors.itemTags.seventhRelevancyInput, '4')
|
||||
.write(selectors.itemTags.seventhRelevancyInput, '4')
|
||||
.click(selectors.itemTags.submitItemTagsButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ describe('Item create niche path', () => {
|
|||
.waitToClick(selectors.itemNiches.addNicheButton)
|
||||
.waitToClick(selectors.itemNiches.secondNicheRemoveButton)
|
||||
.autocompleteSearch(selectors.itemNiches.thirdWarehouseAutocomplete, 'Warehouse Two')
|
||||
.type(selectors.itemNiches.thirdCodeInput, 'A4')
|
||||
.write(selectors.itemNiches.thirdCodeInput, 'A4')
|
||||
.click(selectors.itemNiches.submitNichesButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@ describe('Item Create botanical path', () => {
|
|||
|
||||
it(`should create a new botanical for the item`, async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.itemBotanical.botanicalInput)
|
||||
.type(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
|
||||
.write(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
|
||||
.autocompleteSearch(selectors.itemBotanical.genusAutocomplete, 'Abelia')
|
||||
.autocompleteSearch(selectors.itemBotanical.speciesAutocomplete, 'dealbata')
|
||||
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
||||
|
@ -52,7 +51,7 @@ describe('Item Create botanical path', () => {
|
|||
it(`should edit botanical for the item`, async() => {
|
||||
const result = await nightmare
|
||||
.clearInput(selectors.itemBotanical.botanicalInput)
|
||||
.type(selectors.itemBotanical.botanicalInput, 'Herp Derp')
|
||||
.write(selectors.itemBotanical.botanicalInput, 'Herp Derp')
|
||||
.autocompleteSearch(selectors.itemBotanical.genusAutocomplete, 'Abies')
|
||||
.autocompleteSearch(selectors.itemBotanical.speciesAutocomplete, 'decurrens')
|
||||
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
||||
|
|
|
@ -15,8 +15,7 @@ describe('Item Create barcodes path', () => {
|
|||
const result = await nightmare
|
||||
.waitToClick(selectors.itemBarcodes.firstCodeRemoveButton)
|
||||
.waitToClick(selectors.itemBarcodes.addBarcodeButton)
|
||||
.wait(selectors.itemBarcodes.thirdCodeInput)
|
||||
.type(selectors.itemBarcodes.thirdCodeInput, '5')
|
||||
.write(selectors.itemBarcodes.thirdCodeInput, '5')
|
||||
.waitToClick(selectors.itemBarcodes.submitBarcodesButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -25,9 +24,8 @@ describe('Item Create barcodes path', () => {
|
|||
|
||||
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, async() => {
|
||||
const result = await nightmare
|
||||
.click(selectors.itemBasicData.basicDataButton)
|
||||
.wait(selectors.itemBasicData.nameInput)
|
||||
.click(selectors.itemBarcodes.barcodeButton)
|
||||
.waitToClick(selectors.itemBasicData.basicDataButton)
|
||||
.waitToClick(selectors.itemBarcodes.barcodeButton)
|
||||
.waitForTextInInput(selectors.itemBarcodes.thirdCodeInput, '5')
|
||||
.waitToGetProperty(selectors.itemBarcodes.thirdCodeInput, 'value');
|
||||
|
||||
|
|
|
@ -10,9 +10,8 @@ describe('Item regularize path', () => {
|
|||
|
||||
it('should search for the item', async() => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.itemsIndex.searchItemInput)
|
||||
.type(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
|
||||
.click(selectors.itemsIndex.searchButton)
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
|
||||
.waitToClick(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
|
@ -33,8 +32,7 @@ describe('Item regularize path', () => {
|
|||
const result = await nightmare
|
||||
.waitToClick(selectors.itemDescriptor.moreMenu)
|
||||
.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton)
|
||||
.wait(selectors.itemDescriptor.regularizeQuantityInput)
|
||||
.type(selectors.itemDescriptor.regularizeQuantityInput, 100)
|
||||
.write(selectors.itemDescriptor.regularizeQuantityInput, 100)
|
||||
.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouseAutocomplete, 'Warehouse One')
|
||||
.waitToClick(selectors.itemDescriptor.regularizeSaveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
@ -55,9 +53,8 @@ describe('Item regularize path', () => {
|
|||
|
||||
it('should search for the ticket with alias missing', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'missing')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'missing')
|
||||
.waitToClick(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
|
@ -102,8 +99,7 @@ describe('Item regularize path', () => {
|
|||
|
||||
it('should search for the item once again', async() => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.itemsIndex.searchItemInput)
|
||||
.type(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
|
||||
.click(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
@ -125,8 +121,7 @@ describe('Item regularize path', () => {
|
|||
const result = await nightmare
|
||||
.waitToClick(selectors.itemDescriptor.moreMenu)
|
||||
.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton)
|
||||
.wait(selectors.itemDescriptor.regularizeQuantityInput)
|
||||
.type(selectors.itemDescriptor.regularizeQuantityInput, 100)
|
||||
.write(selectors.itemDescriptor.regularizeQuantityInput, 100)
|
||||
.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouseAutocomplete, 'Warehouse One')
|
||||
.waitToClick(selectors.itemDescriptor.regularizeSaveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
@ -147,8 +142,7 @@ describe('Item regularize path', () => {
|
|||
|
||||
it('should search for the ticket with id 23 once again', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:23')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:23')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
|
|
@ -16,7 +16,7 @@ describe('Ticket Create notes path', () => {
|
|||
.waitToClick(selectors.ticketNotes.firstNoteRemoveButton)
|
||||
.waitToClick(selectors.ticketNotes.addNoteButton)
|
||||
.autocompleteSearch(selectors.ticketNotes.firstNoteTypeAutocomplete, 'observation one')
|
||||
.type(selectors.ticketNotes.firstDescriptionInput, 'description')
|
||||
.write(selectors.ticketNotes.firstDescriptionInput, 'description')
|
||||
.click(selectors.ticketNotes.submitNotesButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ describe('Ticket Create packages path', () => {
|
|||
|
||||
it(`should attempt create a new package but receive an error if quantity is a string`, async() => {
|
||||
const result = await nightmare
|
||||
.type(selectors.ticketPackages.firstQuantityInput, 'ninety 9')
|
||||
.write(selectors.ticketPackages.firstQuantityInput, 'ninety 9')
|
||||
.click(selectors.ticketPackages.savePackagesButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -34,7 +34,7 @@ describe('Ticket Create packages path', () => {
|
|||
it(`should attempt create a new package but receive an error if quantity is 0`, async() => {
|
||||
const result = await nightmare
|
||||
.clearInput(selectors.ticketPackages.firstQuantityInput)
|
||||
.type(selectors.ticketPackages.firstQuantityInput, 0)
|
||||
.write(selectors.ticketPackages.firstQuantityInput, 0)
|
||||
.click(selectors.ticketPackages.savePackagesButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -44,7 +44,7 @@ describe('Ticket Create packages path', () => {
|
|||
it(`should attempt create a new package but receive an error if package is blank`, async() => {
|
||||
const result = await nightmare
|
||||
.clearInput(selectors.ticketPackages.firstQuantityInput)
|
||||
.type(selectors.ticketPackages.firstQuantityInput, 99)
|
||||
.write(selectors.ticketPackages.firstQuantityInput, 99)
|
||||
.click(selectors.ticketPackages.clearPackageAutocompleteButton)
|
||||
.click(selectors.ticketPackages.savePackagesButton)
|
||||
.waitForLastSnackbar();
|
||||
|
|
|
@ -23,7 +23,7 @@ describe('Ticket Create new tracking state path', () => {
|
|||
|
||||
it(`should attempt create a new state but receive an error if state is empty`, async() => {
|
||||
let result = await nightmare
|
||||
.click(selectors.createStateView.saveStateButton)
|
||||
.waitToClick(selectors.createStateView.saveStateButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('State cannot be blank');
|
||||
|
|
|
@ -34,8 +34,7 @@ describe('Ticket Edit sale path', () => {
|
|||
|
||||
it('should again search for a specific ticket', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
@ -123,8 +122,7 @@ describe('Ticket Edit sale path', () => {
|
|||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||
.waitToClick(selectors.globalItems.ticketsButton)
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
|
||||
|
@ -139,7 +137,7 @@ describe('Ticket Edit sale path', () => {
|
|||
it('should try to add a higher quantity value and then receive an error', async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.ticketSales.firstSaleQuantityClearInput)
|
||||
.type(selectors.ticketSales.firstSaleQuantity, '9\u000d')
|
||||
.write(selectors.ticketSales.firstSaleQuantity, '9\u000d')
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('The new quantity should be smaller than the old one');
|
||||
|
@ -148,7 +146,7 @@ describe('Ticket Edit sale path', () => {
|
|||
it('should remove 1 from quantity', async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.ticketSales.firstSaleQuantityClearInput)
|
||||
.type(selectors.ticketSales.firstSaleQuantity, '4\u000d')
|
||||
.write(selectors.ticketSales.firstSaleQuantity, '4\u000d')
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
|
@ -157,9 +155,8 @@ describe('Ticket Edit sale path', () => {
|
|||
it('should update the price', async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.ticketSales.firstSalePrice)
|
||||
.wait(selectors.ticketSales.firstSalePriceInput)
|
||||
.type(selectors.ticketSales.firstSalePriceInput, 5)
|
||||
.type('body', '\u000d') // simulates enter
|
||||
.write(selectors.ticketSales.firstSalePriceInput, 5)
|
||||
.write('body', '\u000d') // simulates enter
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
|
@ -183,8 +180,8 @@ describe('Ticket Edit sale path', () => {
|
|||
const result = await nightmare
|
||||
.waitToClick(selectors.ticketSales.firstSaleDiscount)
|
||||
.wait('vn-textfield[label="Discount"] > div[class="container selected"]') // a function selects the text after it's loaded
|
||||
.type(selectors.ticketSales.firstSaleDiscountInput, 50)
|
||||
.type('body', '\u000d') // simulates enter
|
||||
.write(selectors.ticketSales.firstSaleDiscountInput, 50)
|
||||
.write('body', '\u000d') // simulates enter
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
|
@ -230,8 +227,7 @@ describe('Ticket Edit sale path', () => {
|
|||
|
||||
it('should search for the claim with id 4', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.claimsIndex.searchResult)
|
||||
.type(selectors.claimsIndex.searchClaimInput, 4)
|
||||
.write(selectors.claimsIndex.searchClaimInput, 4)
|
||||
.click(selectors.claimsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.claimsIndex.searchResult, 1)
|
||||
.countElement(selectors.claimsIndex.searchResult);
|
||||
|
@ -252,8 +248,7 @@ describe('Ticket Edit sale path', () => {
|
|||
|
||||
it('should search the ticket', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
@ -293,8 +288,7 @@ describe('Ticket Edit sale path', () => {
|
|||
const result = await nightmare
|
||||
.waitToClick(selectors.ticketSales.thirdSaleCheckbox)
|
||||
.waitToClick(selectors.ticketSales.transferSaleButton)
|
||||
.wait(selectors.ticketSales.moveToTicketInput)
|
||||
.type(selectors.ticketSales.moveToTicketInput, 2)
|
||||
.write(selectors.ticketSales.moveToTicketInput, 2)
|
||||
.waitToClick(selectors.ticketSales.moveToTicketButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
@ -304,7 +298,7 @@ describe('Ticket Edit sale path', () => {
|
|||
it('should transfer the sale to a valid ticket', async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.ticketSales.moveToTicketInputClearButton)
|
||||
.type(selectors.ticketSales.moveToTicketInput, 12)
|
||||
.write(selectors.ticketSales.moveToTicketInput, 12)
|
||||
.waitToClick(selectors.ticketSales.moveToTicketButton)
|
||||
.waitForURL('ticket/12/sale')
|
||||
.parsedUrl();
|
||||
|
@ -323,8 +317,7 @@ describe('Ticket Edit sale path', () => {
|
|||
it('should go back to the original ticket sales section', async() => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.itemsIndex.goBackToModuleIndexButton)
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
|
||||
|
@ -347,8 +340,7 @@ describe('Ticket Edit sale path', () => {
|
|||
it('should go back to the receiver ticket sales section', async() => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.itemsIndex.goBackToModuleIndexButton)
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:12')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:12')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
|
||||
|
@ -364,8 +356,7 @@ describe('Ticket Edit sale path', () => {
|
|||
const result = await nightmare
|
||||
.waitToClick(selectors.ticketSales.firstSaleCheckbox)
|
||||
.waitToClick(selectors.ticketSales.transferSaleButton)
|
||||
.wait(selectors.ticketSales.moveToTicketInput)
|
||||
.type(selectors.ticketSales.moveToTicketInput, 16)
|
||||
.write(selectors.ticketSales.moveToTicketInput, 16)
|
||||
.waitToClick(selectors.ticketSales.moveToTicketButton)
|
||||
.waitForURL('ticket/16/sale')
|
||||
.parsedUrl();
|
||||
|
@ -384,8 +375,7 @@ describe('Ticket Edit sale path', () => {
|
|||
it('should now go back to the original ticket sales section', async() => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.itemsIndex.goBackToModuleIndexButton)
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:8')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:8')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 24')
|
||||
|
@ -402,6 +392,7 @@ describe('Ticket Edit sale path', () => {
|
|||
.waitToClick(selectors.ticketSales.firstSaleCheckbox)
|
||||
.waitToClick(selectors.ticketSales.transferSaleButton)
|
||||
.waitToClick(selectors.ticketSales.moveToNewTicketButton)
|
||||
.resetLogin()
|
||||
.waitForLogin('salesPerson')
|
||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||
|
@ -414,8 +405,7 @@ describe('Ticket Edit sale path', () => {
|
|||
|
||||
it('should search for a specific created ticket', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'nickname:(address 24) stateFk:2')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'nickname:(address 24) stateFk:2')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
@ -475,9 +465,8 @@ describe('Ticket Edit sale path', () => {
|
|||
.waitToClick(selectors.ticketSales.selectAllSalesCheckbox)
|
||||
.waitToClick(selectors.ticketSales.moreMenuButton)
|
||||
.waitToClick(selectors.ticketSales.moreMenuUpdateDiscount)
|
||||
.wait(selectors.ticketSales.moreMenuUpdateDiscountInput)
|
||||
.type(selectors.ticketSales.moreMenuUpdateDiscountInput, 100)
|
||||
.type('body', '\u000d') // simulates enter
|
||||
.write(selectors.ticketSales.moreMenuUpdateDiscountInput, 100)
|
||||
.write('body', '\u000d') // simulates enter
|
||||
.waitForTextInElement(selectors.ticketSales.totalImport, '0.00')
|
||||
.waitToGetProperty(selectors.ticketSales.totalImport, 'innerText');
|
||||
|
||||
|
@ -499,8 +488,7 @@ describe('Ticket Edit sale path', () => {
|
|||
|
||||
it('should now search for a specific ticket', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
@ -587,8 +575,7 @@ describe('Ticket Edit sale path', () => {
|
|||
|
||||
it('should once again search for a specific ticket', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:16')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
|
|
@ -32,8 +32,7 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
it('should search for the ticket 11', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
@ -93,8 +92,7 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
it('should now search for the ticket 11', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
|
|
@ -14,12 +14,11 @@ describe('Ticket purchase request path', () => {
|
|||
it(`should add a new request`, async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.ticketRequests.addRequestButton)
|
||||
.wait(selectors.ticketRequests.descriptionInput)
|
||||
.type(selectors.ticketRequests.descriptionInput, 'New stuff')
|
||||
.type(selectors.ticketRequests.quantityInput, 99)
|
||||
.write(selectors.ticketRequests.descriptionInput, 'New stuff')
|
||||
.write(selectors.ticketRequests.quantityInput, 99)
|
||||
.waitToClick(selectors.ticketRequests.atenderSelect)
|
||||
.waitToClick(selectors.ticketRequests.atenderSelectSecondOption)
|
||||
.type(selectors.ticketRequests.priceInput, 999)
|
||||
.write(selectors.ticketRequests.priceInput, 999)
|
||||
.waitToClick(selectors.ticketRequests.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ describe('Ticket diary path', () => {
|
|||
|
||||
it('should search for a specific ticket', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
|
|
@ -11,8 +11,7 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
it('should search for a specific ticket', async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:17')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:17')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
@ -49,8 +48,7 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
it(`should search for the deleted ticket and check it's date`, async() => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:17')
|
||||
.write(selectors.ticketsIndex.searchTicketInput, 'id:17')
|
||||
.click(selectors.ticketsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||
.wait(selectors.ticketsIndex.searchResultDate)
|
||||
|
|
|
@ -64,5 +64,6 @@
|
|||
"Cannot check Equalization Tax in this NIF/CIF": "No se puede marcar RE en este NIF/CIF",
|
||||
"You can't make changes on the basic data of an confirmed order or with rows": "No puedes cambiar los datos basicos de una orden con artículos",
|
||||
"INVALID_USER_NAME": "El nombre de usuario solo debe contener letras minúsculas o, a partir del segundo carácter, números o subguiones, no esta permitido el uso de la letra ñ",
|
||||
"You can't create a ticket for a frozen client": "No puedes crear un ticket para un cliente congelado"
|
||||
"You can't create a ticket for a frozen client": "No puedes crear un ticket para un cliente congelado",
|
||||
"You can't create a ticket for a inactive client": "No puedes crear un ticket para un cliente inactivo"
|
||||
}
|
|
@ -4019,7 +4019,7 @@
|
|||
"dot-prop": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
|
||||
"integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=",
|
||||
"integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-obj": "^1.0.0"
|
||||
|
@ -4192,7 +4192,7 @@
|
|||
},
|
||||
"jsonfile": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -8179,7 +8179,7 @@
|
|||
"karma-chrome-launcher": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz",
|
||||
"integrity": "sha1-zxudBxNswY/iOTJ9JGVMPbw2is8=",
|
||||
"integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs-access": "^1.0.0",
|
||||
|
@ -14290,7 +14290,7 @@
|
|||
"split2": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz",
|
||||
"integrity": "sha1-GGsldbz4PoW30YRldWI47k7kJJM=",
|
||||
"integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"through2": "^2.0.2"
|
||||
|
@ -15322,7 +15322,7 @@
|
|||
"touch": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
|
||||
"integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=",
|
||||
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"nopt": "~1.0.10"
|
||||
|
@ -16944,7 +16944,7 @@
|
|||
"write-file-atomic": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz",
|
||||
"integrity": "sha1-H/YVdcLipOjlENb6TiQ8zhg5mas=",
|
||||
"integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.11",
|
||||
|
|
Loading…
Reference in New Issue