Commit d152a74c authored by Winnie Hellmann's avatar Winnie Hellmann

Move all static fixtures to static directory

parent 8a07d5e6
...@@ -6,7 +6,7 @@ import '~/lib/utils/common_utils'; ...@@ -6,7 +6,7 @@ import '~/lib/utils/common_utils';
describe('glDropdown', function describeDropdown() { describe('glDropdown', function describeDropdown() {
preloadFixtures('static/gl_dropdown.html'); preloadFixtures('static/gl_dropdown.html');
loadJSONFixtures('projects.json'); loadJSONFixtures('static/projects.json');
const NON_SELECTABLE_CLASSES = const NON_SELECTABLE_CLASSES =
'.divider, .separator, .dropdown-header, .dropdown-menu-empty-item'; '.divider, .separator, .dropdown-header, .dropdown-menu-empty-item';
...@@ -67,7 +67,7 @@ describe('glDropdown', function describeDropdown() { ...@@ -67,7 +67,7 @@ describe('glDropdown', function describeDropdown() {
loadFixtures('static/gl_dropdown.html'); loadFixtures('static/gl_dropdown.html');
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('static/projects.json');
}); });
afterEach(() => { afterEach(() => {
......
export const FIXTURES_PATH = '/base/spec/javascripts/fixtures'; export const FIXTURES_PATH = '/base/spec/javascripts/fixtures';
export const TEST_HOST = 'http://test.host'; export const TEST_HOST = 'http://test.host';
export const DUMMY_IMAGE_URL = `${FIXTURES_PATH}/one_white_pixel.png`; export const DUMMY_IMAGE_URL = `${FIXTURES_PATH}/static/images/one_white_pixel.png`;
export const GREEN_BOX_IMAGE_URL = `${FIXTURES_PATH}/images/green_box.png`; export const GREEN_BOX_IMAGE_URL = `${FIXTURES_PATH}/static/images/green_box.png`;
export const RED_BOX_IMAGE_URL = `${FIXTURES_PATH}/images/red_box.png`; export const RED_BOX_IMAGE_URL = `${FIXTURES_PATH}/static/images/red_box.png`;
...@@ -9,8 +9,8 @@ describe('ProjectListItem component', () => { ...@@ -9,8 +9,8 @@ describe('ProjectListItem component', () => {
let wrapper; let wrapper;
let vm; let vm;
let options; let options;
loadJSONFixtures('projects.json'); loadJSONFixtures('static/projects.json');
const project = getJSONFixture('projects.json')[0]; const project = getJSONFixture('static/projects.json')[0];
beforeEach(() => { beforeEach(() => {
options = { options = {
......
...@@ -8,8 +8,8 @@ import { trimText } from 'spec/helpers/vue_component_helper'; ...@@ -8,8 +8,8 @@ import { trimText } from 'spec/helpers/vue_component_helper';
describe('ProjectSelector component', () => { describe('ProjectSelector component', () => {
let wrapper; let wrapper;
let vm; let vm;
loadJSONFixtures('projects.json'); loadJSONFixtures('static/projects.json');
const allProjects = getJSONFixture('projects.json'); const allProjects = getJSONFixture('static/projects.json');
const searchResults = allProjects.slice(0, 5); const searchResults = allProjects.slice(0, 5);
let selected = []; let selected = [];
selected = selected.concat(allProjects.slice(0, 3)).concat(allProjects.slice(5, 8)); selected = selected.concat(allProjects.slice(0, 3)).concat(allProjects.slice(5, 8));
......
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