Commit 575006f8 authored by Coung Ngo's avatar Coung Ngo Committed by Enrique Alcántara

Change fixture from issue to merge request index

When the `vue_issues_list` feature flag defaults to true,
the frontend tests using the issues index fixture will
no longer work. This commit changes the tests to use
a merge request index fixture instead so it will
continue to work.
parent 670246a2
...@@ -74,7 +74,7 @@ describe('Dropdown User', () => { ...@@ -74,7 +74,7 @@ describe('Dropdown User', () => {
}); });
describe('hideCurrentUser', () => { describe('hideCurrentUser', () => {
const fixtureTemplate = 'issues/issue_list.html'; const fixtureTemplate = 'merge_requests/merge_request_list.html';
let dropdown; let dropdown;
let authorFilterDropdownElement; let authorFilterDropdownElement;
......
...@@ -4,7 +4,7 @@ import FilteredSearchDropdownManager from '~/filtered_search/filtered_search_dro ...@@ -4,7 +4,7 @@ import FilteredSearchDropdownManager from '~/filtered_search/filtered_search_dro
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
describe('Dropdown Utils', () => { describe('Dropdown Utils', () => {
const issueListFixture = 'issues/issue_list.html'; const issuableListFixture = 'merge_requests/merge_request_list.html';
describe('getEscapedText', () => { describe('getEscapedText', () => {
it('should return same word when it has no space', () => { it('should return same word when it has no space', () => {
...@@ -350,7 +350,7 @@ describe('Dropdown Utils', () => { ...@@ -350,7 +350,7 @@ describe('Dropdown Utils', () => {
let authorToken; let authorToken;
beforeEach(() => { beforeEach(() => {
loadFixtures(issueListFixture); loadFixtures(issuableListFixture);
authorToken = FilteredSearchSpecHelper.createFilterVisualToken('author', '=', '@user'); authorToken = FilteredSearchSpecHelper.createFilterVisualToken('author', '=', '@user');
const searchTermToken = FilteredSearchSpecHelper.createSearchVisualToken('search term'); const searchTermToken = FilteredSearchSpecHelper.createSearchVisualToken('search term');
......
...@@ -37,17 +37,6 @@ RSpec.describe Projects::IssuesController, '(JavaScript fixtures)', type: :contr ...@@ -37,17 +37,6 @@ RSpec.describe Projects::IssuesController, '(JavaScript fixtures)', type: :contr
render_issue(create(:closed_issue, project: project)) render_issue(create(:closed_issue, project: project))
end end
it 'issues/issue_list.html' do
create(:issue, project: project)
get :index, params: {
namespace_id: project.namespace.to_param,
project_id: project
}
expect(response).to be_successful
end
private private
def render_issue(issue) def render_issue(issue)
......
...@@ -119,6 +119,17 @@ RSpec.describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: ...@@ -119,6 +119,17 @@ RSpec.describe Projects::MergeRequestsController, '(JavaScript fixtures)', type:
end end
end end
it 'merge_requests/merge_request_list.html' do
create(:merge_request, source_project: project, target_project: project)
get :index, params: {
namespace_id: project.namespace.to_param,
project_id: project
}
expect(response).to be_successful
end
private private
def render_discussions_json(merge_request) def render_discussions_json(merge_request)
......
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