Commit ebc27391 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch '339346-change-get-json-7b3eade53bd' into 'master'

Use import for json fixture - 4/7

See merge request gitlab-org/gitlab!71901
parents 10329c86 b6dbfc3d
......@@ -11,7 +11,7 @@ import produce from 'immer';
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import { getJSONFixture } from 'helpers/fixtures';
import getProjectsQueryResponse from 'test_fixtures/graphql/projects/access_tokens/get_projects.query.graphql.json';
import createMockApollo from 'helpers/mock_apollo_helper';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import waitForPromises from 'helpers/wait_for_promises';
......@@ -20,9 +20,6 @@ import getProjectsQuery from '~/access_tokens/graphql/queries/get_projects.query
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
describe('ProjectsTokenSelector', () => {
const getProjectsQueryResponse = getJSONFixture(
'graphql/projects/access_tokens/get_projects.query.graphql.json',
);
const getProjectsQueryResponsePage2 = produce(
getProjectsQueryResponse,
(getProjectsQueryResponseDraft) => {
......
import { GlButton } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import data from 'test_fixtures/deploy_keys/keys.json';
import actionBtn from '~/deploy_keys/components/action_btn.vue';
import eventHub from '~/deploy_keys/eventhub';
describe('Deploy keys action btn', () => {
const data = getJSONFixture('deploy_keys/keys.json');
const deployKey = data.enabled_keys[0];
let wrapper;
......
import { mount } from '@vue/test-utils';
import MockAdapter from 'axios-mock-adapter';
import data from 'test_fixtures/deploy_keys/keys.json';
import waitForPromises from 'helpers/wait_for_promises';
import { TEST_HOST } from 'spec/test_constants';
import deployKeysApp from '~/deploy_keys/components/app.vue';
......@@ -10,7 +11,6 @@ import axios from '~/lib/utils/axios_utils';
const TEST_ENDPOINT = `${TEST_HOST}/dummy/`;
describe('Deploy keys app component', () => {
const data = getJSONFixture('deploy_keys/keys.json');
let wrapper;
let mock;
......
import { mount } from '@vue/test-utils';
import data from 'test_fixtures/deploy_keys/keys.json';
import key from '~/deploy_keys/components/key.vue';
import DeployKeysStore from '~/deploy_keys/store';
import { getTimeago } from '~/lib/utils/datetime_utility';
......@@ -7,8 +8,6 @@ describe('Deploy keys key', () => {
let wrapper;
let store;
const data = getJSONFixture('deploy_keys/keys.json');
const findTextAndTrim = (selector) => wrapper.find(selector).text().trim();
const createComponent = (propsData) => {
......
import { mount } from '@vue/test-utils';
import data from 'test_fixtures/deploy_keys/keys.json';
import deployKeysPanel from '~/deploy_keys/components/keys_panel.vue';
import DeployKeysStore from '~/deploy_keys/store';
describe('Deploy keys panel', () => {
const data = getJSONFixture('deploy_keys/keys.json');
let wrapper;
const findTableRowHeader = () => wrapper.find('.table-row-header');
......
const FIXTURE = 'merge_request_diffs/with_commit.json';
import fixture from 'test_fixtures/merge_request_diffs/with_commit.json';
export default function getDiffWithCommit() {
return getJSONFixture(FIXTURE);
return fixture;
}
import { escape } from 'lodash';
import labelData from 'test_fixtures/labels/project_labels.json';
import FilteredSearchSpecHelper from 'helpers/filtered_search_spec_helper';
import { TEST_HOST } from 'helpers/test_constants';
import DropdownUtils from '~/filtered_search/dropdown_utils';
......@@ -132,15 +133,8 @@ describe('Filtered Search Visual Tokens', () => {
});
describe('updateLabelTokenColor', () => {
const jsonFixtureName = 'labels/project_labels.json';
const dummyEndpoint = '/dummy/endpoint';
let labelData;
beforeAll(() => {
labelData = getJSONFixture(jsonFixtureName);
});
const missingLabelToken = FilteredSearchSpecHelper.createFilterVisualToken(
'label',
'=',
......
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