removed collapsed & toggle collapsed specs
This commit is contained in:
parent
29b396b4d5
commit
949160e382
3 changed files with 0 additions and 108 deletions
|
@ -1,42 +0,0 @@
|
||||||
<script>
|
|
||||||
import icon from '~/vue_shared/components/icon.vue';
|
|
||||||
import panelResizer from '~/vue_shared/components/panel_resizer.vue';
|
|
||||||
import repoCommitSection from './repo_commit_section.vue';
|
|
||||||
import ResizablePanel from './resizable_panel.vue';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
repoCommitSection,
|
|
||||||
icon,
|
|
||||||
panelResizer,
|
|
||||||
ResizablePanel,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
noChangesStateSvgPath: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
committedStateSvgPath: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<resizable-panel
|
|
||||||
:collapsible="true"
|
|
||||||
:initial-width="340"
|
|
||||||
side="right"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="multi-file-commit-panel-section"
|
|
||||||
>
|
|
||||||
<repo-commit-section
|
|
||||||
:no-changes-state-svg-path="noChangesStateSvgPath"
|
|
||||||
:committed-state-svg-path="committedStateSvgPath"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</resizable-panel>
|
|
||||||
</template>
|
|
|
@ -50,35 +50,6 @@ describe('Multi-file editor commit sidebar list', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('collapsed', () => {
|
|
||||||
beforeEach(done => {
|
|
||||||
vm.$store.state.rightPanelCollapsed = true;
|
|
||||||
|
|
||||||
Vue.nextTick(done);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('hides list', () => {
|
|
||||||
expect(vm.$el.querySelector('.list-unstyled')).toBeNull();
|
|
||||||
expect(vm.$el.querySelector('.help-block')).toBeNull();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('with toggle', () => {
|
|
||||||
beforeEach(done => {
|
|
||||||
spyOn(vm, 'toggleRightPanelCollapsed');
|
|
||||||
|
|
||||||
vm.showToggle = true;
|
|
||||||
|
|
||||||
Vue.nextTick(done);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('calls setPanelCollapsedStatus when clickin toggle', () => {
|
|
||||||
vm.$el.querySelector('.multi-file-commit-panel-collapse-btn').click();
|
|
||||||
|
|
||||||
expect(vm.toggleRightPanelCollapsed).toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('action button', () => {
|
describe('action button', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
spyOn(vm, 'stageAllChanges');
|
spyOn(vm, 'stageAllChanges');
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
import Vue from 'vue';
|
|
||||||
import store from '~/ide/stores';
|
|
||||||
import ideContextBar from '~/ide/components/ide_context_bar.vue';
|
|
||||||
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
|
|
||||||
|
|
||||||
describe('Multi-file editor right context bar', () => {
|
|
||||||
let vm;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
const Component = Vue.extend(ideContextBar);
|
|
||||||
|
|
||||||
vm = createComponentWithStore(Component, store, {
|
|
||||||
noChangesStateSvgPath: 'svg',
|
|
||||||
committedStateSvgPath: 'svg',
|
|
||||||
});
|
|
||||||
|
|
||||||
vm.$store.state.rightPanelCollapsed = false;
|
|
||||||
|
|
||||||
vm.$mount();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
vm.$destroy();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('collapsed', () => {
|
|
||||||
beforeEach(done => {
|
|
||||||
vm.$store.state.rightPanelCollapsed = true;
|
|
||||||
|
|
||||||
Vue.nextTick(done);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('adds collapsed class', () => {
|
|
||||||
expect(vm.$el.querySelector('.is-collapsed')).not.toBeNull();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in a new issue