Commit b6e5b84b authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch...

Merge branch 'migrate_ee_spec_javascripts_vue_mr_widget_components_approvals_approvals_auth_spec' into 'master'

Migrate ee vue_mr_widget approvals_auth_spec to Jest

See merge request gitlab-org/gitlab!30459
parents 1184a332 e5e9cccc
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import { GlModal } from '@gitlab/ui';
import ApprovalsAuth from 'ee/vue_merge_request_widget/components/approvals/approvals_auth.vue';
const TEST_PASSWORD = 'password';
const localVue = createLocalVue();
// For some reason, the `localVue.nextTick` needs to be deferred
// For some reason, the `Promise.resolve` needs to be deferred
// or the timing doesn't work.
const tick = () => Promise.resolve().then(localVue.nextTick);
const waitForTick = done =>
tick()
Promise.resolve()
.then(done)
.catch(done.fail);
......@@ -18,12 +15,11 @@ describe('Approval auth component', () => {
let wrapper;
const createComponent = (props = {}) => {
wrapper = shallowMount(localVue.extend(ApprovalsAuth), {
wrapper = shallowMount(ApprovalsAuth, {
propsData: {
...props,
modalId: 'testid',
},
localVue,
});
};
......
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