Commit f6c336e9 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Restore the lost success event handler for hiding the verification modal

Changelog: fixed
EE: true
parent 86b33eb5
...@@ -70,6 +70,7 @@ export default { ...@@ -70,6 +70,7 @@ export default {
:initial-height="$options.iframeHeight" :initial-height="$options.iframeHeight"
:iframe-url="iframeUrl" :iframe-url="iframeUrl"
:allowed-origin="allowedOrigin" :allowed-origin="allowedOrigin"
@success="$emit('success')"
/> />
</gl-modal> </gl-modal>
</template> </template>
import { GlSprintf } from '@gitlab/ui'; import { GlSprintf } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import AccountVerificationModal from 'ee/billings/components/account_verification_modal.vue'; import AccountVerificationModal from 'ee/billings/components/account_verification_modal.vue';
import Zuora from 'ee/billings/components/zuora.vue';
describe('Account verification modal', () => { describe('Account verification modal', () => {
let wrapper; let wrapper;
...@@ -39,6 +40,18 @@ describe('Account verification modal', () => { ...@@ -39,6 +40,18 @@ describe('Account verification modal', () => {
}); });
}); });
describe('when zuora emits success', () => {
beforeEach(() => {
createComponent();
});
it('forwards the success event up', () => {
wrapper.findComponent(Zuora).vm.$emit('success');
expect(wrapper.emitted('success')).toHaveLength(1);
});
});
describe('clicking the submit button', () => { describe('clicking the submit button', () => {
beforeEach(() => { beforeEach(() => {
createComponent(); createComponent();
......
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