Skip to content
Snippets Groups Projects
Commit 5f192c77 authored by Mike Greiling's avatar Mike Greiling
Browse files

update all frontend tests to point to precompiled fixtures

parent 6370e326
No related branches found
No related tags found
No related merge requests found
Showing
with 42 additions and 42 deletions
Loading
Loading
@@ -7,7 +7,7 @@
 
(() => {
window.gon || (window.gon = {});
const fixtureTemplate = 'event_filter.html';
const fixtureTemplate = 'static/event_filter.html.raw';
const filters = [
{
id: 'all',
Loading
Loading
Loading
Loading
@@ -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();
Loading
Loading
Loading
Loading
@@ -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();
Loading
Loading
Loading
Loading
@@ -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', () => {
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@
 
((global) => {
describe('Dashboard', () => {
const fixtureTemplate = 'dashboard.html';
const fixtureTemplate = 'static/dashboard.html.raw';
 
function todosCountText() {
return $('.js-todos-count').text();
Loading
Loading
Loading
Loading
@@ -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', () => {
Loading
Loading
Loading
Loading
@@ -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', () => {
Loading
Loading
Loading
Loading
@@ -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', () => {
Loading
Loading
//= 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', () => {
Loading
Loading
//= 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({
Loading
Loading
Loading
Loading
@@ -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) {
Loading
Loading
@@ -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];
Loading
Loading
Loading
Loading
@@ -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);
});
Loading
Loading
Loading
Loading
@@ -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');
Loading
Loading
Loading
Loading
@@ -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();
});
 
Loading
Loading
@@ -37,7 +37,7 @@
 
beforeEach(() => {
$filtersForm = $('.js-filter-form');
fixture.load('issuable_filter');
fixture.load('static/issuable_filter.html.raw');
resetForm($filtersForm);
});
 
Loading
Loading
Loading
Loading
@@ -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');
Loading
Loading
@@ -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();
});
Loading
Loading
@@ -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();
 
Loading
Loading
@@ -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();
 
Loading
Loading
Loading
Loading
@@ -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();
 
Loading
Loading
Loading
Loading
@@ -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) {
Loading
Loading
@@ -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 = {
Loading
Loading
Loading
Loading
@@ -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() {
Loading
Loading
Loading
Loading
@@ -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 });
Loading
Loading
@@ -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 () {
Loading
Loading
Loading
Loading
@@ -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', () => {
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