Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Juan Ferrer 2019-10-04 17:04:51 +02:00
commit 77bed21a43
2 changed files with 18 additions and 5 deletions

View File

@ -1,5 +1,6 @@
USE `vn`;
CREATE TABLE vn.`zoneWarehouse` (
CREATE TABLE `vn`.`zoneWarehouse` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`zoneFk` int(11) NOT NULL,
`warehouseFk` smallint(6) unsigned NOT NULL,
@ -10,7 +11,7 @@ CREATE TABLE vn.`zoneWarehouse` (
CONSTRAINT `zoneWarehouse_ibfk_2` FOREIGN KEY (`warehouseFk`) REFERENCES `vn2008`.`warehouse` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
CREATE TABLE vn.`zoneEvent` (
CREATE TABLE `vn`.`zoneEvent` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`zoneFk` int(11) NOT NULL,
`from` date DEFAULT NULL,
@ -25,7 +26,7 @@ CREATE TABLE vn.`zoneEvent` (
CONSTRAINT `zoneEvent_ibfk_1` FOREIGN KEY (`zoneFk`) REFERENCES `zone` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
CREATE TABLE vn.`zoneExclusion` (
CREATE TABLE `vn`.`zoneExclusion` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`zoneFk` int(11) NOT NULL,
`day` date NOT NULL,

View File

@ -65,6 +65,18 @@ describe('Client create path', () => {
expect(result).toEqual('Some fields are invalid');
});
it(`should attempt to create a new user with all it's data but wrong postal code`, async() => {
const result = await nightmare
.clearInput(selectors.createClientView.email)
.write(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
.clearInput(selectors.createClientView.postcode)
.write(selectors.createClientView.postcode, '479999')
.waitToClick(selectors.createClientView.createButton)
.waitForLastSnackbar();
expect(result).toEqual(`The postcode doesn't exists. Ensure you put the correct format`);
});
it(`should check for autocompleted city, province and country`, async() => {
const clientCity = await nightmare
.waitToGetProperty(`${selectors.createClientView.city}`, 'value');
@ -82,8 +94,8 @@ describe('Client create path', () => {
it(`should create a new user with all correct data`, async() => {
const result = await nightmare
.clearInput(selectors.createClientView.email)
.write(selectors.createClientView.email, 'caroldanvers@verdnatura.es')
.clearInput(selectors.createClientView.postcode)
.write(selectors.createClientView.postcode, '46000')
.waitToClick(selectors.createClientView.createButton)
.waitForLastSnackbar();