Commit 8f127231 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/removeMrCommitNavFeatureFlag' into 'master'

Removes the mr_commit_neighbor_nav feature flag

See merge request gitlab-org/gitlab!51477
parents cfc53bf6 119b3d48
......@@ -282,14 +282,10 @@ describe('diffs/components/app', () => {
let moveSpy;
let jumpSpy;
function setup(componentProps, featureFlags) {
createComponent(
componentProps,
({ state }) => {
state.diffs.commit = { id: 'SHA123' };
},
{ glFeatures: featureFlags },
);
function setup(componentProps) {
createComponent(componentProps, ({ state }) => {
state.diffs.commit = { id: 'SHA123' };
});
moveSpy = jest.spyOn(wrapper.vm, 'moveToNeighboringCommit').mockImplementation(() => {});
jumpSpy = jest.spyOn(wrapper.vm, 'jumpToFile').mockImplementation(() => {});
......@@ -298,17 +294,17 @@ describe('diffs/components/app', () => {
describe('visible app', () => {
it.each`
key | name | spy | args | featureFlags
${'['} | ${'jumpToFile'} | ${0} | ${[-1]} | ${{}}
${'k'} | ${'jumpToFile'} | ${0} | ${[-1]} | ${{}}
${']'} | ${'jumpToFile'} | ${0} | ${[+1]} | ${{}}
${'j'} | ${'jumpToFile'} | ${0} | ${[+1]} | ${{}}
${'x'} | ${'moveToNeighboringCommit'} | ${1} | ${[{ direction: 'previous' }]} | ${{}}
${'c'} | ${'moveToNeighboringCommit'} | ${1} | ${[{ direction: 'next' }]} | ${{}}
key | name | spy | args
${'['} | ${'jumpToFile'} | ${0} | ${[-1]}
${'k'} | ${'jumpToFile'} | ${0} | ${[-1]}
${']'} | ${'jumpToFile'} | ${0} | ${[+1]}
${'j'} | ${'jumpToFile'} | ${0} | ${[+1]}
${'x'} | ${'moveToNeighboringCommit'} | ${1} | ${[{ direction: 'previous' }]}
${'c'} | ${'moveToNeighboringCommit'} | ${1} | ${[{ direction: 'next' }]}
`(
'calls `$name()` with correct parameters whenever the "$key" key is pressed',
async ({ key, spy, args, featureFlags }) => {
setup({ shouldShow: true }, featureFlags);
async ({ key, spy, args }) => {
setup({ shouldShow: true });
await nextTick();
expect(spies[spy]).not.toHaveBeenCalled();
......
......@@ -37,15 +37,12 @@ describe('diffs/components/commit_item', () => {
const getPrevCommitNavElement = () =>
getCommitNavButtonsElement().find('.btn-group > *:first-child');
const mountComponent = (propsData, featureFlags = {}) => {
const mountComponent = (propsData) => {
wrapper = mount(Component, {
propsData: {
commit,
...propsData,
},
provide: {
glFeatures: featureFlags,
},
stubs: {
CommitPipelineStatus: true,
},
......
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