Commit 14fcf085 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'revert-79a45f7f' into 'master'

Revert "Merge branch 'winh-remove-sushi' into 'master'"

See merge request gitlab-org/gitlab-ce!26470
parents 322c14be 02296876
...@@ -9,6 +9,9 @@ plugins: ...@@ -9,6 +9,9 @@ plugins:
- import - import
- html - html
settings: settings:
html/html-extensions:
- '.html'
- '.html.raw'
import/resolver: import/resolver:
webpack: webpack:
config: './config/webpack.config.js' config: './config/webpack.config.js'
......
...@@ -110,7 +110,7 @@ module.exports = function(config) { ...@@ -110,7 +110,7 @@ module.exports = function(config) {
frameworks: ['jasmine'], frameworks: ['jasmine'],
files: [ files: [
{ pattern: 'spec/javascripts/test_bundle.js', watched: false }, { pattern: 'spec/javascripts/test_bundle.js', watched: false },
{ pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.png)', included: false }, { pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw|.png)', included: false },
], ],
preprocessors: { preprocessors: {
'spec/javascripts/**/*.js': ['webpack', 'sourcemap'], 'spec/javascripts/**/*.js': ['webpack', 'sourcemap'],
......
...@@ -7,7 +7,7 @@ import Pager from '~/pager'; ...@@ -7,7 +7,7 @@ import Pager from '~/pager';
describe('Activities', () => { describe('Activities', () => {
window.gon || (window.gon = {}); window.gon || (window.gon = {});
const fixtureTemplate = 'static/event_filter.html'; const fixtureTemplate = 'static/event_filter.html.raw';
const filters = [ const filters = [
{ {
id: 'all', id: 'all',
......
...@@ -2,7 +2,7 @@ import $ from 'jquery'; ...@@ -2,7 +2,7 @@ import $ from 'jquery';
import AjaxLoadingSpinner from '~/ajax_loading_spinner'; import AjaxLoadingSpinner from '~/ajax_loading_spinner';
describe('Ajax Loading Spinner', () => { describe('Ajax Loading Spinner', () => {
const fixtureTemplate = 'static/ajax_loading_spinner.html'; const fixtureTemplate = 'static/ajax_loading_spinner.html.raw';
preloadFixtures(fixtureTemplate); preloadFixtures(fixtureTemplate);
beforeEach(() => { beforeEach(() => {
......
...@@ -24,13 +24,13 @@ const lazyAssert = function(done, assertFn) { ...@@ -24,13 +24,13 @@ const lazyAssert = function(done, assertFn) {
describe('AwardsHandler', function() { describe('AwardsHandler', function() {
const emojiData = getJSONFixture('emojis/emojis.json'); const emojiData = getJSONFixture('emojis/emojis.json');
preloadFixtures('snippets/show.html'); preloadFixtures('snippets/show.html.raw');
beforeEach(function(done) { beforeEach(function(done) {
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
mock.onGet(`/-/emojis/${EMOJI_VERSION}/emojis.json`).reply(200, emojiData); mock.onGet(`/-/emojis/${EMOJI_VERSION}/emojis.json`).reply(200, emojiData);
loadFixtures('snippets/show.html'); loadFixtures('snippets/show.html.raw');
loadAwardsHandler(true) loadAwardsHandler(true)
.then(obj => { .then(obj => {
awardsHandler = obj; awardsHandler = obj;
......
...@@ -4,10 +4,10 @@ import '~/behaviors/quick_submit'; ...@@ -4,10 +4,10 @@ import '~/behaviors/quick_submit';
describe('Quick Submit behavior', function() { describe('Quick Submit behavior', function() {
const keydownEvent = (options = { keyCode: 13, metaKey: true }) => $.Event('keydown', options); const keydownEvent = (options = { keyCode: 13, metaKey: true }) => $.Event('keydown', options);
preloadFixtures('snippets/show.html'); preloadFixtures('snippets/show.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('snippets/show.html'); loadFixtures('snippets/show.html.raw');
$('form').submit(e => { $('form').submit(e => {
// Prevent a form submit from moving us off the testing page // Prevent a form submit from moving us off the testing page
e.preventDefault(); e.preventDefault();
......
...@@ -3,10 +3,10 @@ import '~/behaviors/requires_input'; ...@@ -3,10 +3,10 @@ import '~/behaviors/requires_input';
describe('requiresInput', () => { describe('requiresInput', () => {
let submitButton; let submitButton;
preloadFixtures('branches/new_branch.html'); preloadFixtures('branches/new_branch.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('branches/new_branch.html'); loadFixtures('branches/new_branch.html.raw');
submitButton = $('button[type="submit"]'); submitButton = $('button[type="submit"]');
}); });
......
...@@ -9,7 +9,7 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable'; ...@@ -9,7 +9,7 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable';
const FORM_SELECTOR = '.js-main-target-form .js-vue-comment-form'; const FORM_SELECTOR = '.js-main-target-form .js-vue-comment-form';
describe('ShortcutsIssuable', function() { describe('ShortcutsIssuable', function() {
const fixtureName = 'snippets/show.html'; const fixtureName = 'snippets/show.html.raw';
preloadFixtures(fixtureName); preloadFixtures(fixtureName);
beforeAll(done => { beforeAll(done => {
......
...@@ -6,10 +6,10 @@ describe('Balsamiq integration spec', () => { ...@@ -6,10 +6,10 @@ describe('Balsamiq integration spec', () => {
let endpoint; let endpoint;
let balsamiqViewer; let balsamiqViewer;
preloadFixtures('static/balsamiq_viewer.html'); preloadFixtures('static/balsamiq_viewer.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('static/balsamiq_viewer.html'); loadFixtures('static/balsamiq_viewer.html.raw');
container = document.getElementById('js-balsamiq-viewer'); container = document.getElementById('js-balsamiq-viewer');
balsamiqViewer = new BalsamiqViewer(container); balsamiqViewer = new BalsamiqViewer(container);
......
...@@ -2,10 +2,10 @@ import $ from 'jquery'; ...@@ -2,10 +2,10 @@ import $ from 'jquery';
import BlobFileDropzone from '~/blob/blob_file_dropzone'; import BlobFileDropzone from '~/blob/blob_file_dropzone';
describe('BlobFileDropzone', function() { describe('BlobFileDropzone', function() {
preloadFixtures('blob/show.html'); preloadFixtures('blob/show.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('blob/show.html'); loadFixtures('blob/show.html.raw');
const form = $('.js-upload-blob-form'); const form = $('.js-upload-blob-form');
this.blobFileDropzone = new BlobFileDropzone(form, 'POST'); this.blobFileDropzone = new BlobFileDropzone(form, 'POST');
this.dropzone = $('.js-upload-blob-form .dropzone').get(0).dropzone; this.dropzone = $('.js-upload-blob-form .dropzone').get(0).dropzone;
......
...@@ -3,10 +3,10 @@ import axios from '~/lib/utils/axios_utils'; ...@@ -3,10 +3,10 @@ import axios from '~/lib/utils/axios_utils';
import renderNotebook from '~/blob/notebook'; import renderNotebook from '~/blob/notebook';
describe('iPython notebook renderer', () => { describe('iPython notebook renderer', () => {
preloadFixtures('static/notebook_viewer.html'); preloadFixtures('static/notebook_viewer.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('static/notebook_viewer.html'); loadFixtures('static/notebook_viewer.html.raw');
}); });
it('shows loading icon', () => { it('shows loading icon', () => {
......
...@@ -15,10 +15,10 @@ describe('PDF renderer', () => { ...@@ -15,10 +15,10 @@ describe('PDF renderer', () => {
} }
}; };
preloadFixtures('static/pdf_viewer.html'); preloadFixtures('static/pdf_viewer.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('static/pdf_viewer.html'); loadFixtures('static/pdf_viewer.html.raw');
viewer = document.getElementById('js-pdf-viewer'); viewer = document.getElementById('js-pdf-viewer');
viewer.dataset.endpoint = testPDF; viewer.dataset.endpoint = testPDF;
}); });
......
...@@ -13,10 +13,10 @@ describe('Sketch viewer', () => { ...@@ -13,10 +13,10 @@ describe('Sketch viewer', () => {
}); });
}; };
preloadFixtures('static/sketch_viewer.html'); preloadFixtures('static/sketch_viewer.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('static/sketch_viewer.html'); loadFixtures('static/sketch_viewer.html.raw');
}); });
describe('with error message', () => { describe('with error message', () => {
......
...@@ -9,12 +9,12 @@ describe('Blob viewer', () => { ...@@ -9,12 +9,12 @@ describe('Blob viewer', () => {
let blob; let blob;
let mock; let mock;
preloadFixtures('snippets/show.html'); preloadFixtures('snippets/show.html.raw');
beforeEach(() => { beforeEach(() => {
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
loadFixtures('snippets/show.html'); loadFixtures('snippets/show.html.raw');
$('#modal-upload-blob').remove(); $('#modal-upload-blob').remove();
blob = new BlobViewer(); blob = new BlobViewer();
......
...@@ -9,7 +9,7 @@ describe('Board component', () => { ...@@ -9,7 +9,7 @@ describe('Board component', () => {
let el; let el;
beforeEach(done => { beforeEach(done => {
loadFixtures('boards/show.html'); loadFixtures('boards/show.html.raw');
el = document.createElement('div'); el = document.createElement('div');
document.body.appendChild(el); document.body.appendChild(el);
......
import LinkedTabs from '~/lib/utils/bootstrap_linked_tabs'; import LinkedTabs from '~/lib/utils/bootstrap_linked_tabs';
describe('Linked Tabs', () => { describe('Linked Tabs', () => {
preloadFixtures('static/linked_tabs.html'); preloadFixtures('static/linked_tabs.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('static/linked_tabs.html'); loadFixtures('static/linked_tabs.html.raw');
}); });
describe('when is initialized', () => { describe('when is initialized', () => {
......
...@@ -7,8 +7,8 @@ const VARIABLE_PATCH_ENDPOINT = 'http://test.host/frontend-fixtures/builds-proje ...@@ -7,8 +7,8 @@ const VARIABLE_PATCH_ENDPOINT = 'http://test.host/frontend-fixtures/builds-proje
const HIDE_CLASS = 'hide'; const HIDE_CLASS = 'hide';
describe('AjaxFormVariableList', () => { describe('AjaxFormVariableList', () => {
preloadFixtures('projects/ci_cd_settings.html'); preloadFixtures('projects/ci_cd_settings.html.raw');
preloadFixtures('projects/ci_cd_settings_with_variables.html'); preloadFixtures('projects/ci_cd_settings_with_variables.html.raw');
let container; let container;
let saveButton; let saveButton;
...@@ -18,7 +18,7 @@ describe('AjaxFormVariableList', () => { ...@@ -18,7 +18,7 @@ describe('AjaxFormVariableList', () => {
let ajaxVariableList; let ajaxVariableList;
beforeEach(() => { beforeEach(() => {
loadFixtures('projects/ci_cd_settings.html'); loadFixtures('projects/ci_cd_settings.html.raw');
container = document.querySelector('.js-ci-variable-list-section'); container = document.querySelector('.js-ci-variable-list-section');
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
...@@ -168,7 +168,7 @@ describe('AjaxFormVariableList', () => { ...@@ -168,7 +168,7 @@ describe('AjaxFormVariableList', () => {
describe('updateRowsWithPersistedVariables', () => { describe('updateRowsWithPersistedVariables', () => {
beforeEach(() => { beforeEach(() => {
loadFixtures('projects/ci_cd_settings_with_variables.html'); loadFixtures('projects/ci_cd_settings_with_variables.html.raw');
container = document.querySelector('.js-ci-variable-list-section'); container = document.querySelector('.js-ci-variable-list-section');
const ajaxVariableListEl = document.querySelector('.js-ci-variable-list-section'); const ajaxVariableListEl = document.querySelector('.js-ci-variable-list-section');
......
...@@ -5,9 +5,9 @@ import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper'; ...@@ -5,9 +5,9 @@ import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper';
const HIDE_CLASS = 'hide'; const HIDE_CLASS = 'hide';
describe('VariableList', () => { describe('VariableList', () => {
preloadFixtures('pipeline_schedules/edit.html'); preloadFixtures('pipeline_schedules/edit.html.raw');
preloadFixtures('pipeline_schedules/edit_with_variables.html'); preloadFixtures('pipeline_schedules/edit_with_variables.html.raw');
preloadFixtures('projects/ci_cd_settings.html'); preloadFixtures('projects/ci_cd_settings.html.raw');
let $wrapper; let $wrapper;
let variableList; let variableList;
...@@ -15,7 +15,7 @@ describe('VariableList', () => { ...@@ -15,7 +15,7 @@ describe('VariableList', () => {
describe('with only key/value inputs', () => { describe('with only key/value inputs', () => {
describe('with no variables', () => { describe('with no variables', () => {
beforeEach(() => { beforeEach(() => {
loadFixtures('pipeline_schedules/edit.html'); loadFixtures('pipeline_schedules/edit.html.raw');
$wrapper = $('.js-ci-variable-list-section'); $wrapper = $('.js-ci-variable-list-section');
variableList = new VariableList({ variableList = new VariableList({
...@@ -82,7 +82,7 @@ describe('VariableList', () => { ...@@ -82,7 +82,7 @@ describe('VariableList', () => {
describe('with persisted variables', () => { describe('with persisted variables', () => {
beforeEach(() => { beforeEach(() => {
loadFixtures('pipeline_schedules/edit_with_variables.html'); loadFixtures('pipeline_schedules/edit_with_variables.html.raw');
$wrapper = $('.js-ci-variable-list-section'); $wrapper = $('.js-ci-variable-list-section');
variableList = new VariableList({ variableList = new VariableList({
...@@ -115,7 +115,7 @@ describe('VariableList', () => { ...@@ -115,7 +115,7 @@ describe('VariableList', () => {
describe('with all inputs(key, value, protected)', () => { describe('with all inputs(key, value, protected)', () => {
beforeEach(() => { beforeEach(() => {
loadFixtures('projects/ci_cd_settings.html'); loadFixtures('projects/ci_cd_settings.html.raw');
$wrapper = $('.js-ci-variable-list-section'); $wrapper = $('.js-ci-variable-list-section');
$wrapper.find('.js-ci-variable-input-protected').attr('data-default', 'false'); $wrapper.find('.js-ci-variable-input-protected').attr('data-default', 'false');
...@@ -149,7 +149,7 @@ describe('VariableList', () => { ...@@ -149,7 +149,7 @@ describe('VariableList', () => {
describe('toggleEnableRow method', () => { describe('toggleEnableRow method', () => {
beforeEach(() => { beforeEach(() => {
loadFixtures('pipeline_schedules/edit_with_variables.html'); loadFixtures('pipeline_schedules/edit_with_variables.html.raw');
$wrapper = $('.js-ci-variable-list-section'); $wrapper = $('.js-ci-variable-list-section');
variableList = new VariableList({ variableList = new VariableList({
...@@ -198,7 +198,7 @@ describe('VariableList', () => { ...@@ -198,7 +198,7 @@ describe('VariableList', () => {
describe('hideValues', () => { describe('hideValues', () => {
beforeEach(() => { beforeEach(() => {
loadFixtures('projects/ci_cd_settings.html'); loadFixtures('projects/ci_cd_settings.html.raw');
$wrapper = $('.js-ci-variable-list-section'); $wrapper = $('.js-ci-variable-list-section');
variableList = new VariableList({ variableList = new VariableList({
......
...@@ -2,12 +2,12 @@ import $ from 'jquery'; ...@@ -2,12 +2,12 @@ import $ from 'jquery';
import setupNativeFormVariableList from '~/ci_variable_list/native_form_variable_list'; import setupNativeFormVariableList from '~/ci_variable_list/native_form_variable_list';
describe('NativeFormVariableList', () => { describe('NativeFormVariableList', () => {
preloadFixtures('pipeline_schedules/edit.html'); preloadFixtures('pipeline_schedules/edit.html.raw');
let $wrapper; let $wrapper;
beforeEach(() => { beforeEach(() => {
loadFixtures('pipeline_schedules/edit.html'); loadFixtures('pipeline_schedules/edit.html.raw');
$wrapper = $('.js-ci-variable-list-section'); $wrapper = $('.js-ci-variable-list-section');
setupNativeFormVariableList({ setupNativeFormVariableList({
......
...@@ -9,10 +9,10 @@ import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper'; ...@@ -9,10 +9,10 @@ import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper';
describe('Clusters', () => { describe('Clusters', () => {
let cluster; let cluster;
preloadFixtures('clusters/show_cluster.html'); preloadFixtures('clusters/show_cluster.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('clusters/show_cluster.html'); loadFixtures('clusters/show_cluster.html.raw');
cluster = new Clusters(); cluster = new Clusters();
}); });
......
...@@ -6,7 +6,7 @@ import Sidebar from '~/right_sidebar'; ...@@ -6,7 +6,7 @@ import Sidebar from '~/right_sidebar';
import timeoutPromise from './helpers/set_timeout_promise_helper'; import timeoutPromise from './helpers/set_timeout_promise_helper';
describe('Issuable right sidebar collapsed todo toggle', () => { describe('Issuable right sidebar collapsed todo toggle', () => {
const fixtureName = 'issues/open-issue.html'; const fixtureName = 'issues/open-issue.html.raw';
const jsonFixtureName = 'todos/todos.json'; const jsonFixtureName = 'todos/todos.json';
let mock; let mock;
......
...@@ -20,7 +20,7 @@ const DROPDOWN_ITEM_DATA = [ ...@@ -20,7 +20,7 @@ const DROPDOWN_ITEM_DATA = [
]; ];
describe('CreateItemDropdown', () => { describe('CreateItemDropdown', () => {
preloadFixtures('static/create_item_dropdown.html'); preloadFixtures('static/create_item_dropdown.html.raw');
let $wrapperEl; let $wrapperEl;
let createItemDropdown; let createItemDropdown;
...@@ -44,7 +44,7 @@ describe('CreateItemDropdown', () => { ...@@ -44,7 +44,7 @@ describe('CreateItemDropdown', () => {
} }
beforeEach(() => { beforeEach(() => {
loadFixtures('static/create_item_dropdown.html'); loadFixtures('static/create_item_dropdown.html.raw');
$wrapperEl = $('.js-create-item-dropdown-fixture-root'); $wrapperEl = $('.js-create-item-dropdown-fixture-root');
}); });
......
...@@ -72,7 +72,7 @@ describe('Dropdown User', () => { ...@@ -72,7 +72,7 @@ describe('Dropdown User', () => {
}); });
describe('hideCurrentUser', () => { describe('hideCurrentUser', () => {
const fixtureTemplate = 'issues/issue_list.html'; const fixtureTemplate = 'issues/issue_list.html.raw';
preloadFixtures(fixtureTemplate); preloadFixtures(fixtureTemplate);
let dropdown; let dropdown;
......
...@@ -4,7 +4,7 @@ import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered ...@@ -4,7 +4,7 @@ import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered
import FilteredSearchSpecHelper from '../helpers/filtered_search_spec_helper'; import FilteredSearchSpecHelper from '../helpers/filtered_search_spec_helper';
describe('Dropdown Utils', () => { describe('Dropdown Utils', () => {
const issueListFixture = 'issues/issue_list.html'; const issueListFixture = 'issues/issue_list.html.raw';
preloadFixtures(issueListFixture); preloadFixtures(issueListFixture);
describe('getEscapedText', () => { describe('getEscapedText', () => {
......
*.html.raw *.html.raw
*.html
*.json *.json
...@@ -18,7 +18,7 @@ describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controll ...@@ -18,7 +18,7 @@ describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controll
sign_in(admin) sign_in(admin)
end end
it 'abuse_reports/abuse_reports_list.html' do |example| it 'abuse_reports/abuse_reports_list.html.raw' do |example|
get :index get :index
expect(response).to be_success expect(response).to be_success
......
...@@ -17,7 +17,7 @@ describe Admin::UsersController, '(JavaScript fixtures)', type: :controller do ...@@ -17,7 +17,7 @@ describe Admin::UsersController, '(JavaScript fixtures)', type: :controller do
clean_frontend_fixtures('admin/users') clean_frontend_fixtures('admin/users')
end end
it 'admin/users/new_with_internal_user_regex.html' do |example| it 'admin/users/new_with_internal_user_regex.html.raw' do |example|
stub_application_setting(user_default_external: true) stub_application_setting(user_default_external: true)
stub_application_setting(user_default_internal_regex: '^(?:(?!\.ext@).)*$\r?') stub_application_setting(user_default_internal_regex: '^(?:(?!\.ext@).)*$\r?')
......
...@@ -23,7 +23,7 @@ describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', type: :c ...@@ -23,7 +23,7 @@ describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', type: :c
remove_repository(project) remove_repository(project)
end end
it 'application_settings/accounts_and_limit.html' do |example| it 'application_settings/accounts_and_limit.html.raw' do |example|
stub_application_setting(user_default_external: false) stub_application_setting(user_default_external: false)
get :show get :show
......
...@@ -22,7 +22,7 @@ describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do ...@@ -22,7 +22,7 @@ describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do
remove_repository(project) remove_repository(project)
end end
it 'blob/show.html' do |example| it 'blob/show.html.raw' do |example|
get(:show, params: { get(:show, params: {
namespace_id: project.namespace, namespace_id: project.namespace,
project_id: project, project_id: project,
......
...@@ -17,7 +17,7 @@ describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller ...@@ -17,7 +17,7 @@ describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller
sign_in(admin) sign_in(admin)
end end
it 'boards/show.html' do |example| it 'boards/show.html.raw' do |example|
get(:index, params: { get(:index, params: {
namespace_id: project.namespace, namespace_id: project.namespace,
project_id: project project_id: project
......
...@@ -21,7 +21,7 @@ describe Projects::BranchesController, '(JavaScript fixtures)', type: :controlle ...@@ -21,7 +21,7 @@ describe Projects::BranchesController, '(JavaScript fixtures)', type: :controlle
remove_repository(project) remove_repository(project)
end end
it 'branches/new_branch.html' do |example| it 'branches/new_branch.html.raw' do |example|
get :new, params: { get :new, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project project_id: project
......
...@@ -22,7 +22,7 @@ describe Projects::ClustersController, '(JavaScript fixtures)', type: :controlle ...@@ -22,7 +22,7 @@ describe Projects::ClustersController, '(JavaScript fixtures)', type: :controlle
remove_repository(project) remove_repository(project)
end end
it 'clusters/show_cluster.html' do |example| it 'clusters/show_cluster.html.raw' do |example|
get :show, params: { get :show, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
......
...@@ -19,7 +19,7 @@ describe Projects::CommitController, '(JavaScript fixtures)', type: :controller ...@@ -19,7 +19,7 @@ describe Projects::CommitController, '(JavaScript fixtures)', type: :controller
allow(SecureRandom).to receive(:hex).and_return('securerandomhex:thereisnospoon') allow(SecureRandom).to receive(:hex).and_return('securerandomhex:thereisnospoon')
end end
it 'commit/show.html' do |example| it 'commit/show.html.raw' do |example|
params = { params = {
namespace_id: project.namespace, namespace_id: project.namespace,
project_id: project, project_id: project,
......
...@@ -18,7 +18,7 @@ describe 'Groups (JavaScript fixtures)', type: :controller do ...@@ -18,7 +18,7 @@ describe 'Groups (JavaScript fixtures)', type: :controller do
end end
describe GroupsController, '(JavaScript fixtures)', type: :controller do describe GroupsController, '(JavaScript fixtures)', type: :controller do
it 'groups/edit.html' do |example| it 'groups/edit.html.raw' do |example|
get :edit, params: { id: group } get :edit, params: { id: group }
expect(response).to be_success expect(response).to be_success
...@@ -27,7 +27,7 @@ describe 'Groups (JavaScript fixtures)', type: :controller do ...@@ -27,7 +27,7 @@ describe 'Groups (JavaScript fixtures)', type: :controller do
end end
describe Groups::Settings::CiCdController, '(JavaScript fixtures)', type: :controller do describe Groups::Settings::CiCdController, '(JavaScript fixtures)', type: :controller do
it 'groups/ci_cd_settings.html' do |example| it 'groups/ci_cd_settings.html.raw' do |example|
get :show, params: { group_id: group } get :show, params: { group_id: group }
expect(response).to be_success expect(response).to be_success
......
...@@ -21,26 +21,26 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller ...@@ -21,26 +21,26 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller
remove_repository(project) remove_repository(project)
end end
it 'issues/open-issue.html' do |example| it 'issues/open-issue.html.raw' do |example|
render_issue(example.description, create(:issue, project: project)) render_issue(example.description, create(:issue, project: project))
end end
it 'issues/closed-issue.html' do |example| it 'issues/closed-issue.html.raw' do |example|
render_issue(example.description, create(:closed_issue, project: project)) render_issue(example.description, create(:closed_issue, project: project))
end end
it 'issues/issue-with-task-list.html' do |example| it 'issues/issue-with-task-list.html.raw' do |example|
issue = create(:issue, project: project, description: '- [ ] Task List Item') issue = create(:issue, project: project, description: '- [ ] Task List Item')
render_issue(example.description, issue) render_issue(example.description, issue)
end end
it 'issues/issue_with_comment.html' do |example| it 'issues/issue_with_comment.html.raw' do |example|
issue = create(:issue, project: project) issue = create(:issue, project: project)
create(:note, project: project, noteable: issue, note: '- [ ] Task List Item').save create(:note, project: project, noteable: issue, note: '- [ ] Task List Item').save
render_issue(example.description, issue) render_issue(example.description, issue)
end end
it 'issues/issue_list.html' do |example| it 'issues/issue_list.html.raw' do |example|
create(:issue, project: project) create(:issue, project: project)
get :index, params: { get :index, params: {
......
...@@ -32,7 +32,7 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do ...@@ -32,7 +32,7 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do
remove_repository(project) remove_repository(project)
end end
it 'builds/build-with-artifacts.html' do |example| it 'builds/build-with-artifacts.html.raw' do |example|
get :show, params: { get :show, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
......
...@@ -42,19 +42,19 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont ...@@ -42,19 +42,19 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont
remove_repository(project) remove_repository(project)
end end
it 'merge_requests/merge_request_of_current_user.html' do |example| it 'merge_requests/merge_request_of_current_user.html.raw' do |example|
merge_request.update(author: admin) merge_request.update(author: admin)
render_merge_request(example.description, merge_request) render_merge_request(example.description, merge_request)
end end
it 'merge_requests/merge_request_with_task_list.html' do |example| it 'merge_requests/merge_request_with_task_list.html.raw' do |example|
create(:ci_build, :pending, pipeline: pipeline) create(:ci_build, :pending, pipeline: pipeline)
render_merge_request(example.description, merge_request) render_merge_request(example.description, merge_request)
end end
it 'merge_requests/merged_merge_request.html' do |example| it 'merge_requests/merged_merge_request.html.raw' do |example|
expect_next_instance_of(MergeRequest) do |merge_request| expect_next_instance_of(MergeRequest) do |merge_request|
allow(merge_request).to receive(:source_branch_exists?).and_return(true) allow(merge_request).to receive(:source_branch_exists?).and_return(true)
allow(merge_request).to receive(:can_remove_source_branch?).and_return(true) allow(merge_request).to receive(:can_remove_source_branch?).and_return(true)
...@@ -62,13 +62,13 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont ...@@ -62,13 +62,13 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont
render_merge_request(example.description, merged_merge_request) render_merge_request(example.description, merged_merge_request)
end end
it 'merge_requests/diff_comment.html' do |example| it 'merge_requests/diff_comment.html.raw' do |example|
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request) 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) create(:note_on_merge_request, author: admin, project: project, noteable: merge_request)
render_merge_request(example.description, merge_request) render_merge_request(example.description, merge_request)
end end
it 'merge_requests/merge_request_with_comment.html' do |example| it 'merge_requests/merge_request_with_comment.html.raw' do |example|
create(:note_on_merge_request, author: admin, project: project, noteable: merge_request, note: '- [ ] Task List Item') create(:note_on_merge_request, author: admin, project: project, noteable: merge_request, note: '- [ ] Task List Item')
render_merge_request(example.description, merge_request) render_merge_request(example.description, merge_request)
end end
......
...@@ -21,7 +21,7 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: : ...@@ -21,7 +21,7 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :
sign_in(admin) sign_in(admin)
end end
it 'pipeline_schedules/edit.html' do |example| it 'pipeline_schedules/edit.html.raw' do |example|
get :edit, params: { get :edit, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
...@@ -32,7 +32,7 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: : ...@@ -32,7 +32,7 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :
store_frontend_fixture(response, example.description) store_frontend_fixture(response, example.description)
end end
it 'pipeline_schedules/edit_with_variables.html' do |example| it 'pipeline_schedules/edit_with_variables.html.raw' do |example|
get :edit, params: { get :edit, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
......
...@@ -28,7 +28,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -28,7 +28,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
end end
describe ProjectsController, '(JavaScript fixtures)', type: :controller do describe ProjectsController, '(JavaScript fixtures)', type: :controller do
it 'projects/dashboard.html' do |example| it 'projects/dashboard.html.raw' do |example|
get :show, params: { get :show, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
id: project id: project
...@@ -38,7 +38,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -38,7 +38,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
store_frontend_fixture(response, example.description) store_frontend_fixture(response, example.description)
end end
it 'projects/overview.html' do |example| it 'projects/overview.html.raw' do |example|
get :show, params: { get :show, params: {
namespace_id: project_with_repo.namespace.to_param, namespace_id: project_with_repo.namespace.to_param,
id: project_with_repo id: project_with_repo
...@@ -48,7 +48,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -48,7 +48,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
store_frontend_fixture(response, example.description) store_frontend_fixture(response, example.description)
end end
it 'projects/edit.html' do |example| it 'projects/edit.html.raw' do |example|
get :edit, params: { get :edit, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
id: project id: project
...@@ -60,7 +60,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -60,7 +60,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
end end
describe Projects::Settings::CiCdController, '(JavaScript fixtures)', type: :controller do describe Projects::Settings::CiCdController, '(JavaScript fixtures)', type: :controller do
it 'projects/ci_cd_settings.html' do |example| it 'projects/ci_cd_settings.html.raw' do |example|
get :show, params: { get :show, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project project_id: project
...@@ -70,7 +70,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -70,7 +70,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
store_frontend_fixture(response, example.description) store_frontend_fixture(response, example.description)
end end
it 'projects/ci_cd_settings_with_variables.html' do |example| it 'projects/ci_cd_settings_with_variables.html.raw' do |example|
create(:ci_variable, project: project_variable_populated) create(:ci_variable, project: project_variable_populated)
create(:ci_variable, project: project_variable_populated) create(:ci_variable, project: project_variable_populated)
......
...@@ -22,7 +22,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle ...@@ -22,7 +22,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle
remove_repository(project) remove_repository(project)
end end
it 'services/prometheus/prometheus_service.html' do |example| it 'services/prometheus/prometheus_service.html.raw' do |example|
get :edit, params: { get :edit, params: {
namespace_id: namespace, namespace_id: namespace,
project_id: project, project_id: project,
......
...@@ -9,7 +9,7 @@ describe SearchController, '(JavaScript fixtures)', type: :controller do ...@@ -9,7 +9,7 @@ describe SearchController, '(JavaScript fixtures)', type: :controller do
clean_frontend_fixtures('search/') clean_frontend_fixtures('search/')
end end
it 'search/show.html' do |example| it 'search/show.html.raw' do |example|
get :show get :show
expect(response).to be_success expect(response).to be_success
......
...@@ -22,7 +22,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle ...@@ -22,7 +22,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle
remove_repository(project) remove_repository(project)
end end
it 'services/edit_service.html' do |example| it 'services/edit_service.html.raw' do |example|
get :edit, params: { get :edit, params: {
namespace_id: namespace, namespace_id: namespace,
project_id: project, project_id: project,
......
...@@ -16,7 +16,7 @@ describe 'Sessions (JavaScript fixtures)' do ...@@ -16,7 +16,7 @@ describe 'Sessions (JavaScript fixtures)' do
set_devise_mapping(context: @request) set_devise_mapping(context: @request)
end end
it 'sessions/new.html' do |example| it 'sessions/new.html.raw' do |example|
get :new get :new
expect(response).to be_success expect(response).to be_success
......
...@@ -23,7 +23,7 @@ describe SnippetsController, '(JavaScript fixtures)', type: :controller do ...@@ -23,7 +23,7 @@ describe SnippetsController, '(JavaScript fixtures)', type: :controller do
remove_repository(project) remove_repository(project)
end end
it 'snippets/show.html' do |example| it 'snippets/show.html.raw' do |example|
create(:discussion_note_on_snippet, noteable: snippet, project: project, author: admin, note: '- [ ] Task List Item') create(:discussion_note_on_snippet, noteable: snippet, project: project, author: admin, note: '- [ ] Task List Item')
get(:show, params: { id: snippet.to_param }) get(:show, params: { id: snippet.to_param })
......
...@@ -26,7 +26,7 @@ describe 'Todos (JavaScript fixtures)' do ...@@ -26,7 +26,7 @@ describe 'Todos (JavaScript fixtures)' do
sign_in(admin) sign_in(admin)
end end
it 'todos/todos.html' do |example| it 'todos/todos.html.raw' do |example|
get :index get :index
expect(response).to be_success expect(response).to be_success
......
...@@ -18,7 +18,7 @@ context 'U2F' do ...@@ -18,7 +18,7 @@ context 'U2F' do
set_devise_mapping(context: @request) set_devise_mapping(context: @request)
end end
it 'u2f/authenticate.html' do |example| it 'u2f/authenticate.html.raw' do |example|
allow(controller).to receive(:find_user).and_return(user) allow(controller).to receive(:find_user).and_return(user)
post :create, params: { user: { login: user.username, password: user.password } } post :create, params: { user: { login: user.username, password: user.password } }
...@@ -36,7 +36,7 @@ context 'U2F' do ...@@ -36,7 +36,7 @@ context 'U2F' do
allow_any_instance_of(Profiles::TwoFactorAuthsController).to receive(:build_qr_code).and_return('qrcode:blackandwhitesquares') allow_any_instance_of(Profiles::TwoFactorAuthsController).to receive(:build_qr_code).and_return('qrcode:blackandwhitesquares')
end end
it 'u2f/register.html' do |example| it 'u2f/register.html.raw' do |example|
get :show get :show
expect(response).to be_success expect(response).to be_success
......
...@@ -5,7 +5,7 @@ import GLDropdown from '~/gl_dropdown'; ...@@ -5,7 +5,7 @@ import GLDropdown from '~/gl_dropdown';
import '~/lib/utils/common_utils'; import '~/lib/utils/common_utils';
describe('glDropdown', function describeDropdown() { describe('glDropdown', function describeDropdown() {
preloadFixtures('static/gl_dropdown.html'); preloadFixtures('static/gl_dropdown.html.raw');
loadJSONFixtures('projects.json'); loadJSONFixtures('projects.json');
const NON_SELECTABLE_CLASSES = const NON_SELECTABLE_CLASSES =
...@@ -64,7 +64,7 @@ describe('glDropdown', function describeDropdown() { ...@@ -64,7 +64,7 @@ describe('glDropdown', function describeDropdown() {
} }
beforeEach(() => { beforeEach(() => {
loadFixtures('static/gl_dropdown.html'); loadFixtures('static/gl_dropdown.html.raw');
this.dropdownContainerElement = $('.dropdown.inline'); this.dropdownContainerElement = $('.dropdown.inline');
this.$dropdownMenuElement = $('.dropdown-menu', this.dropdownContainerElement); this.$dropdownMenuElement = $('.dropdown-menu', this.dropdownContainerElement);
this.projectsData = getJSONFixture('projects.json'); this.projectsData = getJSONFixture('projects.json');
......
...@@ -4,10 +4,10 @@ import $ from 'jquery'; ...@@ -4,10 +4,10 @@ import $ from 'jquery';
import GlFieldErrors from '~/gl_field_errors'; import GlFieldErrors from '~/gl_field_errors';
describe('GL Style Field Errors', function() { describe('GL Style Field Errors', function() {
preloadFixtures('static/gl_field_errors.html'); preloadFixtures('static/gl_field_errors.html.raw');
beforeEach(function() { beforeEach(function() {
loadFixtures('static/gl_field_errors.html'); loadFixtures('static/gl_field_errors.html.raw');
const $form = $('form.gl-show-field-errors'); const $form = $('form.gl-show-field-errors');
this.$form = $form; this.$form = $form;
......
...@@ -3,7 +3,7 @@ import initTodoToggle from '~/header'; ...@@ -3,7 +3,7 @@ import initTodoToggle from '~/header';
describe('Header', function() { describe('Header', function() {
const todosPendingCount = '.todos-count'; const todosPendingCount = '.todos-count';
const fixtureTemplate = 'issues/open-issue.html'; const fixtureTemplate = 'issues/open-issue.html.raw';
function isTodosCountHidden() { function isTodosCountHidden() {
return $(todosPendingCount).hasClass('hidden'); return $(todosPendingCount).hasClass('hidden');
......
...@@ -4,7 +4,7 @@ import axios from '~/lib/utils/axios_utils'; ...@@ -4,7 +4,7 @@ import axios from '~/lib/utils/axios_utils';
import IntegrationSettingsForm from '~/integrations/integration_settings_form'; import IntegrationSettingsForm from '~/integrations/integration_settings_form';
describe('IntegrationSettingsForm', () => { describe('IntegrationSettingsForm', () => {
const FIXTURE = 'services/edit_service.html'; const FIXTURE = 'services/edit_service.html.raw';
preloadFixtures(FIXTURE); preloadFixtures(FIXTURE);
beforeEach(() => { beforeEach(() => {
......
...@@ -9,9 +9,9 @@ import '~/lib/utils/text_utility'; ...@@ -9,9 +9,9 @@ import '~/lib/utils/text_utility';
describe('Issue', function() { describe('Issue', function() {
let $boxClosed, $boxOpen, $btn; let $boxClosed, $boxOpen, $btn;
preloadFixtures('issues/closed-issue.html'); preloadFixtures('issues/closed-issue.html.raw');
preloadFixtures('issues/issue-with-task-list.html'); preloadFixtures('issues/issue-with-task-list.html.raw');
preloadFixtures('issues/open-issue.html'); preloadFixtures('issues/open-issue.html.raw');
function expectErrorMessage() { function expectErrorMessage() {
const $flashMessage = $('div.flash-alert'); const $flashMessage = $('div.flash-alert');
...@@ -105,9 +105,9 @@ describe('Issue', function() { ...@@ -105,9 +105,9 @@ describe('Issue', function() {
beforeEach(function() { beforeEach(function() {
if (isIssueInitiallyOpen) { if (isIssueInitiallyOpen) {
loadFixtures('issues/open-issue.html'); loadFixtures('issues/open-issue.html.raw');
} else { } else {
loadFixtures('issues/closed-issue.html'); loadFixtures('issues/closed-issue.html.raw');
} }
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
......
...@@ -16,10 +16,10 @@ let saveLabelCount = 0; ...@@ -16,10 +16,10 @@ let saveLabelCount = 0;
let mock; let mock;
describe('Issue dropdown sidebar', () => { describe('Issue dropdown sidebar', () => {
preloadFixtures('static/issue_sidebar_label.html'); preloadFixtures('static/issue_sidebar_label.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('static/issue_sidebar_label.html'); loadFixtures('static/issue_sidebar_label.html.raw');
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
......
...@@ -11,11 +11,11 @@ const execImmediately = callback => { ...@@ -11,11 +11,11 @@ const execImmediately = callback => {
describe('LazyLoader', function() { describe('LazyLoader', function() {
let lazyLoader = null; let lazyLoader = null;
preloadFixtures('issues/issue_with_comment.html'); preloadFixtures('issues/issue_with_comment.html.raw');
describe('without IntersectionObserver', () => { describe('without IntersectionObserver', () => {
beforeEach(function() { beforeEach(function() {
loadFixtures('issues/issue_with_comment.html'); loadFixtures('issues/issue_with_comment.html.raw');
lazyLoader = new LazyLoader({ lazyLoader = new LazyLoader({
observerNode: 'foobar', observerNode: 'foobar',
...@@ -131,7 +131,7 @@ describe('LazyLoader', function() { ...@@ -131,7 +131,7 @@ describe('LazyLoader', function() {
describe('with IntersectionObserver', () => { describe('with IntersectionObserver', () => {
beforeEach(function() { beforeEach(function() {
loadFixtures('issues/issue_with_comment.html'); loadFixtures('issues/issue_with_comment.html.raw');
lazyLoader = new LazyLoader({ lazyLoader = new LazyLoader({
observerNode: 'foobar', observerNode: 'foobar',
......
...@@ -5,7 +5,7 @@ import LineHighlighter from '~/line_highlighter'; ...@@ -5,7 +5,7 @@ import LineHighlighter from '~/line_highlighter';
describe('LineHighlighter', function() { describe('LineHighlighter', function() {
var clickLine; var clickLine;
preloadFixtures('static/line_highlighter.html'); preloadFixtures('static/line_highlighter.html.raw');
clickLine = function(number, eventData = {}) { clickLine = function(number, eventData = {}) {
if ($.isEmptyObject(eventData)) { if ($.isEmptyObject(eventData)) {
return $('#L' + number).click(); return $('#L' + number).click();
...@@ -15,7 +15,7 @@ describe('LineHighlighter', function() { ...@@ -15,7 +15,7 @@ describe('LineHighlighter', function() {
} }
}; };
beforeEach(function() { beforeEach(function() {
loadFixtures('static/line_highlighter.html'); loadFixtures('static/line_highlighter.html.raw');
this['class'] = new LineHighlighter(); this['class'] = new LineHighlighter();
this.css = this['class'].highlightLineClass; this.css = this['class'].highlightLineClass;
return (this.spies = { return (this.spies = {
......
...@@ -11,9 +11,9 @@ describe('MergeRequest', function() { ...@@ -11,9 +11,9 @@ describe('MergeRequest', function() {
describe('task lists', function() { describe('task lists', function() {
let mock; let mock;
preloadFixtures('merge_requests/merge_request_with_task_list.html'); preloadFixtures('merge_requests/merge_request_with_task_list.html.raw');
beforeEach(function() { beforeEach(function() {
loadFixtures('merge_requests/merge_request_with_task_list.html'); loadFixtures('merge_requests/merge_request_with_task_list.html.raw');
spyOn(axios, 'patch').and.callThrough(); spyOn(axios, 'patch').and.callThrough();
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
...@@ -125,7 +125,7 @@ describe('MergeRequest', function() { ...@@ -125,7 +125,7 @@ describe('MergeRequest', function() {
describe('hideCloseButton', () => { describe('hideCloseButton', () => {
describe('merge request of another user', () => { describe('merge request of another user', () => {
beforeEach(() => { beforeEach(() => {
loadFixtures('merge_requests/merge_request_with_task_list.html'); loadFixtures('merge_requests/merge_request_with_task_list.html.raw');
this.el = document.querySelector('.js-issuable-actions'); this.el = document.querySelector('.js-issuable-actions');
new MergeRequest(); // eslint-disable-line no-new new MergeRequest(); // eslint-disable-line no-new
MergeRequest.hideCloseButton(); MergeRequest.hideCloseButton();
...@@ -145,7 +145,7 @@ describe('MergeRequest', function() { ...@@ -145,7 +145,7 @@ describe('MergeRequest', function() {
describe('merge request of current_user', () => { describe('merge request of current_user', () => {
beforeEach(() => { beforeEach(() => {
loadFixtures('merge_requests/merge_request_of_current_user.html'); loadFixtures('merge_requests/merge_request_of_current_user.html.raw');
this.el = document.querySelector('.js-issuable-actions'); this.el = document.querySelector('.js-issuable-actions');
MergeRequest.hideCloseButton(); MergeRequest.hideCloseButton();
}); });
......
...@@ -22,8 +22,8 @@ describe('MergeRequestTabs', function() { ...@@ -22,8 +22,8 @@ describe('MergeRequestTabs', function() {
}; };
preloadFixtures( preloadFixtures(
'merge_requests/merge_request_with_task_list.html', 'merge_requests/merge_request_with_task_list.html.raw',
'merge_requests/diff_comment.html', 'merge_requests/diff_comment.html.raw',
); );
beforeEach(function() { beforeEach(function() {
...@@ -48,7 +48,7 @@ describe('MergeRequestTabs', function() { ...@@ -48,7 +48,7 @@ describe('MergeRequestTabs', function() {
var windowTarget = '_blank'; var windowTarget = '_blank';
beforeEach(function() { beforeEach(function() {
loadFixtures('merge_requests/merge_request_with_task_list.html'); loadFixtures('merge_requests/merge_request_with_task_list.html.raw');
tabUrl = $('.commits-tab a').attr('href'); tabUrl = $('.commits-tab a').attr('href');
}); });
......
...@@ -5,10 +5,10 @@ import MiniPipelineGraph from '~/mini_pipeline_graph_dropdown'; ...@@ -5,10 +5,10 @@ import MiniPipelineGraph from '~/mini_pipeline_graph_dropdown';
import timeoutPromise from './helpers/set_timeout_promise_helper'; import timeoutPromise from './helpers/set_timeout_promise_helper';
describe('Mini Pipeline Graph Dropdown', () => { describe('Mini Pipeline Graph Dropdown', () => {
preloadFixtures('static/mini_dropdown_graph.html'); preloadFixtures('static/mini_dropdown_graph.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('static/mini_dropdown_graph.html'); loadFixtures('static/mini_dropdown_graph.html.raw');
}); });
describe('When is initialized', () => { describe('When is initialized', () => {
......
...@@ -3,7 +3,7 @@ import NewBranchForm from '~/new_branch_form'; ...@@ -3,7 +3,7 @@ import NewBranchForm from '~/new_branch_form';
describe('Branch', function() { describe('Branch', function() {
describe('create a new branch', function() { describe('create a new branch', function() {
preloadFixtures('branches/new_branch.html'); preloadFixtures('branches/new_branch.html.raw');
function fillNameWith(value) { function fillNameWith(value) {
$('.js-branch-name') $('.js-branch-name')
...@@ -16,7 +16,7 @@ describe('Branch', function() { ...@@ -16,7 +16,7 @@ describe('Branch', function() {
} }
beforeEach(function() { beforeEach(function() {
loadFixtures('branches/new_branch.html'); loadFixtures('branches/new_branch.html.raw');
$('form').on('submit', function(e) { $('form').on('submit', function(e) {
return e.preventDefault(); return e.preventDefault();
}); });
......
...@@ -34,7 +34,7 @@ const htmlEscape = comment => { ...@@ -34,7 +34,7 @@ const htmlEscape = comment => {
describe('Notes', function() { describe('Notes', function() {
const FLASH_TYPE_ALERT = 'alert'; const FLASH_TYPE_ALERT = 'alert';
const NOTES_POST_PATH = /(.*)\/notes\?html=true$/; const NOTES_POST_PATH = /(.*)\/notes\?html=true$/;
var fixture = 'snippets/show.html'; var fixture = 'snippets/show.html.raw';
preloadFixtures(fixture); preloadFixtures(fixture);
beforeEach(function() { beforeEach(function() {
......
...@@ -2,10 +2,10 @@ import $ from 'jquery'; ...@@ -2,10 +2,10 @@ import $ from 'jquery';
import OAuthRememberMe from '~/pages/sessions/new/oauth_remember_me'; import OAuthRememberMe from '~/pages/sessions/new/oauth_remember_me';
describe('OAuthRememberMe', () => { describe('OAuthRememberMe', () => {
preloadFixtures('static/oauth_remember_me.html'); preloadFixtures('static/oauth_remember_me.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('static/oauth_remember_me.html'); loadFixtures('static/oauth_remember_me.html.raw');
new OAuthRememberMe({ container: $('#oauth-container') }).bindEvents(); new OAuthRememberMe({ container: $('#oauth-container') }).bindEvents();
}); });
......
...@@ -3,7 +3,7 @@ import '~/lib/utils/text_utility'; ...@@ -3,7 +3,7 @@ import '~/lib/utils/text_utility';
import AbuseReports from '~/pages/admin/abuse_reports/abuse_reports'; import AbuseReports from '~/pages/admin/abuse_reports/abuse_reports';
describe('Abuse Reports', () => { describe('Abuse Reports', () => {
const FIXTURE = 'abuse_reports/abuse_reports_list.html'; const FIXTURE = 'abuse_reports/abuse_reports_list.html.raw';
const MAX_MESSAGE_LENGTH = 500; const MAX_MESSAGE_LENGTH = 500;
let $messages; let $messages;
......
...@@ -5,7 +5,7 @@ import initUserInternalRegexPlaceholder, { ...@@ -5,7 +5,7 @@ import initUserInternalRegexPlaceholder, {
} from '~/pages/admin/application_settings/account_and_limits'; } from '~/pages/admin/application_settings/account_and_limits';
describe('AccountAndLimits', () => { describe('AccountAndLimits', () => {
const FIXTURE = 'application_settings/accounts_and_limit.html'; const FIXTURE = 'application_settings/accounts_and_limit.html.raw';
let $userDefaultExternal; let $userDefaultExternal;
let $userInternalRegex; let $userInternalRegex;
preloadFixtures(FIXTURE); preloadFixtures(FIXTURE);
......
...@@ -2,7 +2,7 @@ import $ from 'jquery'; ...@@ -2,7 +2,7 @@ import $ from 'jquery';
import UserInternalRegexHandler from '~/pages/admin/users/new/index'; import UserInternalRegexHandler from '~/pages/admin/users/new/index';
describe('UserInternalRegexHandler', () => { describe('UserInternalRegexHandler', () => {
const FIXTURE = 'admin/users/new_with_internal_user_regex.html'; const FIXTURE = 'admin/users/new_with_internal_user_regex.html.raw';
let $userExternal; let $userExternal;
let $userEmail; let $userEmail;
let $warningMessage; let $warningMessage;
......
...@@ -2,10 +2,10 @@ import $ from 'jquery'; ...@@ -2,10 +2,10 @@ import $ from 'jquery';
import preserveUrlFragment from '~/pages/sessions/new/preserve_url_fragment'; import preserveUrlFragment from '~/pages/sessions/new/preserve_url_fragment';
describe('preserve_url_fragment', () => { describe('preserve_url_fragment', () => {
preloadFixtures('sessions/new.html'); preloadFixtures('sessions/new.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('sessions/new.html'); loadFixtures('sessions/new.html.raw');
}); });
it('adds the url fragment to all login and sign up form actions', () => { it('adds the url fragment to all login and sign up form actions', () => {
......
import Pipelines from '~/pipelines'; import Pipelines from '~/pipelines';
describe('Pipelines', () => { describe('Pipelines', () => {
preloadFixtures('static/pipeline_graph.html'); preloadFixtures('static/pipeline_graph.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('static/pipeline_graph.html'); loadFixtures('static/pipeline_graph.html.raw');
}); });
it('should be defined', () => { it('should be defined', () => {
......
import $ from 'jquery'; import $ from 'jquery';
import ProjectSelectComboButton from '~/project_select_combo_button'; import ProjectSelectComboButton from '~/project_select_combo_button';
const fixturePath = 'static/project_select_combo_button.html'; const fixturePath = 'static/project_select_combo_button.html.raw';
describe('Project Select Combo Button', function() { describe('Project Select Combo Button', function() {
preloadFixtures(fixturePath); preloadFixtures(fixturePath);
......
...@@ -5,7 +5,7 @@ import PANEL_STATE from '~/prometheus_metrics/constants'; ...@@ -5,7 +5,7 @@ import PANEL_STATE from '~/prometheus_metrics/constants';
import { metrics, missingVarMetrics } from './mock_data'; import { metrics, missingVarMetrics } from './mock_data';
describe('PrometheusMetrics', () => { describe('PrometheusMetrics', () => {
const FIXTURE = 'services/prometheus/prometheus_service.html'; const FIXTURE = 'services/prometheus/prometheus_service.html.raw';
preloadFixtures(FIXTURE); preloadFixtures(FIXTURE);
beforeEach(() => { beforeEach(() => {
......
import initReadMore from '~/read_more'; import initReadMore from '~/read_more';
describe('Read more click-to-expand functionality', () => { describe('Read more click-to-expand functionality', () => {
const fixtureName = 'projects/overview.html'; const fixtureName = 'projects/overview.html.raw';
preloadFixtures(fixtureName); preloadFixtures(fixtureName);
......
...@@ -23,7 +23,7 @@ const assertSidebarState = function(state) { ...@@ -23,7 +23,7 @@ const assertSidebarState = function(state) {
describe('RightSidebar', function() { describe('RightSidebar', function() {
describe('fixture tests', () => { describe('fixture tests', () => {
const fixtureName = 'issues/open-issue.html'; const fixtureName = 'issues/open-issue.html.raw';
preloadFixtures(fixtureName); preloadFixtures(fixtureName);
loadJSONFixtures('todos/todos.json'); loadJSONFixtures('todos/todos.json');
let mock; let mock;
......
...@@ -126,9 +126,9 @@ describe('Search autocomplete dropdown', () => { ...@@ -126,9 +126,9 @@ describe('Search autocomplete dropdown', () => {
expect(list.find(mrsIHaveCreatedLink).text()).toBe("Merge requests I've created"); expect(list.find(mrsIHaveCreatedLink).text()).toBe("Merge requests I've created");
}; };
preloadFixtures('static/search_autocomplete.html'); preloadFixtures('static/search_autocomplete.html.raw');
beforeEach(function() { beforeEach(function() {
loadFixtures('static/search_autocomplete.html'); loadFixtures('static/search_autocomplete.html.raw');
window.gon = {}; window.gon = {};
window.gon.current_user_id = userId; window.gon.current_user_id = userId;
......
...@@ -3,7 +3,7 @@ import Api from '~/api'; ...@@ -3,7 +3,7 @@ import Api from '~/api';
import Search from '~/pages/search/show/search'; import Search from '~/pages/search/show/search';
describe('Search', () => { describe('Search', () => {
const fixturePath = 'search/show.html'; const fixturePath = 'search/show.html.raw';
const searchTerm = 'some search'; const searchTerm = 'some search';
const fillDropdownInput = dropdownSelector => { const fillDropdownInput = dropdownSelector => {
const dropdownElement = document.querySelector(dropdownSelector).parentNode; const dropdownElement = document.querySelector(dropdownSelector).parentNode;
......
...@@ -2,10 +2,10 @@ import $ from 'jquery'; ...@@ -2,10 +2,10 @@ import $ from 'jquery';
import initSettingsPanels from '~/settings_panels'; import initSettingsPanels from '~/settings_panels';
describe('Settings Panels', () => { describe('Settings Panels', () => {
preloadFixtures('groups/edit.html'); preloadFixtures('groups/edit.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('groups/edit.html'); loadFixtures('groups/edit.html.raw');
}); });
describe('initSettingsPane', () => { describe('initSettingsPane', () => {
......
...@@ -2,7 +2,7 @@ import $ from 'jquery'; ...@@ -2,7 +2,7 @@ import $ from 'jquery';
import Shortcuts from '~/behaviors/shortcuts/shortcuts'; import Shortcuts from '~/behaviors/shortcuts/shortcuts';
describe('Shortcuts', () => { describe('Shortcuts', () => {
const fixtureName = 'snippets/show.html'; const fixtureName = 'snippets/show.html.raw';
const createEvent = (type, target) => const createEvent = (type, target) =>
$.Event(type, { $.Event(type, {
target, target,
......
...@@ -11,12 +11,12 @@ describe('sidebar assignees', () => { ...@@ -11,12 +11,12 @@ describe('sidebar assignees', () => {
let vm; let vm;
let mediator; let mediator;
let sidebarAssigneesEl; let sidebarAssigneesEl;
preloadFixtures('issues/open-issue.html'); preloadFixtures('issues/open-issue.html.raw');
beforeEach(() => { beforeEach(() => {
Vue.http.interceptors.push(Mock.sidebarMockInterceptor); Vue.http.interceptors.push(Mock.sidebarMockInterceptor);
loadFixtures('issues/open-issue.html'); loadFixtures('issues/open-issue.html.raw');
mediator = new SidebarMediator(Mock.mediator); mediator = new SidebarMediator(Mock.mediator);
spyOn(mediator, 'saveAssignees').and.callThrough(); spyOn(mediator, 'saveAssignees').and.callThrough();
......
...@@ -2,7 +2,7 @@ import AccessorUtilities from '~/lib/utils/accessor'; ...@@ -2,7 +2,7 @@ import AccessorUtilities from '~/lib/utils/accessor';
import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
describe('SigninTabsMemoizer', () => { describe('SigninTabsMemoizer', () => {
const fixtureTemplate = 'static/signin_tabs.html'; const fixtureTemplate = 'static/signin_tabs.html.raw';
const tabSelector = 'ul.new-session-tabs'; const tabSelector = 'ul.new-session-tabs';
const currentTabKey = 'current_signin_tab'; const currentTabKey = 'current_signin_tab';
let memo; let memo;
......
...@@ -3,11 +3,11 @@ import Todos from '~/pages/dashboard/todos/index/todos'; ...@@ -3,11 +3,11 @@ import Todos from '~/pages/dashboard/todos/index/todos';
import '~/lib/utils/common_utils'; import '~/lib/utils/common_utils';
describe('Todos', () => { describe('Todos', () => {
preloadFixtures('todos/todos.html'); preloadFixtures('todos/todos.html.raw');
let todoItem; let todoItem;
beforeEach(() => { beforeEach(() => {
loadFixtures('todos/todos.html'); loadFixtures('todos/todos.html.raw');
todoItem = document.querySelector('.todos-list .todo'); todoItem = document.querySelector('.todos-list .todo');
return new Todos(); return new Todos();
......
...@@ -4,10 +4,10 @@ import 'vendor/u2f'; ...@@ -4,10 +4,10 @@ import 'vendor/u2f';
import MockU2FDevice from './mock_u2f_device'; import MockU2FDevice from './mock_u2f_device';
describe('U2FAuthenticate', function() { describe('U2FAuthenticate', function() {
preloadFixtures('u2f/authenticate.html'); preloadFixtures('u2f/authenticate.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('u2f/authenticate.html'); loadFixtures('u2f/authenticate.html.raw');
this.u2fDevice = new MockU2FDevice(); this.u2fDevice = new MockU2FDevice();
this.container = $('#js-authenticate-u2f'); this.container = $('#js-authenticate-u2f');
this.component = new U2FAuthenticate( this.component = new U2FAuthenticate(
......
...@@ -4,10 +4,10 @@ import 'vendor/u2f'; ...@@ -4,10 +4,10 @@ import 'vendor/u2f';
import MockU2FDevice from './mock_u2f_device'; import MockU2FDevice from './mock_u2f_device';
describe('U2FRegister', function() { describe('U2FRegister', function() {
preloadFixtures('u2f/register.html'); preloadFixtures('u2f/register.html.raw');
beforeEach(done => { beforeEach(done => {
loadFixtures('u2f/register.html'); loadFixtures('u2f/register.html.raw');
this.u2fDevice = new MockU2FDevice(); this.u2fDevice = new MockU2FDevice();
this.container = $('#js-register-u2f'); this.container = $('#js-register-u2f');
this.component = new U2FRegister(this.container, $('#js-register-u2f-templates'), {}, 'token'); this.component = new U2FRegister(this.container, $('#js-register-u2f-templates'), {}, 'token');
......
...@@ -2,7 +2,7 @@ import initUserPopovers from '~/user_popovers'; ...@@ -2,7 +2,7 @@ import initUserPopovers from '~/user_popovers';
import UsersCache from '~/lib/utils/users_cache'; import UsersCache from '~/lib/utils/users_cache';
describe('User Popovers', () => { describe('User Popovers', () => {
const fixtureTemplate = 'merge_requests/diff_comment.html'; const fixtureTemplate = 'merge_requests/diff_comment.html.raw';
preloadFixtures(fixtureTemplate); preloadFixtures(fixtureTemplate);
const selector = '.js-user-link'; const selector = '.js-user-link';
......
...@@ -415,7 +415,7 @@ describe('ReadyToMerge', () => { ...@@ -415,7 +415,7 @@ describe('ReadyToMerge', () => {
}); });
beforeEach(() => { beforeEach(() => {
loadFixtures('merge_requests/merge_request_of_current_user.html'); loadFixtures('merge_requests/merge_request_of_current_user.html.raw');
}); });
it('should call start and stop polling when MR merged', done => { it('should call start and stop polling when MR merged', done => {
......
...@@ -17,7 +17,7 @@ const DEFAULT_PROPS = { ...@@ -17,7 +17,7 @@ const DEFAULT_PROPS = {
const UserPopover = Vue.extend(userPopover); const UserPopover = Vue.extend(userPopover);
describe('User Popover Component', () => { describe('User Popover Component', () => {
const fixtureTemplate = 'merge_requests/diff_comment.html'; const fixtureTemplate = 'merge_requests/diff_comment.html.raw';
preloadFixtures(fixtureTemplate); preloadFixtures(fixtureTemplate);
let vm; let vm;
......
...@@ -6,7 +6,7 @@ import ZenMode from '~/zen_mode'; ...@@ -6,7 +6,7 @@ import ZenMode from '~/zen_mode';
describe('ZenMode', () => { describe('ZenMode', () => {
let zen; let zen;
let dropzoneForElementSpy; let dropzoneForElementSpy;
const fixtureName = 'snippets/show.html'; const fixtureName = 'snippets/show.html.raw';
preloadFixtures(fixtureName); preloadFixtures(fixtureName);
......
...@@ -24,7 +24,7 @@ module JavaScriptFixturesHelpers ...@@ -24,7 +24,7 @@ module JavaScriptFixturesHelpers
# #
def clean_frontend_fixtures(directory_name) def clean_frontend_fixtures(directory_name)
full_directory_name = File.expand_path(directory_name, fixture_root_path) full_directory_name = File.expand_path(directory_name, fixture_root_path)
Dir[File.expand_path('*.html', full_directory_name)].each do |file_name| Dir[File.expand_path('*.html.raw', full_directory_name)].each do |file_name|
FileUtils.rm(file_name) FileUtils.rm(file_name)
end end
end end
......
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