Skip to content

Commit

Permalink
[7.11] chore(NA): move maps plugin test fixtures out of __tests__ fol…
Browse files Browse the repository at this point in the history
…der (#87764) (#87880)

* chore(NA): move maps plugin test fixtures out of __tests__ folder (#87764)

* chore(NA): move maps plugin test fixtures out of __tests__ folder

* chore(NA): last missing __tests__ folders renamed

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/plugins/maps/server/mvt/__fixtures__/pbf/0_0_0_docs.pbf
#	x-pack/plugins/maps/server/mvt/__fixtures__/pbf/0_0_0_grid_asgrid.pbf
#	x-pack/plugins/maps/server/mvt/__fixtures__/pbf/0_0_0_grid_aspoint.pbf

* test(NA): fix failing test
  • Loading branch information
mistic authored Jan 12, 2021
1 parent 60c0bac commit 93e2d82
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { MockSyncContext } from '../__tests__/mock_sync_context';
import { MockSyncContext } from '../__fixtures__/mock_sync_context';
import sinon from 'sinon';

jest.mock('../../../kibana_services', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
DATA_MAPPING_FUNCTION,
VECTOR_STYLES,
} from '../../../../../common/constants';
import { mockField, MockLayer, MockStyle } from './__tests__/test_util';
import { mockField, MockLayer, MockStyle } from './test_helpers/test_util';
import { ColorDynamicOptions } from '../../../../../common/descriptor_types';
import { IVectorLayer } from '../../../layers/vector_layer/vector_layer';
import { IField } from '../../../fields/field';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import React from 'react';
import { RawValue, VECTOR_STYLES } from '../../../../../common/constants';
// @ts-ignore
import { DynamicIconProperty } from './dynamic_icon_property';
import { mockField, MockLayer } from './__tests__/test_util';
import { mockField, MockLayer } from './test_helpers/test_util';
import { IconDynamicOptions } from '../../../../../common/descriptor_types';
import { IField } from '../../../fields/field';
import { IVectorLayer } from '../../../layers/vector_layer/vector_layer';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { RawValue, VECTOR_STYLES } from '../../../../../common/constants';
import { IField } from '../../../fields/field';
import { Map as MbMap } from 'mapbox-gl';
import { SizeDynamicOptions } from '../../../../../common/descriptor_types';
import { mockField, MockLayer, MockStyle } from './__tests__/test_util';
import { mockField, MockLayer, MockStyle } from './test_helpers/test_util';
import { IVectorLayer } from '../../../layers/vector_layer/vector_layer';

export class MockMbMap {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
VECTOR_SHAPE_TYPE,
VECTOR_STYLES,
} from '../../../../common/constants';
import { MockField } from './properties/__tests__/test_util';
import { MockField } from './properties/test_helpers/test_util';

jest.mock('../../../kibana_services');

Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugins/maps/server/mvt/get_tile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { getGridTile, getTile } from './get_tile';
import { TILE_GRIDAGGS, TILE_SEARCHES } from './__tests__/tile_es_responses';
import { TILE_GRIDAGGS, TILE_SEARCHES } from './__fixtures__/tile_es_responses';
import { Logger } from 'src/core/server';
import * as path from 'path';
import * as fs from 'fs';
Expand Down Expand Up @@ -53,7 +53,7 @@ describe('getTile', () => {
geoFieldType: ES_GEO_FIELD_TYPE.GEO_SHAPE,
});

compareTiles('./__tests__/pbf/0_0_0_docs.pbf', tile);
compareTiles('./__fixtures__/pbf/0_0_0_docs.pbf', tile);
});
});

Expand Down Expand Up @@ -116,12 +116,12 @@ describe('getGridTile', () => {

test('0.0.0 tile (clusters)', async () => {
const tile = await getGridTile(defaultParams);
compareTiles('./__tests__/pbf/0_0_0_grid_aspoint.pbf', tile);
compareTiles('./__fixtures__/pbf/0_0_0_grid_aspoint.pbf', tile);
});

test('0.0.0 tile (grids)', async () => {
const tile = await getGridTile({ ...defaultParams, requestType: RENDER_AS.GRID });
compareTiles('./__tests__/pbf/0_0_0_grid_asgrid.pbf', tile);
compareTiles('./__fixtures__/pbf/0_0_0_grid_asgrid.pbf', tile);
});
});

Expand Down

0 comments on commit 93e2d82

Please sign in to comment.