Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
Daniel Herrero 2017-11-09 11:39:53 +01:00
commit 5c8e997738
5 changed files with 69 additions and 7 deletions

3
.gitignore vendored
View File

@ -1,6 +1,7 @@
.DS_Store
node_modules
build
npm-debug.log
debug.log
datasources.development.json
.idea
.idea

View File

@ -90,9 +90,9 @@ services:
depends_on:
- route
links:
- "${BRANCH_NAME}-auth:auth"
- "${BRANCH_NAME}-salix:salix"
- "${BRANCH_NAME}-client:client"
- "${BRANCH_NAME}-mailer:mailer"
- "${BRANCH_NAME}-production:production"
- "${BRANCH_NAME}-route:route"
- "auth:${BRANCH_NAME}-auth"
- "salix:${BRANCH_NAME}-salix"
- "client:${BRANCH_NAME}-client"
- "mailer:${BRANCH_NAME}-mailer"
- "production:${BRANCH_NAME}-production"
- "route:${BRANCH_NAME}-route"

View File

@ -53,6 +53,7 @@ export default {
invoiceByMailCheckboxLabel: `${components.vnCheck}[label='Invoice by mail'] > label`,
invoiceByMailCheckboxInput: `${components.vnCheck}[label='Invoice by mail'] > label > label > input`,
addressInput: `${components.vnTextfield}[name="street"]`,
cityInput: `${components.vnTextfield}[name="city"]`,
saveButton: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-button-bar > vn-submit > input'
}
};

View File

@ -132,4 +132,64 @@ describe('Edit fiscalData path', () => {
})
.catch(catchErrors(done));
});
it(`should edit the address`, done => {
nightmare
.wait(selectors.fiscalData.addressInput)
.clearInput(selectors.fiscalData.addressInput)
.type(selectors.fiscalData.addressInput, 'Alpha Flight Low-Orbit')
.click(selectors.fiscalData.saveButton)
.wait(selectors.globalItems.snackbarIsActive)
.getInnerText(selectors.globalItems.snackbarIsActive)
.then(result => {
expect(result).toEqual(`¡Datos guardados!`);
done();
})
.catch(catchErrors(done));
});
it(`should confirm the address have been edited`, done => {
nightmare
.waitForSnackbarReset()
.click(selectors.basicData.basicDataButton)
.wait(selectors.basicData.nameInput)
.click(selectors.fiscalData.fiscalDataButton)
.wait(selectors.fiscalData.addressInput)
.getInputValue(selectors.fiscalData.addressInput)
.then(result => {
expect(result).toEqual(`Alpha Flight Low-Orbit`);
done();
})
.catch(catchErrors(done));
});
it(`should edit the city`, done => {
nightmare
.wait(selectors.fiscalData.cityInput)
.clearInput(selectors.fiscalData.cityInput)
.type(selectors.fiscalData.cityInput, 'N/A')
.click(selectors.fiscalData.saveButton)
.wait(selectors.globalItems.snackbarIsActive)
.getInnerText(selectors.globalItems.snackbarIsActive)
.then(result => {
expect(result).toEqual(`¡Datos guardados!`);
done();
})
.catch(catchErrors(done));
});
it(`should confirm the city have been edited`, done => {
nightmare
.waitForSnackbarReset()
.click(selectors.basicData.basicDataButton)
.wait(selectors.basicData.nameInput)
.click(selectors.fiscalData.fiscalDataButton)
.wait(selectors.fiscalData.cityInput)
.getInputValue(selectors.fiscalData.cityInput)
.then(result => {
expect(result).toEqual(`N/A`);
done();
})
.catch(catchErrors(done));
});
});