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