diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-12-30 15:27:40 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-01-03 10:56:39 -0600 |
commit | 5f192c77e09a9af19268e5c5cf860ffd8c0c6216 (patch) | |
tree | b899c45791919204529f704d44cd527a62b1c1cd /spec | |
parent | 6370e326995ccb1c1c816b007c63f10d0c7cda25 (diff) | |
download | gitlab-ce-5f192c77e09a9af19268e5c5cf860ffd8c0c6216.tar.gz |
update all frontend tests to point to precompiled fixtures
Diffstat (limited to 'spec')
29 files changed, 55 insertions, 55 deletions
diff --git a/spec/javascripts/activities_spec.js.es6 b/spec/javascripts/activities_spec.js.es6 index 192da4ee8d9..f0138945637 100644 --- a/spec/javascripts/activities_spec.js.es6 +++ b/spec/javascripts/activities_spec.js.es6 @@ -7,7 +7,7 @@ (() => { window.gon || (window.gon = {}); - const fixtureTemplate = 'event_filter.html'; + const fixtureTemplate = 'static/event_filter.html.raw'; const filters = [ { id: 'all', diff --git a/spec/javascripts/behaviors/quick_submit_spec.js b/spec/javascripts/behaviors/quick_submit_spec.js index 0f61000bc37..f4a977b9dea 100644 --- a/spec/javascripts/behaviors/quick_submit_spec.js +++ b/spec/javascripts/behaviors/quick_submit_spec.js @@ -5,9 +5,9 @@ (function() { describe('Quick Submit behavior', function() { var keydownEvent; - fixture.preload('behaviors/quick_submit.html'); + fixture.preload('static/behaviors/quick_submit.html.raw'); beforeEach(function() { - fixture.load('behaviors/quick_submit.html'); + fixture.load('static/behaviors/quick_submit.html.raw'); $('form').submit(function(e) { // Prevent a form submit from moving us off the testing page return e.preventDefault(); diff --git a/spec/javascripts/behaviors/requires_input_spec.js b/spec/javascripts/behaviors/requires_input_spec.js index c3f4c867d6a..8b21551bd10 100644 --- a/spec/javascripts/behaviors/requires_input_spec.js +++ b/spec/javascripts/behaviors/requires_input_spec.js @@ -4,9 +4,9 @@ (function() { describe('requiresInput', function() { - fixture.preload('behaviors/requires_input.html'); + fixture.preload('static/behaviors/requires_input.html.raw'); beforeEach(function() { - return fixture.load('behaviors/requires_input.html'); + return fixture.load('static/behaviors/requires_input.html.raw'); }); it('disables submit when any field is required', function() { $('.js-requires-input').requiresInput(); diff --git a/spec/javascripts/bootstrap_linked_tabs_spec.js.es6 b/spec/javascripts/bootstrap_linked_tabs_spec.js.es6 index 133712debab..e5256520c24 100644 --- a/spec/javascripts/bootstrap_linked_tabs_spec.js.es6 +++ b/spec/javascripts/bootstrap_linked_tabs_spec.js.es6 @@ -2,10 +2,10 @@ (() => { describe('Linked Tabs', () => { - fixture.preload('linked_tabs'); + fixture.preload('static/linked_tabs.html.raw'); beforeEach(() => { - fixture.load('linked_tabs'); + fixture.load('static/linked_tabs.html.raw'); }); describe('when is initialized', () => { diff --git a/spec/javascripts/dashboard_spec.js.es6 b/spec/javascripts/dashboard_spec.js.es6 index aadf6f518a8..76fe4878519 100644 --- a/spec/javascripts/dashboard_spec.js.es6 +++ b/spec/javascripts/dashboard_spec.js.es6 @@ -7,7 +7,7 @@ ((global) => { describe('Dashboard', () => { - const fixtureTemplate = 'dashboard.html'; + const fixtureTemplate = 'static/dashboard.html.raw'; function todosCountText() { return $('.js-todos-count').text(); diff --git a/spec/javascripts/environments/environment_actions_spec.js.es6 b/spec/javascripts/environments/environment_actions_spec.js.es6 index 4bae3f30bb5..c2ac3523483 100644 --- a/spec/javascripts/environments/environment_actions_spec.js.es6 +++ b/spec/javascripts/environments/environment_actions_spec.js.es6 @@ -2,10 +2,10 @@ //= require environments/components/environment_actions describe('Actions Component', () => { - fixture.preload('environments/element.html'); + fixture.preload('static/environments/element.html.raw'); beforeEach(() => { - fixture.load('environments/element.html'); + fixture.load('static/environments/element.html.raw'); }); it('should render a dropdown with the provided actions', () => { diff --git a/spec/javascripts/environments/environment_external_url_spec.js.es6 b/spec/javascripts/environments/environment_external_url_spec.js.es6 index 9f82567c35b..d578a017d44 100644 --- a/spec/javascripts/environments/environment_external_url_spec.js.es6 +++ b/spec/javascripts/environments/environment_external_url_spec.js.es6 @@ -2,9 +2,9 @@ //= require environments/components/environment_external_url describe('External URL Component', () => { - fixture.preload('environments/element.html'); + fixture.preload('static/environments/element.html.raw'); beforeEach(() => { - fixture.load('environments/element.html'); + fixture.load('static/environments/element.html.raw'); }); it('should link to the provided externalUrl prop', () => { diff --git a/spec/javascripts/environments/environment_item_spec.js.es6 b/spec/javascripts/environments/environment_item_spec.js.es6 index 5d7c6b2411d..7b53152108f 100644 --- a/spec/javascripts/environments/environment_item_spec.js.es6 +++ b/spec/javascripts/environments/environment_item_spec.js.es6 @@ -3,9 +3,9 @@ //= require environments/components/environment_item describe('Environment item', () => { - fixture.preload('environments/table.html'); + fixture.preload('static/environments/table.html.raw'); beforeEach(() => { - fixture.load('environments/table.html'); + fixture.load('static/environments/table.html.raw'); }); describe('When item is folder', () => { diff --git a/spec/javascripts/environments/environment_rollback_spec.js.es6 b/spec/javascripts/environments/environment_rollback_spec.js.es6 index 77ba0ab38ec..bfa20d6f2e5 100644 --- a/spec/javascripts/environments/environment_rollback_spec.js.es6 +++ b/spec/javascripts/environments/environment_rollback_spec.js.es6 @@ -1,12 +1,12 @@ //= require vue //= require environments/components/environment_rollback describe('Rollback Component', () => { - fixture.preload('environments/element.html'); + fixture.preload('static/environments/element.html.raw'); const retryURL = 'https://gitlab.com/retry'; beforeEach(() => { - fixture.load('environments/element.html'); + fixture.load('static/environments/element.html.raw'); }); it('Should link to the provided retryUrl', () => { diff --git a/spec/javascripts/environments/environment_stop_spec.js.es6 b/spec/javascripts/environments/environment_stop_spec.js.es6 index 84a41b2bf46..c3c5f2cc4c8 100644 --- a/spec/javascripts/environments/environment_stop_spec.js.es6 +++ b/spec/javascripts/environments/environment_stop_spec.js.es6 @@ -1,13 +1,13 @@ //= require vue //= require environments/components/environment_stop describe('Stop Component', () => { - fixture.preload('environments/element.html'); + fixture.preload('static/environments/element.html.raw'); let stopURL; let component; beforeEach(() => { - fixture.load('environments/element.html'); + fixture.load('static/environments/element.html.raw'); stopURL = '/stop'; component = new window.gl.environmentsList.StopComponent({ diff --git a/spec/javascripts/gl_dropdown_spec.js.es6 b/spec/javascripts/gl_dropdown_spec.js.es6 index bfaf90e2aee..5f9359007ac 100644 --- a/spec/javascripts/gl_dropdown_spec.js.es6 +++ b/spec/javascripts/gl_dropdown_spec.js.es6 @@ -43,7 +43,7 @@ } describe('Dropdown', function describeDropdown() { - fixture.preload('gl_dropdown.html'); + fixture.preload('static/gl_dropdown.html.raw'); fixture.preload('projects.json'); function initDropDown(hasRemote, isFilterable) { @@ -61,7 +61,7 @@ } beforeEach(() => { - fixture.load('gl_dropdown.html'); + fixture.load('static/gl_dropdown.html.raw'); this.dropdownContainerElement = $('.dropdown.inline'); this.$dropdownMenuElement = $('.dropdown-menu', this.dropdownContainerElement); this.projectsData = fixture.load('projects.json')[0]; diff --git a/spec/javascripts/gl_field_errors_spec.js.es6 b/spec/javascripts/gl_field_errors_spec.js.es6 index 5018e87ad6c..d314b23a7ed 100644 --- a/spec/javascripts/gl_field_errors_spec.js.es6 +++ b/spec/javascripts/gl_field_errors_spec.js.es6 @@ -4,11 +4,11 @@ //= require gl_field_errors ((global) => { - fixture.preload('gl_field_errors.html'); + fixture.preload('static/gl_field_errors.html.raw'); describe('GL Style Field Errors', function() { beforeEach(function() { - fixture.load('gl_field_errors.html'); + fixture.load('static/gl_field_errors.html.raw'); const $form = this.$form = $('form.gl-show-field-errors'); this.fieldErrors = new global.GlFieldErrors($form); }); diff --git a/spec/javascripts/header_spec.js b/spec/javascripts/header_spec.js index d2bcbc37b64..b413a3357f3 100644 --- a/spec/javascripts/header_spec.js +++ b/spec/javascripts/header_spec.js @@ -7,7 +7,7 @@ describe('Header', function() { var todosPendingCount = '.todos-pending-count'; - var fixtureTemplate = 'header.html'; + var fixtureTemplate = 'static/header.html.raw'; function isTodosCountHidden() { return $(todosPendingCount).hasClass('hidden'); diff --git a/spec/javascripts/issuable_spec.js.es6 b/spec/javascripts/issuable_spec.js.es6 index d61601ee4fb..846a3907c3d 100644 --- a/spec/javascripts/issuable_spec.js.es6 +++ b/spec/javascripts/issuable_spec.js.es6 @@ -21,10 +21,10 @@ } describe('Issuable', () => { - fixture.preload('issuable_filter'); + fixture.preload('static/issuable_filter.html.raw'); beforeEach(() => { - fixture.load('issuable_filter'); + fixture.load('static/issuable_filter.html.raw'); Issuable.init(); }); @@ -37,7 +37,7 @@ beforeEach(() => { $filtersForm = $('.js-filter-form'); - fixture.load('issuable_filter'); + fixture.load('static/issuable_filter.html.raw'); resetForm($filtersForm); }); diff --git a/spec/javascripts/issue_spec.js b/spec/javascripts/issue_spec.js index faab5ae00c2..421936a4786 100644 --- a/spec/javascripts/issue_spec.js +++ b/spec/javascripts/issue_spec.js @@ -8,9 +8,9 @@ var INVALID_URL = 'http://goesnowhere.nothing/whereami'; var $boxClosed, $boxOpen, $btnClose, $btnReopen; - fixture.preload('issues/closed-issue.html'); - fixture.preload('issues/issue-with-task-list.html'); - fixture.preload('issues/open-issue.html'); + fixture.preload('issues/closed-issue.html.raw'); + fixture.preload('issues/issue-with-task-list.html.raw'); + fixture.preload('issues/open-issue.html.raw'); function expectErrorMessage() { var $flashMessage = $('div.flash-alert'); @@ -61,7 +61,7 @@ describe('Issue', function() { describe('task lists', function() { - fixture.load('issues/issue-with-task-list.html'); + fixture.load('issues/issue-with-task-list.html.raw'); beforeEach(function() { this.issue = new Issue(); }); @@ -86,7 +86,7 @@ describe('close issue', function() { beforeEach(function() { - fixture.load('issues/open-issue.html'); + fixture.load('issues/open-issue.html.raw'); findElements(); this.issue = new Issue(); @@ -140,7 +140,7 @@ describe('reopen issue', function() { beforeEach(function() { - fixture.load('issues/closed-issue.html'); + fixture.load('issues/closed-issue.html.raw'); findElements(); this.issue = new Issue(); diff --git a/spec/javascripts/labels_issue_sidebar_spec.js.es6 b/spec/javascripts/labels_issue_sidebar_spec.js.es6 index 0c48d04776f..de788ef7027 100644 --- a/spec/javascripts/labels_issue_sidebar_spec.js.es6 +++ b/spec/javascripts/labels_issue_sidebar_spec.js.es6 @@ -17,10 +17,10 @@ (() => { let saveLabelCount = 0; describe('Issue dropdown sidebar', () => { - fixture.preload('issue_sidebar_label.html'); + fixture.preload('static/issue_sidebar_label.html.raw'); beforeEach(() => { - fixture.load('issue_sidebar_label.html'); + fixture.load('static/issue_sidebar_label.html.raw'); new IssuableContext('{"id":1,"name":"Administrator","username":"root"}'); new LabelsSelect(); diff --git a/spec/javascripts/line_highlighter_spec.js b/spec/javascripts/line_highlighter_spec.js index decdf583410..15f2c0e6ed4 100644 --- a/spec/javascripts/line_highlighter_spec.js +++ b/spec/javascripts/line_highlighter_spec.js @@ -6,7 +6,7 @@ (function() { describe('LineHighlighter', function() { var clickLine; - fixture.preload('line_highlighter.html'); + fixture.preload('static/line_highlighter.html.raw'); clickLine = function(number, eventData) { var e; if (eventData == null) { @@ -20,7 +20,7 @@ } }; beforeEach(function() { - fixture.load('line_highlighter.html'); + fixture.load('static/line_highlighter.html.raw'); this["class"] = new LineHighlighter(); this.css = this["class"].highlightClass; return this.spies = { diff --git a/spec/javascripts/merge_request_spec.js b/spec/javascripts/merge_request_spec.js index 4cf1693af1b..68afb4af3c1 100644 --- a/spec/javascripts/merge_request_spec.js +++ b/spec/javascripts/merge_request_spec.js @@ -6,9 +6,9 @@ (function() { describe('MergeRequest', function() { return describe('task lists', function() { - fixture.preload('merge_requests_show.html'); + fixture.preload('static/merge_requests_show.html.raw'); beforeEach(function() { - fixture.load('merge_requests_show.html'); + fixture.load('static/merge_requests_show.html.raw'); return this.merge = new MergeRequest(); }); it('modifies the Markdown field', function() { diff --git a/spec/javascripts/merge_request_tabs_spec.js b/spec/javascripts/merge_request_tabs_spec.js index 130d391bfab..1104f123b25 100644 --- a/spec/javascripts/merge_request_tabs_spec.js +++ b/spec/javascripts/merge_request_tabs_spec.js @@ -16,7 +16,7 @@ }; $.extend(stubLocation, defaults, stubs || {}); }; - fixture.preload('merge_request_tabs.html'); + fixture.preload('static/merge_request_tabs.html.raw'); beforeEach(function () { this.class = new gl.MergeRequestTabs({ stubLocation: stubLocation }); @@ -30,7 +30,7 @@ describe('#activateTab', function () { beforeEach(function () { spyOn($, 'ajax').and.callFake(function () {}); - fixture.load('merge_request_tabs.html'); + fixture.load('static/merge_request_tabs.html.raw'); this.subject = this.class.activateTab; }); it('shows the first tab when action is show', function () { diff --git a/spec/javascripts/mini_pipeline_graph_dropdown_spec.js.es6 b/spec/javascripts/mini_pipeline_graph_dropdown_spec.js.es6 index d1793e9308e..0cbfce8fbab 100644 --- a/spec/javascripts/mini_pipeline_graph_dropdown_spec.js.es6 +++ b/spec/javascripts/mini_pipeline_graph_dropdown_spec.js.es6 @@ -5,10 +5,10 @@ (() => { describe('Mini Pipeline Graph Dropdown', () => { - fixture.preload('mini_dropdown_graph'); + fixture.preload('static/mini_dropdown_graph.html.raw'); beforeEach(() => { - fixture.load('mini_dropdown_graph'); + fixture.load('static/mini_dropdown_graph.html.raw'); }); describe('When is initialized', () => { diff --git a/spec/javascripts/new_branch_spec.js b/spec/javascripts/new_branch_spec.js index a6cb9e47744..ba2c6f419e9 100644 --- a/spec/javascripts/new_branch_spec.js +++ b/spec/javascripts/new_branch_spec.js @@ -8,7 +8,7 @@ describe('Branch', function() { return describe('create a new branch', function() { var expectToHaveError, fillNameWith; - fixture.preload('new_branch.html'); + fixture.preload('static/new_branch.html.raw'); fillNameWith = function(value) { return $('.js-branch-name').val(value).trigger('blur'); }; @@ -16,7 +16,7 @@ return expect($('.js-branch-name-error span').text()).toEqual(error); }; beforeEach(function() { - fixture.load('new_branch.html'); + fixture.load('static/new_branch.html.raw'); $('form').on('submit', function(e) { return e.preventDefault(); }); diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js index d3bfa7730fa..5ea50ce43f7 100644 --- a/spec/javascripts/notes_spec.js +++ b/spec/javascripts/notes_spec.js @@ -12,7 +12,7 @@ gl.utils = gl.utils || {}; describe('Notes', function() { - var commentsTemplate = 'issues/issue_with_comment.raw'; + var commentsTemplate = 'issues/issue_with_comment.html.raw'; fixture.preload(commentsTemplate); beforeEach(function () { diff --git a/spec/javascripts/pipelines_spec.js.es6 b/spec/javascripts/pipelines_spec.js.es6 index 85c9cf4b4f1..27b9c4a2e28 100644 --- a/spec/javascripts/pipelines_spec.js.es6 +++ b/spec/javascripts/pipelines_spec.js.es6 @@ -2,10 +2,10 @@ (() => { describe('Pipelines', () => { - fixture.preload('pipeline_graph'); + fixture.preload('static/pipeline_graph.html.raw'); beforeEach(() => { - fixture.load('pipeline_graph'); + fixture.load('static/pipeline_graph.html.raw'); }); it('should be defined', () => { diff --git a/spec/javascripts/project_title_spec.js b/spec/javascripts/project_title_spec.js index 216b77f37c0..677094f2c9d 100644 --- a/spec/javascripts/project_title_spec.js +++ b/spec/javascripts/project_title_spec.js @@ -16,10 +16,10 @@ window.gon.api_version = 'v3'; describe('Project Title', function() { - fixture.preload('project_title.html'); + fixture.preload('static/project_title.html.raw'); fixture.preload('projects.json'); beforeEach(function() { - fixture.load('project_title.html'); + fixture.load('static/project_title.html.raw'); return this.project = new Project(); }); return describe('project list', function() { diff --git a/spec/javascripts/search_autocomplete_spec.js b/spec/javascripts/search_autocomplete_spec.js index 1b7f642d59e..b6e7815c6cc 100644 --- a/spec/javascripts/search_autocomplete_spec.js +++ b/spec/javascripts/search_autocomplete_spec.js @@ -112,9 +112,9 @@ }; describe('Search autocomplete dropdown', function() { - fixture.preload('search_autocomplete.html'); + fixture.preload('static/search_autocomplete.html.raw'); beforeEach(function() { - fixture.load('search_autocomplete.html'); + fixture.load('static/search_autocomplete.html.raw'); return widget = new gl.SearchAutocomplete; }); it('should show Dashboard specific dropdown menu', function() { diff --git a/spec/javascripts/signin_tabs_memoizer_spec.js.es6 b/spec/javascripts/signin_tabs_memoizer_spec.js.es6 index 9a9fb22255b..416a5b1aafb 100644 --- a/spec/javascripts/signin_tabs_memoizer_spec.js.es6 +++ b/spec/javascripts/signin_tabs_memoizer_spec.js.es6 @@ -2,7 +2,7 @@ ((global) => { describe('SigninTabsMemoizer', () => { - const fixtureTemplate = 'signin_tabs.html'; + const fixtureTemplate = 'static/signin_tabs.html.raw'; const tabSelector = 'ul.nav-tabs'; const currentTabKey = 'current_signin_tab'; let memo; diff --git a/spec/javascripts/u2f/authenticate_spec.js b/spec/javascripts/u2f/authenticate_spec.js index 064d18519ea..b88b5b932a7 100644 --- a/spec/javascripts/u2f/authenticate_spec.js +++ b/spec/javascripts/u2f/authenticate_spec.js @@ -10,7 +10,7 @@ (function() { describe('U2FAuthenticate', function() { - fixture.load('u2f/authenticate'); + fixture.load('static/u2f/authenticate.html.raw'); beforeEach(function() { this.u2fDevice = new MockU2FDevice; this.container = $("#js-authenticate-u2f"); diff --git a/spec/javascripts/u2f/register_spec.js b/spec/javascripts/u2f/register_spec.js index 189592ea87a..8a72c532941 100644 --- a/spec/javascripts/u2f/register_spec.js +++ b/spec/javascripts/u2f/register_spec.js @@ -10,7 +10,7 @@ (function() { describe('U2FRegister', function() { - fixture.load('u2f/register'); + fixture.load('static/u2f/register.html.raw'); beforeEach(function() { this.u2fDevice = new MockU2FDevice; this.container = $("#js-register-u2f"); diff --git a/spec/support/javascript_fixtures_helpers.rb b/spec/support/javascript_fixtures_helpers.rb index 6817ccb1da7..29dd4de62ff 100644 --- a/spec/support/javascript_fixtures_helpers.rb +++ b/spec/support/javascript_fixtures_helpers.rb @@ -13,7 +13,7 @@ module JavaScriptFixturesHelpers # def clean_frontend_fixtures(directory_name) directory_name = File.expand_path(directory_name, FIXTURE_PATH) - Dir[File.expand_path('**/*.html.raw', directory_name)].each do |file_name| + Dir[File.expand_path('*.html.raw', directory_name)].each do |file_name| FileUtils.rm(file_name) end end |