fixed specs
This commit is contained in:
parent
5c8f31eb7e
commit
c669638959
2 changed files with 4 additions and 7 deletions
|
@ -15,9 +15,7 @@ describe('IDE commit sidebar actions', () => {
|
|||
|
||||
vm.$store.state.currentBranchId = 'master';
|
||||
vm.$store.state.currentProjectId = 'abcproject';
|
||||
vm.$store.state.projects.abcproject = {
|
||||
...projectData,
|
||||
};
|
||||
Vue.set(vm.$store.state.projects, 'abcproject', { ...projectData });
|
||||
|
||||
vm.$mount();
|
||||
|
||||
|
@ -39,12 +37,8 @@ describe('IDE commit sidebar actions', () => {
|
|||
});
|
||||
|
||||
it('hides merge request option when project merge requests are disabled', done => {
|
||||
vm.$destroy();
|
||||
|
||||
vm.$store.state.projects.abcproject.merge_requests_enabled = false;
|
||||
|
||||
vm.$mount();
|
||||
|
||||
vm.$nextTick(() => {
|
||||
expect(vm.$el.querySelectorAll('input[type="radio"]').length).toBe(2);
|
||||
expect(vm.$el.textContent).not.toContain('Create a new branch and merge request');
|
||||
|
|
|
@ -4,6 +4,7 @@ import CommitForm from '~/ide/components/commit_sidebar/form.vue';
|
|||
import { activityBarViews } from '~/ide/constants';
|
||||
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
|
||||
import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper';
|
||||
import { projectData } from 'spec/ide/mock_data';
|
||||
import { resetStore } from '../../helpers';
|
||||
|
||||
describe('IDE commit form', () => {
|
||||
|
@ -14,6 +15,8 @@ describe('IDE commit form', () => {
|
|||
spyOnProperty(window, 'innerHeight').and.returnValue(800);
|
||||
|
||||
store.state.changedFiles.push('test');
|
||||
store.state.currentProjectId = 'abcproject';
|
||||
Vue.set(store.state.projects, 'abcproject', { ...projectData });
|
||||
|
||||
vm = createComponentWithStore(Component, store).$mount();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue