Commit 727307a8 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'ps-poc-search-general-settings-follow-up' into 'master'

Follow-up for "POC: Search general settings"

See merge request gitlab-org/gitlab!51111
parents 3bceb45a f3e7ee16
......@@ -34,7 +34,6 @@ class ProjectsController < Projects::ApplicationController
before_action only: [:edit] do
push_frontend_feature_flag(:approval_suggestions, @project, default_enabled: true)
push_frontend_feature_flag(:allow_editing_commit_messages, @project)
push_frontend_feature_flag(:search_settings_in_page, @project, default_enabled: false)
end
layout :determine_layout
......
import waitForPromises from 'helpers/wait_for_promises';
import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
import initSearch from '~/search_settings';
import mountSearchSettings from '~/pages/projects/edit/mount_search_settings';
......@@ -7,24 +6,19 @@ jest.mock('~/search_settings');
describe('pages/projects/edit/mount_search_settings', () => {
afterEach(() => {
initSearch.mockReset();
resetHTMLFixture();
});
it('initializes search settings when js-search-settings-app is available', async () => {
setHTMLFixture('<div class="js-search-settings-app"></div>');
mountSearchSettings();
await waitForPromises();
await mountSearchSettings();
expect(initSearch).toHaveBeenCalled();
});
it('does not initialize search settings when js-search-settings-app is unavailable', async () => {
mountSearchSettings();
await waitForPromises();
await mountSearchSettings();
expect(initSearch).not.toHaveBeenCalled();
});
......
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