Commit 17984642 authored by Coung Ngo's avatar Coung Ngo

Delete unused fixtures

Delete unused fixtures, which decreases the amount of code
ran during the pipeline
parent f856c8d9
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller do
include JavaScriptFixturesHelpers
let(:admin) { create(:admin) }
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
let(:project) { create(:project, :repository, namespace: namespace, path: 'boards-project') }
render_views
before(:all) do
clean_frontend_fixtures('boards/')
end
before do
sign_in(admin)
end
it 'boards/show.html' do
get(:index, params: {
namespace_id: project.namespace,
project_id: project
})
expect(response).to be_successful
end
end
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Emojis (JavaScript fixtures)', type: :request do
include JavaScriptFixturesHelpers
before(:all) do
clean_frontend_fixtures('emojis/')
end
it 'emojis/emojis.json' do |example|
get '/-/emojis/1/emojis.json'
expect(response).to be_successful
end
end
......@@ -22,7 +22,6 @@ RSpec.describe Projects::JobsController, '(JavaScript fixtures)', type: :control
render_views
before(:all) do
clean_frontend_fixtures('builds/')
clean_frontend_fixtures('jobs/')
end
......@@ -34,16 +33,6 @@ RSpec.describe Projects::JobsController, '(JavaScript fixtures)', type: :control
remove_repository(project)
end
it 'builds/build-with-artifacts.html' do
get :show, params: {
namespace_id: project.namespace.to_param,
project_id: project,
id: build_with_artifacts.to_param
}
expect(response).to be_successful
end
it 'jobs/delayed.json' do
get :show, params: {
namespace_id: project.namespace.to_param,
......
......@@ -25,22 +25,6 @@ RSpec.describe 'Labels (JavaScript fixtures)' do
remove_repository(project)
end
describe Groups::LabelsController, '(JavaScript fixtures)', type: :controller do
render_views
before do
sign_in(admin)
end
it 'labels/group_labels.json' do
get :index, params: {
group_id: group
}, format: 'json'
expect(response).to be_successful
end
end
describe API::Helpers::LabelHelpers, type: :request do
include JavaScriptFixturesHelpers
include ApiHelpers
......
......@@ -75,30 +75,12 @@ RSpec.describe Projects::MergeRequestsController, '(JavaScript fixtures)', type:
render_merge_request(merge_request)
end
it 'merge_requests/merged_merge_request.html' do
expect_next_instance_of(MergeRequest) do |merge_request|
allow(merge_request).to receive(:source_branch_exists?).and_return(true)
allow(merge_request).to receive(:can_remove_source_branch?).and_return(true)
end
render_merge_request(merged_merge_request)
end
it 'merge_requests/diff_comment.html' do
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
create(:note_on_merge_request, author: admin, project: project, noteable: merge_request)
render_merge_request(merge_request)
end
it 'merge_requests/merge_request_with_comment.html' do
create(:note_on_merge_request, author: admin, project: project, noteable: merge_request, note: '- [ ] Task List Item')
render_merge_request(merge_request)
end
it 'merge_requests/discussions.json' do
create(:discussion_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
render_discussions_json(merge_request)
end
it 'merge_requests/diff_discussion.json' do
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
render_discussions_json(merge_request)
......
......@@ -40,18 +40,6 @@ RSpec.describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)'
render_merge_request(merge_request, commit_id: project.commit.sha)
end
it 'merge_request_diffs/inline_changes_tab_with_comments.json' do
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
create(:note_on_merge_request, author: admin, project: project, noteable: merge_request)
render_merge_request(merge_request)
end
it 'merge_request_diffs/parallel_changes_tab_with_comments.json' do
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
create(:note_on_merge_request, author: admin, project: project, noteable: merge_request)
render_merge_request(merge_request, view: 'parallel')
end
private
def render_merge_request(merge_request, view: 'inline', **extra_params)
......
......@@ -30,15 +30,6 @@ RSpec.describe 'Projects (JavaScript fixtures)', type: :controller do
end
describe ProjectsController, '(JavaScript fixtures)', type: :controller do
it 'projects/dashboard.html' do
get :show, params: {
namespace_id: project.namespace.to_param,
id: project
}
expect(response).to be_successful
end
it 'projects/overview.html' do
get :show, params: {
namespace_id: project_with_repo.namespace.to_param,
......
......@@ -10,7 +10,6 @@ RSpec.describe 'Raw files', '(JavaScript fixtures)' do
let(:response) { @blob.data.force_encoding('UTF-8') }
before(:all) do
clean_frontend_fixtures('blob/balsamiq/')
clean_frontend_fixtures('blob/notebook/')
clean_frontend_fixtures('blob/pdf/')
clean_frontend_fixtures('blob/text/')
......@@ -22,10 +21,6 @@ RSpec.describe 'Raw files', '(JavaScript fixtures)' do
remove_repository(project)
end
it 'blob/balsamiq/test.bmpr' do
@blob = project.repository.blob_at('b89b56d79', 'files/images/balsamiq.bmpr')
end
it 'blob/notebook/basic.json' do
@blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb')
end
......
<div class="file-content balsamiq-viewer" data-endpoint="/test" id="js-balsamiq-viewer"></div>
<table>
<thead>
<tr>
<th>Environment</th>
<th>Last deployment</th>
<th>Job</th>
<th>Commit</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr id="environment-row"></tr>
</tbody>
</table>
<form action="/user/project/issues?scope=all&amp;state=closed" class="js-filter-form">
<input id="utf8" name="utf8" value="✓">
<input id="check-all-issues" name="check-all-issues">
<input id="search" name="search">
<input id="author_id" name="author_id">
<input id="assignee_id" name="assignee_id">
<input id="milestone_title" name="milestone_title">
<input id="label_name" name="label_name">
</form>
<a class="btn-close"></a>
<div class="detail-page-description">
<div class="description js-task-list-container">
<div class="md">
<ul class="task-list">
<li class="task-list-item">
<input class="task-list-item-checkbox" type="checkbox">
Task List Item
</li>
</ul>
<textarea class="js-task-list-field">- [ ] Task List Item</textarea>
</div>
</div>
</div>
<form action="/foo" class="js-issuable-update"></form>
<div>
<div data-can-create-pipeline="true" data-ci-lint-path="foo" data-empty-state-svg-path="foo" data-endpoint="foo" data-error-state-svg-path="foo" data-has-ci="foo" data-help-auto-devops-path="foo" data-help-page-path="foo" data-new-pipeline-path="foo" data-reset-cache-path="foo" id="pipelines-list-vue"></div>
</div>
......@@ -38,7 +38,7 @@ describe('MergeRequest', () => {
.dispatchEvent(changeEvent);
setImmediate(() => {
expect($('.js-task-list-field').val()).toBe(
'- [x] Task List Item\n- [ ] \n- [ ] Task List Item 2\n',
'- [x] Task List Item\n- [ ]\n- [ ] Task List Item 2\n',
);
done();
});
......@@ -55,7 +55,7 @@ describe('MergeRequest', () => {
.dispatchEvent(changeEvent);
setImmediate(() => {
expect($('.js-task-list-field').val()).toBe(
'- [ ] Task List Item\n- [ ] \n- [x] Task List Item 2\n',
'- [ ] Task List Item\n- [ ]\n- [x] Task List Item 2\n',
);
done();
});
......@@ -78,7 +78,7 @@ describe('MergeRequest', () => {
`${TEST_HOST}/frontend-fixtures/merge-requests-project/-/merge_requests/1.json`,
{
merge_request: {
description: '- [ ] Task List Item\n- [ ] \n- [ ] Task List Item 2\n',
description: '- [ ] Task List Item\n- [ ]\n- [ ] Task List Item 2\n',
lock_version: 0,
update_task: { line_number: lineNumber, line_source: lineSource, index, checked },
},
......
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