Skip to content
Snippets Groups Projects
Commit ad985a7a authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Mike Greiling
Browse files

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

Remove .raw from JavaScript fixture file names

Closes #59201

See merge request gitlab-org/gitlab-ce!26430

(cherry picked from commit 79a45f7f)
parent 02b29ce8
No related branches found
No related tags found
No related merge requests found
Showing
with 41 additions and 44 deletions
Loading
Loading
@@ -9,9 +9,6 @@ plugins:
- import
- html
settings:
html/html-extensions:
- '.html'
- '.html.raw'
import/resolver:
webpack:
config: './config/webpack.config.js'
Loading
Loading
Loading
Loading
@@ -110,7 +110,7 @@ module.exports = function(config) {
frameworks: ['jasmine'],
files: [
{ pattern: 'spec/javascripts/test_bundle.js', watched: false },
{ pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw|.png)', included: false },
{ pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.png)', included: false },
],
preprocessors: {
'spec/javascripts/**/*.js': ['webpack', 'sourcemap'],
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@ import Pager from '~/pager';
 
describe('Activities', () => {
window.gon || (window.gon = {});
const fixtureTemplate = 'static/event_filter.html.raw';
const fixtureTemplate = 'static/event_filter.html';
const filters = [
{
id: 'all',
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ import $ from 'jquery';
import AjaxLoadingSpinner from '~/ajax_loading_spinner';
 
describe('Ajax Loading Spinner', () => {
const fixtureTemplate = 'static/ajax_loading_spinner.html.raw';
const fixtureTemplate = 'static/ajax_loading_spinner.html';
preloadFixtures(fixtureTemplate);
 
beforeEach(() => {
Loading
Loading
Loading
Loading
@@ -24,13 +24,13 @@ const lazyAssert = function(done, assertFn) {
 
describe('AwardsHandler', function() {
const emojiData = getJSONFixture('emojis/emojis.json');
preloadFixtures('snippets/show.html.raw');
preloadFixtures('snippets/show.html');
 
beforeEach(function(done) {
mock = new MockAdapter(axios);
mock.onGet(`/-/emojis/${EMOJI_VERSION}/emojis.json`).reply(200, emojiData);
 
loadFixtures('snippets/show.html.raw');
loadFixtures('snippets/show.html');
loadAwardsHandler(true)
.then(obj => {
awardsHandler = obj;
Loading
Loading
Loading
Loading
@@ -4,10 +4,10 @@ import '~/behaviors/quick_submit';
describe('Quick Submit behavior', function() {
const keydownEvent = (options = { keyCode: 13, metaKey: true }) => $.Event('keydown', options);
 
preloadFixtures('snippets/show.html.raw');
preloadFixtures('snippets/show.html');
 
beforeEach(() => {
loadFixtures('snippets/show.html.raw');
loadFixtures('snippets/show.html');
$('form').submit(e => {
// Prevent a form submit from moving us off the testing page
e.preventDefault();
Loading
Loading
Loading
Loading
@@ -3,10 +3,10 @@ import '~/behaviors/requires_input';
 
describe('requiresInput', () => {
let submitButton;
preloadFixtures('branches/new_branch.html.raw');
preloadFixtures('branches/new_branch.html');
 
beforeEach(() => {
loadFixtures('branches/new_branch.html.raw');
loadFixtures('branches/new_branch.html');
submitButton = $('button[type="submit"]');
});
 
Loading
Loading
Loading
Loading
@@ -9,7 +9,7 @@ import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable';
const FORM_SELECTOR = '.js-main-target-form .js-vue-comment-form';
 
describe('ShortcutsIssuable', function() {
const fixtureName = 'snippets/show.html.raw';
const fixtureName = 'snippets/show.html';
preloadFixtures(fixtureName);
 
beforeAll(done => {
Loading
Loading
Loading
Loading
@@ -6,10 +6,10 @@ describe('Balsamiq integration spec', () => {
let endpoint;
let balsamiqViewer;
 
preloadFixtures('static/balsamiq_viewer.html.raw');
preloadFixtures('static/balsamiq_viewer.html');
 
beforeEach(() => {
loadFixtures('static/balsamiq_viewer.html.raw');
loadFixtures('static/balsamiq_viewer.html');
 
container = document.getElementById('js-balsamiq-viewer');
balsamiqViewer = new BalsamiqViewer(container);
Loading
Loading
Loading
Loading
@@ -2,10 +2,10 @@ import $ from 'jquery';
import BlobFileDropzone from '~/blob/blob_file_dropzone';
 
describe('BlobFileDropzone', function() {
preloadFixtures('blob/show.html.raw');
preloadFixtures('blob/show.html');
 
beforeEach(() => {
loadFixtures('blob/show.html.raw');
loadFixtures('blob/show.html');
const form = $('.js-upload-blob-form');
this.blobFileDropzone = new BlobFileDropzone(form, 'POST');
this.dropzone = $('.js-upload-blob-form .dropzone').get(0).dropzone;
Loading
Loading
Loading
Loading
@@ -3,10 +3,10 @@ import axios from '~/lib/utils/axios_utils';
import renderNotebook from '~/blob/notebook';
 
describe('iPython notebook renderer', () => {
preloadFixtures('static/notebook_viewer.html.raw');
preloadFixtures('static/notebook_viewer.html');
 
beforeEach(() => {
loadFixtures('static/notebook_viewer.html.raw');
loadFixtures('static/notebook_viewer.html');
});
 
it('shows loading icon', () => {
Loading
Loading
Loading
Loading
@@ -15,10 +15,10 @@ describe('PDF renderer', () => {
}
};
 
preloadFixtures('static/pdf_viewer.html.raw');
preloadFixtures('static/pdf_viewer.html');
 
beforeEach(() => {
loadFixtures('static/pdf_viewer.html.raw');
loadFixtures('static/pdf_viewer.html');
viewer = document.getElementById('js-pdf-viewer');
viewer.dataset.endpoint = testPDF;
});
Loading
Loading
Loading
Loading
@@ -13,10 +13,10 @@ describe('Sketch viewer', () => {
});
};
 
preloadFixtures('static/sketch_viewer.html.raw');
preloadFixtures('static/sketch_viewer.html');
 
beforeEach(() => {
loadFixtures('static/sketch_viewer.html.raw');
loadFixtures('static/sketch_viewer.html');
});
 
describe('with error message', () => {
Loading
Loading
Loading
Loading
@@ -9,12 +9,12 @@ describe('Blob viewer', () => {
let blob;
let mock;
 
preloadFixtures('snippets/show.html.raw');
preloadFixtures('snippets/show.html');
 
beforeEach(() => {
mock = new MockAdapter(axios);
 
loadFixtures('snippets/show.html.raw');
loadFixtures('snippets/show.html');
$('#modal-upload-blob').remove();
 
blob = new BlobViewer();
Loading
Loading
Loading
Loading
@@ -9,7 +9,7 @@ describe('Board component', () => {
let el;
 
beforeEach(done => {
loadFixtures('boards/show.html.raw');
loadFixtures('boards/show.html');
 
el = document.createElement('div');
document.body.appendChild(el);
Loading
Loading
import LinkedTabs from '~/lib/utils/bootstrap_linked_tabs';
 
describe('Linked Tabs', () => {
preloadFixtures('static/linked_tabs.html.raw');
preloadFixtures('static/linked_tabs.html');
 
beforeEach(() => {
loadFixtures('static/linked_tabs.html.raw');
loadFixtures('static/linked_tabs.html');
});
 
describe('when is initialized', () => {
Loading
Loading
Loading
Loading
@@ -7,8 +7,8 @@ const VARIABLE_PATCH_ENDPOINT = 'http://test.host/frontend-fixtures/builds-proje
const HIDE_CLASS = 'hide';
 
describe('AjaxFormVariableList', () => {
preloadFixtures('projects/ci_cd_settings.html.raw');
preloadFixtures('projects/ci_cd_settings_with_variables.html.raw');
preloadFixtures('projects/ci_cd_settings.html');
preloadFixtures('projects/ci_cd_settings_with_variables.html');
 
let container;
let saveButton;
Loading
Loading
@@ -18,7 +18,7 @@ describe('AjaxFormVariableList', () => {
let ajaxVariableList;
 
beforeEach(() => {
loadFixtures('projects/ci_cd_settings.html.raw');
loadFixtures('projects/ci_cd_settings.html');
container = document.querySelector('.js-ci-variable-list-section');
 
mock = new MockAdapter(axios);
Loading
Loading
@@ -168,7 +168,7 @@ describe('AjaxFormVariableList', () => {
 
describe('updateRowsWithPersistedVariables', () => {
beforeEach(() => {
loadFixtures('projects/ci_cd_settings_with_variables.html.raw');
loadFixtures('projects/ci_cd_settings_with_variables.html');
container = document.querySelector('.js-ci-variable-list-section');
 
const ajaxVariableListEl = document.querySelector('.js-ci-variable-list-section');
Loading
Loading
Loading
Loading
@@ -5,9 +5,9 @@ import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper';
const HIDE_CLASS = 'hide';
 
describe('VariableList', () => {
preloadFixtures('pipeline_schedules/edit.html.raw');
preloadFixtures('pipeline_schedules/edit_with_variables.html.raw');
preloadFixtures('projects/ci_cd_settings.html.raw');
preloadFixtures('pipeline_schedules/edit.html');
preloadFixtures('pipeline_schedules/edit_with_variables.html');
preloadFixtures('projects/ci_cd_settings.html');
 
let $wrapper;
let variableList;
Loading
Loading
@@ -15,7 +15,7 @@ describe('VariableList', () => {
describe('with only key/value inputs', () => {
describe('with no variables', () => {
beforeEach(() => {
loadFixtures('pipeline_schedules/edit.html.raw');
loadFixtures('pipeline_schedules/edit.html');
$wrapper = $('.js-ci-variable-list-section');
 
variableList = new VariableList({
Loading
Loading
@@ -82,7 +82,7 @@ describe('VariableList', () => {
 
describe('with persisted variables', () => {
beforeEach(() => {
loadFixtures('pipeline_schedules/edit_with_variables.html.raw');
loadFixtures('pipeline_schedules/edit_with_variables.html');
$wrapper = $('.js-ci-variable-list-section');
 
variableList = new VariableList({
Loading
Loading
@@ -115,7 +115,7 @@ describe('VariableList', () => {
 
describe('with all inputs(key, value, protected)', () => {
beforeEach(() => {
loadFixtures('projects/ci_cd_settings.html.raw');
loadFixtures('projects/ci_cd_settings.html');
$wrapper = $('.js-ci-variable-list-section');
 
$wrapper.find('.js-ci-variable-input-protected').attr('data-default', 'false');
Loading
Loading
@@ -149,7 +149,7 @@ describe('VariableList', () => {
 
describe('toggleEnableRow method', () => {
beforeEach(() => {
loadFixtures('pipeline_schedules/edit_with_variables.html.raw');
loadFixtures('pipeline_schedules/edit_with_variables.html');
$wrapper = $('.js-ci-variable-list-section');
 
variableList = new VariableList({
Loading
Loading
@@ -198,7 +198,7 @@ describe('VariableList', () => {
 
describe('hideValues', () => {
beforeEach(() => {
loadFixtures('projects/ci_cd_settings.html.raw');
loadFixtures('projects/ci_cd_settings.html');
$wrapper = $('.js-ci-variable-list-section');
 
variableList = new VariableList({
Loading
Loading
Loading
Loading
@@ -2,12 +2,12 @@ import $ from 'jquery';
import setupNativeFormVariableList from '~/ci_variable_list/native_form_variable_list';
 
describe('NativeFormVariableList', () => {
preloadFixtures('pipeline_schedules/edit.html.raw');
preloadFixtures('pipeline_schedules/edit.html');
 
let $wrapper;
 
beforeEach(() => {
loadFixtures('pipeline_schedules/edit.html.raw');
loadFixtures('pipeline_schedules/edit.html');
$wrapper = $('.js-ci-variable-list-section');
 
setupNativeFormVariableList({
Loading
Loading
Loading
Loading
@@ -9,10 +9,10 @@ import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper';
 
describe('Clusters', () => {
let cluster;
preloadFixtures('clusters/show_cluster.html.raw');
preloadFixtures('clusters/show_cluster.html');
 
beforeEach(() => {
loadFixtures('clusters/show_cluster.html.raw');
loadFixtures('clusters/show_cluster.html');
cluster = new Clusters();
});
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment