Skip to content

Commit

Permalink
refactor: folder for popup changed [WTEL-3894]
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirBeria committed Nov 16, 2023
1 parent 5ab5c64 commit 33903ec
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { shallowMount } from '@vue/test-utils';
import WtSaveFailedPopup from '../wt-save-failed-popup.vue';

describe('WtSaveFailedPopup', () => {
it('renders a component', () => {
const wrapper = shallowMount(WtSaveFailedPopup);
expect(wrapper.classes('wt-save-failed-popup')).toBe(true);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<template>
<wt-popup
class="wt-save-failed-popup"
:width="500"
@close="closePopup"
>
<template #title>
{{ $t('webitelUI.saveFailedPopup.title') }}
</template>
<template #main>
<div class="flow-save-filed-popup__wrapper">
<wt-icon
color="error"
icon="attention"
/>
<p>{{ $t('webitelUI.saveFailedPopup.label') }}</p>
</div>
</template>
<template #actions>
<wt-button
@click="save"
>
{{ $t('reusable.retry') }}
</wt-button>
<wt-button
color="secondary"
@click="download"
>
{{ $t('webitelUI.saveFailedPopup.exportToJson') }}
</wt-button>
<wt-button
color="secondary"
@click="closePopup"
>
{{ $t('reusable.close') }}
</wt-button>
</template>
</wt-popup>
</template>

<script>
export default {
name: 'FlowSaveFailedPopup',
emits: ['close-popup', 'save', 'download'],
methods: {
closePopup() {
this.$emit('close-popup');
},
save() {
this.$emit('save');
},
download() {
this.$emit('download');
},
},
};
</script>

<style lang="scss" scoped>
.flow-save-filed-popup__wrapper {
display: flex;
align-items: center;
flex-direction: column;
text-align: center;
.wt-icon {
margin-bottom: var(--spacing-sm);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ describe('WtSaveFailedPopup', () => {
expect(wrapper.classes('wt-save-failed-popup')).toBe(true);
});
});
``
File renamed without changes.

0 comments on commit 33903ec

Please sign in to comment.