Migrate top-centered toasts to bottom-left

Top-centered toasts go against Pajamas specifications and have been
moved back to the bottom-left corner.

Changelog: changed
EE: true
parent 97af6143
...@@ -168,9 +168,7 @@ export default { ...@@ -168,9 +168,7 @@ export default {
const msg = this.isEditing const msg = this.isEditing
? this.$options.i18n.FORM_EDITED ? this.$options.i18n.FORM_EDITED
: this.$options.i18n.FORM_CREATED; : this.$options.i18n.FORM_CREATED;
this.$toast.show(sprintf(msg, { name: this.name }), { this.$toast.show(sprintf(msg, { name: this.name }));
position: 'top-center',
});
this.name = ''; this.name = '';
this.nameError = []; this.nameError = [];
this.stages = initializeStages(this.defaultStageConfig, this.selectedPreset); this.stages = initializeStages(this.defaultStageConfig, this.selectedPreset);
......
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
methods: { methods: {
...mapActions(['setSelectedValueStream', 'deleteValueStream']), ...mapActions(['setSelectedValueStream', 'deleteValueStream']),
onSuccess(message) { onSuccess(message) {
this.$toast.show(message, { position: 'top-center' }); this.$toast.show(message);
}, },
isSelected(id) { isSelected(id) {
return Boolean(this.selectedValueStreamId && this.selectedValueStreamId === id); return Boolean(this.selectedValueStreamId && this.selectedValueStreamId === id);
......
...@@ -315,9 +315,7 @@ describe('ValueStreamForm', () => { ...@@ -315,9 +315,7 @@ describe('ValueStreamForm', () => {
}); });
it('displays a toast message', () => { it('displays a toast message', () => {
expect(mockToastShow).toHaveBeenCalledWith(`'${initialData.name}' Value Stream saved`, { expect(mockToastShow).toHaveBeenCalledWith(`'${initialData.name}' Value Stream saved`);
position: 'top-center',
});
}); });
it('sends tracking information', () => { it('sends tracking information', () => {
...@@ -411,9 +409,7 @@ describe('ValueStreamForm', () => { ...@@ -411,9 +409,7 @@ describe('ValueStreamForm', () => {
}); });
it('displays a toast message', () => { it('displays a toast message', () => {
expect(mockToastShow).toHaveBeenCalledWith(`'${streamName}' Value Stream created`, { expect(mockToastShow).toHaveBeenCalledWith(`'${streamName}' Value Stream created`);
position: 'top-center',
});
}); });
it('sends tracking information', () => { it('sends tracking information', () => {
......
...@@ -202,9 +202,6 @@ describe('ValueStreamSelect', () => { ...@@ -202,9 +202,6 @@ describe('ValueStreamSelect', () => {
it('displays a toast message', () => { it('displays a toast message', () => {
expect(mockToastShow).toHaveBeenCalledWith( expect(mockToastShow).toHaveBeenCalledWith(
`'${selectedValueStream.name}' Value Stream deleted`, `'${selectedValueStream.name}' Value Stream deleted`,
{
position: 'top-center',
},
); );
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment