Merge branch 'dev' of https://git.verdnatura.es/salix into dev
This commit is contained in:
commit
8448d76ebe
|
@ -1,4 +1,8 @@
|
||||||
<div ng-click="$ctrl.onSnackbarClick($event)">
|
<div id="shapes"></div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div ng-click="$ctrl.onSnackbarClick($event)">
|
||||||
<button ng-click="$ctrl.onButtonClick()"></button>
|
<button ng-click="$ctrl.onButtonClick()"></button>
|
||||||
<div class="text"></div>
|
<div class="text"></div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
|
@ -9,11 +9,50 @@ export default class Controller extends Component {
|
||||||
constructor($element, $translate) {
|
constructor($element, $translate) {
|
||||||
super($element);
|
super($element);
|
||||||
this.$translate = $translate;
|
this.$translate = $translate;
|
||||||
this.shown = false;
|
|
||||||
this.snackbar = $element[0].firstChild;
|
this.snackbar = $element[0].firstChild;
|
||||||
this.$snackbar = angular.element(this.snackbar);
|
this.$snackbar = angular.element(this.snackbar);
|
||||||
this.button = $element[0].querySelector('button');
|
}
|
||||||
this.textNode = this.snackbar.querySelector('.text');
|
|
||||||
|
/**
|
||||||
|
* It creates a new snackbar notification
|
||||||
|
* @param {Object} data Snackbar data
|
||||||
|
* @return {Object} Created snackbar shape
|
||||||
|
*/
|
||||||
|
createShape(data) {
|
||||||
|
let shape = document.createElement('div');
|
||||||
|
shape.className = 'shape';
|
||||||
|
|
||||||
|
let button = document.createElement('button');
|
||||||
|
|
||||||
|
let buttonText = data.actionText || this.$translate.instant('Hide');
|
||||||
|
buttonText = document.createTextNode(buttonText);
|
||||||
|
button.appendChild(buttonText);
|
||||||
|
|
||||||
|
button.addEventListener('click', () => {
|
||||||
|
this.onButtonClick(shape);
|
||||||
|
});
|
||||||
|
|
||||||
|
shape.appendChild(button);
|
||||||
|
|
||||||
|
let shapeText = document.createElement('div');
|
||||||
|
shapeText.setAttribute('class', 'text');
|
||||||
|
shape.appendChild(shapeText);
|
||||||
|
|
||||||
|
let text = document.createTextNode(data.message);
|
||||||
|
shapeText.appendChild(text);
|
||||||
|
|
||||||
|
if (data.shapeType)
|
||||||
|
shape.classList.add(data.shapeType);
|
||||||
|
|
||||||
|
let parent = this.snackbar.querySelectorAll('.shape')[0];
|
||||||
|
|
||||||
|
if (parent) {
|
||||||
|
this.snackbar.insertBefore(shape, parent);
|
||||||
|
} else {
|
||||||
|
this.snackbar.appendChild(shape);
|
||||||
|
}
|
||||||
|
|
||||||
|
return shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,24 +61,15 @@ export default class Controller extends Component {
|
||||||
* @param {Object} data The message data
|
* @param {Object} data The message data
|
||||||
*/
|
*/
|
||||||
show(data) {
|
show(data) {
|
||||||
if (this.shown) {
|
|
||||||
this.hide();
|
|
||||||
this.onTransitionEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.clearTimeouts();
|
|
||||||
this.shown = true;
|
|
||||||
this.textNode.textContent = data.message;
|
|
||||||
this.actionHandler = data.actionHandler;
|
this.actionHandler = data.actionHandler;
|
||||||
|
|
||||||
this.button.textContent =
|
let shape = this.createShape(data);
|
||||||
data.actionText || this.$translate.instant('Hide');
|
|
||||||
|
|
||||||
this.timeoutId = setTimeout(() =>
|
setTimeout(() =>
|
||||||
this.hide(), data.timeout || 6000);
|
this.hide(shape), data.timeout || 6000);
|
||||||
|
|
||||||
this.transitionTimeout = setTimeout(() =>
|
setTimeout(() =>
|
||||||
this.$snackbar.addClass('shown'), 30);
|
shape.classList.add('shown'), 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,52 +78,41 @@ export default class Controller extends Component {
|
||||||
* @param {Object} data The message data
|
* @param {Object} data The message data
|
||||||
*/
|
*/
|
||||||
showError(data) {
|
showError(data) {
|
||||||
|
data.shapeType = 'error';
|
||||||
|
|
||||||
|
this.show(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows a success.
|
||||||
|
*
|
||||||
|
* @param {Object} data The message data
|
||||||
|
*/
|
||||||
|
showSuccess(data) {
|
||||||
|
data.shapeType = 'success';
|
||||||
|
|
||||||
this.show(data);
|
this.show(data);
|
||||||
this.$snackbar.addClass('error');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hides the snackbar.
|
* Hides the snackbar.
|
||||||
|
* @param {Object} shape Snackbar element
|
||||||
*/
|
*/
|
||||||
hide() {
|
hide(shape) {
|
||||||
if (!this.shown) return;
|
setTimeout(() => shape.classList.remove('shown'), 30);
|
||||||
clearTimeout(this.timeoutId);
|
setTimeout(() => shape.remove(), 250);
|
||||||
this.shown = false;
|
|
||||||
this.hideTimeout = setTimeout(() => this.onTransitionEnd(), 250);
|
|
||||||
|
|
||||||
this.transitionTimeout =
|
|
||||||
setTimeout(() => this.$snackbar.removeClass('shown'), 30);
|
|
||||||
}
|
|
||||||
|
|
||||||
onTransitionEnd() {
|
|
||||||
this.$snackbar.removeClass('error');
|
|
||||||
this.textNode.textContent = '';
|
|
||||||
this.button.textContent = '';
|
|
||||||
this.actionHandler = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onSnackbarClick(event) {
|
onSnackbarClick(event) {
|
||||||
this.event = event;
|
this.event = event;
|
||||||
}
|
}
|
||||||
|
|
||||||
onButtonClick() {
|
onButtonClick(shape) {
|
||||||
if (this.actionHandler)
|
if (this.actionHandler) {
|
||||||
this.actionHandler();
|
this.actionHandler();
|
||||||
else
|
} else {
|
||||||
this.hide();
|
this.hide(shape);
|
||||||
}
|
}
|
||||||
|
|
||||||
clearTimeouts() {
|
|
||||||
clearTimeout(this.timeoutId);
|
|
||||||
clearTimeout(this.hideTimeout);
|
|
||||||
clearTimeout(this.transitionTimeout);
|
|
||||||
this.timeoutId = null;
|
|
||||||
this.hideTimeout = null;
|
|
||||||
this.transitionTimeout = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$onDestroy() {
|
|
||||||
this.clearTimeouts();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controller.$inject = ['$element', '$translate'];
|
Controller.$inject = ['$element', '$translate'];
|
||||||
|
|
|
@ -1,38 +1,50 @@
|
||||||
@import "colors";
|
@import "colors";
|
||||||
vn-snackbar > div {
|
|
||||||
box-sizing: border-box;
|
vn-snackbar #shapes {
|
||||||
background-color: #333;
|
|
||||||
color: white;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 50%;
|
right: 15px;
|
||||||
width: 20em;
|
width: 20em;
|
||||||
margin-left: -10em;
|
max-height: 20.625em;
|
||||||
padding: 1em;
|
|
||||||
border-top-left-radius: .2em;
|
|
||||||
border-top-right-radius: .2em;
|
|
||||||
transform: translateY(10em);
|
|
||||||
transition: transform 300ms ease-in-out;
|
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
vn-snackbar .shape {
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: rgba(1, 1, 1, 0.8);
|
||||||
|
color: white;
|
||||||
|
padding: 1em;
|
||||||
|
border-radius: .2em;
|
||||||
box-shadow: 0 0 .4em rgba(1,1,1,.4);
|
box-shadow: 0 0 .4em rgba(1,1,1,.4);
|
||||||
|
margin-bottom: 15px;
|
||||||
|
transform: translateX(20em);
|
||||||
|
transition: transform 300ms ease-in-out;
|
||||||
|
|
||||||
|
&.text {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
|
||||||
&.shown {
|
&.shown {
|
||||||
transform: translateY(0);
|
transform: translateX(0);
|
||||||
}
|
}
|
||||||
&.notice {
|
|
||||||
background-color: #1e88e5;
|
&.success {
|
||||||
|
background-color: rgba(163, 209, 49, 0.8);
|
||||||
|
color: #445911;
|
||||||
|
|
||||||
& > button {
|
& > button {
|
||||||
color: rgba(1, 1, 1, 0.6);
|
color: rgba(1, 1, 1, 0.6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.error {
|
&.error {
|
||||||
background-color: #c62828;
|
background-color: rgba(198, 40, 40, 0.8);
|
||||||
|
|
||||||
& > button {
|
& > button {
|
||||||
color: rgba(1, 1, 1, 0.6);
|
color: rgba(1, 1, 1, 0.6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& > button {
|
& > button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
|
@ -177,7 +177,7 @@ export default class Watcher extends Component {
|
||||||
* Notifies the user that the data has been saved.
|
* Notifies the user that the data has been saved.
|
||||||
*/
|
*/
|
||||||
notifySaved() {
|
notifySaved() {
|
||||||
this.vnApp.showMessage(this._.instant('Data saved!'));
|
this.vnApp.showSuccess(this._.instant('Data saved!'));
|
||||||
}
|
}
|
||||||
|
|
||||||
writeData(json, resolve) {
|
writeData(json, resolve) {
|
||||||
|
|
|
@ -11,19 +11,28 @@ export default class App {
|
||||||
this.loaderStatus = 0;
|
this.loaderStatus = 0;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
showMessage(message) {
|
showMessage(message) {
|
||||||
if (this.snackbar)
|
if (this.snackbar)
|
||||||
this.snackbar.show({message: message});
|
this.snackbar.show({message: message});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showSuccess(message) {
|
||||||
|
if (this.snackbar)
|
||||||
|
this.snackbar.showSuccess({message: message});
|
||||||
|
}
|
||||||
|
|
||||||
showError(message) {
|
showError(message) {
|
||||||
if (this.snackbar)
|
if (this.snackbar)
|
||||||
this.snackbar.showError({message: message});
|
this.snackbar.showError({message: message});
|
||||||
}
|
}
|
||||||
|
|
||||||
pushLoader() {
|
pushLoader() {
|
||||||
this.loaderStatus++;
|
this.loaderStatus++;
|
||||||
if (this.loaderStatus === 1)
|
if (this.loaderStatus === 1)
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
popLoader() {
|
popLoader() {
|
||||||
this.loaderStatus--;
|
this.loaderStatus--;
|
||||||
if (this.loaderStatus === 0)
|
if (this.loaderStatus === 0)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
.icon-volume:before { content: '\e801'; } /* '' */
|
.icon-volume:before { content: '\e801'; } /* '' */
|
||||||
.icon-barcode:before { content: '\e802'; } /* '' */
|
.icon-barcode:before { content: '\e802'; } /* '' */
|
||||||
.icon-bucket:before { content: '\e803'; } /* '' */
|
.icon-bucket:before { content: '\e803'; } /* '' */
|
||||||
|
.icon-reserva:before { content: '\e804'; } /* '' */
|
||||||
.icon-frozen:before { content: '\e808'; } /* '' */
|
.icon-frozen:before { content: '\e808'; } /* '' */
|
||||||
.icon-disabled:before { content: '\e80b'; } /* '' */
|
.icon-disabled:before { content: '\e80b'; } /* '' */
|
||||||
.icon-invoices:before { content: '\e80c'; } /* '' */
|
.icon-invoices:before { content: '\e80c'; } /* '' */
|
||||||
|
|
Binary file not shown.
|
@ -44,7 +44,7 @@ class Controller {
|
||||||
return true;
|
return true;
|
||||||
}, res => {
|
}, res => {
|
||||||
if (res.data.error.message === 'NO_AGENCY_AVAILABLE')
|
if (res.data.error.message === 'NO_AGENCY_AVAILABLE')
|
||||||
this.vnApp.showError(
|
this.vnApp.showSuccess(
|
||||||
this.$translate.instant(`There's no available agency for this landing date`)
|
this.$translate.instant(`There's no available agency for this landing date`)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -188,11 +188,9 @@ Nightmare.action('waitForSnackbarReset', function(done) {
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForSnackbar', function(done) {
|
Nightmare.action('waitForSnackbar', function(done) {
|
||||||
this.wait(500)
|
this.wait(500).waitForShapes('vn-snackbar .shape .text')
|
||||||
.waitForInnerText('vn-snackbar .text')
|
.then(shapes => {
|
||||||
.then(value => {
|
done(null, shapes);
|
||||||
this.waitForSnackbarReset()
|
|
||||||
.then(() => done(null, value));
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -202,3 +200,17 @@ Nightmare.action('waitForURL', function(hashURL, done) {
|
||||||
}, hashURL)
|
}, hashURL)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Nightmare.action('waitForShapes', function(selector, done) {
|
||||||
|
this.wait(selector)
|
||||||
|
.evaluate_now(selector => {
|
||||||
|
let shapes = document.querySelectorAll(selector);
|
||||||
|
let shapesList = [];
|
||||||
|
|
||||||
|
for (let shape of shapes) {
|
||||||
|
shapesList.push(shape.innerText);
|
||||||
|
}
|
||||||
|
|
||||||
|
return shapesList;
|
||||||
|
}, done, selector);
|
||||||
|
});
|
||||||
|
|
|
@ -67,7 +67,7 @@ describe('Client', () => {
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Some fields are invalid');
|
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ describe('Client', () => {
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Some fields are invalid');
|
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ describe('Client', () => {
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Some fields are invalid');
|
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ describe('Client', () => {
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientBasicData.saveButton)
|
.click(selectors.clientBasicData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientFiscalData.saveButton)
|
.click(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientFiscalData.acceptPropagationButton)
|
.waitToClick(selectors.clientFiscalData.acceptPropagationButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Equivalent tax spreaded');
|
expect(result).toEqual(jasmine.arrayContaining(['Equivalent tax spreaded']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientPayMethod.saveButton)
|
.waitToClick(selectors.clientPayMethod.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('requires an IBAN');
|
expect(result).toEqual(jasmine.arrayContaining(['requires an IBAN']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientPayMethod.saveButton)
|
.waitToClick(selectors.clientPayMethod.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect((result === 'Notification sent!' || result === 'Data saved!')).toBeTruthy();
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!', 'Notification sent!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientFiscalData.saveButton)
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Some fields are invalid');
|
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientAddresses.saveButton)
|
.click(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('The default consignee can not be unchecked');
|
expect(result).toEqual(jasmine.arrayContaining(['The default consignee can not be unchecked']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -65,7 +65,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('type cannot be blank');
|
expect(result).toEqual(jasmine.arrayContaining(['type cannot be blank']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Some fields are invalid');
|
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -54,7 +54,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientWebAccess.saveButton)
|
.waitToClick(selectors.clientWebAccess.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain(`Data saved!`);
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientNotes.saveButton)
|
.click(selectors.clientNotes.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientCredit.saveButton)
|
.click(selectors.clientCredit.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientGreuge.saveButton)
|
.click(selectors.clientGreuge.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Some fields are invalid');
|
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientGreuge.saveButton)
|
.click(selectors.clientGreuge.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientFiscalData.saveButton)
|
.click(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientFiscalData.saveButton)
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientFiscalData.saveButton)
|
.click(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientFiscalData.saveButton)
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ describe('Client', () => {
|
||||||
.click(selectors.clientFiscalData.saveButton)
|
.click(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ describe('Item', () => {
|
||||||
.click(selectors.itemBasicData.submitBasicDataButton)
|
.click(selectors.itemBasicData.submitBasicDataButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ describe('Item', () => {
|
||||||
.click(selectors.itemTax.submitTaxButton)
|
.click(selectors.itemTax.submitTaxButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ describe('Item', () => {
|
||||||
.click(selectors.itemTags.submitItemTagsButton)
|
.click(selectors.itemTags.submitItemTagsButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ describe('Item', () => {
|
||||||
.click(selectors.itemNiches.submitNichesButton)
|
.click(selectors.itemNiches.submitNichesButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ describe('Item', () => {
|
||||||
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ describe('Item', () => {
|
||||||
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ describe('Item', () => {
|
||||||
.waitToClick(selectors.itemBarcodes.submitBarcodesButton)
|
.waitToClick(selectors.itemBarcodes.submitBarcodesButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ describe('Item', () => {
|
||||||
.click(selectors.itemCreateView.createButton)
|
.click(selectors.itemCreateView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ describe('Ticket', () => {
|
||||||
.click(selectors.ticketNotes.submitNotesButton)
|
.click(selectors.ticketNotes.submitNotesButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
// .click(selectors.ticketPackages.savePackagesButton)
|
// .click(selectors.ticketPackages.savePackagesButton)
|
||||||
// .waitForSnackbar()
|
// .waitForSnackbar()
|
||||||
// .then(result => {
|
// .then(result => {
|
||||||
// expect(result).toContain('Some fields are invalid');
|
// expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
// .click(selectors.ticketPackages.savePackagesButton)
|
// .click(selectors.ticketPackages.savePackagesButton)
|
||||||
// .waitForSnackbar()
|
// .waitForSnackbar()
|
||||||
// .then(result => {
|
// .then(result => {
|
||||||
// expect(result).toContain('Some fields are invalid');
|
// expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
// .click(selectors.ticketPackages.savePackagesButton)
|
// .click(selectors.ticketPackages.savePackagesButton)
|
||||||
// .waitForSnackbar()
|
// .waitForSnackbar()
|
||||||
// .then(result => {
|
// .then(result => {
|
||||||
// expect(result).toContain('Some fields are invalid');
|
// expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
// .click(selectors.ticketPackages.savePackagesButton)
|
// .click(selectors.ticketPackages.savePackagesButton)
|
||||||
// .waitForSnackbar()
|
// .waitForSnackbar()
|
||||||
// .then(result => {
|
// .then(result => {
|
||||||
// expect(result).toContain('Package cannot be blank');
|
// expect(result).toEqual(jasmine.arrayContaining(['Package cannot be blank']));
|
||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
// .click(selectors.ticketPackages.savePackagesButton)
|
// .click(selectors.ticketPackages.savePackagesButton)
|
||||||
// .waitForSnackbar()
|
// .waitForSnackbar()
|
||||||
// .then(result => {
|
// .then(result => {
|
||||||
// expect(result).toContain('Data saved!');
|
// expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ describe('Ticket', () => {
|
||||||
.click(selectors.createStateView.saveStateButton)
|
.click(selectors.createStateView.saveStateButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('No changes to save');
|
expect(result).toEqual(jasmine.arrayContaining(['No changes to save']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ describe('Ticket', () => {
|
||||||
.click(selectors.createStateView.saveStateButton)
|
.click(selectors.createStateView.saveStateButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ describe('Ticket', () => {
|
||||||
.click(selectors.createStateView.saveStateButton)
|
.click(selectors.createStateView.saveStateButton)
|
||||||
.waitForSnackbar()
|
.waitForSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue