Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed May 31, 2022
1 parent b35ae1b commit b157ed2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ describe('Lens Attribute', () => {
],
layerId: 'layer0-reference-lines',
layerType: 'referenceLine',
seriesType: 'line',
yConfig: [
{
axisMode: 'bottom',
Expand Down Expand Up @@ -638,15 +637,15 @@ describe('Lens Attribute', () => {
const layerConfig1: LayerConfig = {
seriesConfig: reportViewConfig,
seriesType: 'line',
indexPattern: mockIndexPattern,
indexPattern: mockDataView,
reportDefinitions: {},
time: { from: 'now-15m', to: 'now' },
color: 'green',
name: 'test-series',
selectedMetricField: TRANSACTION_DURATION,
};

lnsAttr = new LensAttributes([layerConfig1]);
lnsAttr = new LensAttributes([layerConfig1], reportViewConfig.reportType);

const attributes = lnsAttr.getJSON();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,6 @@ export class LensAttributes {
layerId: referenceLineLayerId,
accessors: Object.keys(columns),
layerType: 'referenceLine',
seriesType: 'line' as SeriesType,
yConfig: Object.keys(columns).map((columnId) => ({
axisMode: 'bottom',
color: '#6092C0',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ export const sampleAttribute = {
],
layerId: 'layer0-reference-lines',
layerType: 'referenceLine',
seriesType: 'line',
yConfig: [
{
axisMode: 'bottom',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { RECORDS_FIELD } from '../constants';

export const sampleAttributeWithReferenceLines = {
description: 'undefined',
description: '',
references: [
{
id: 'apm-*',
Expand Down Expand Up @@ -93,7 +95,7 @@ export const sampleAttributeWithReferenceLines = {
label: 'Part of count() / overall_sum(count())',
operationType: 'count',
scale: 'ratio',
sourceField: 'Records',
sourceField: RECORDS_FIELD,
},
'y-axis-column-layer0X1': {
customLabel: true,
Expand All @@ -107,7 +109,7 @@ export const sampleAttributeWithReferenceLines = {
label: 'Part of count() / overall_sum(count())',
operationType: 'count',
scale: 'ratio',
sourceField: 'Records',
sourceField: RECORDS_FIELD,
},
'y-axis-column-layer0X2': {
customLabel: true,
Expand Down Expand Up @@ -220,7 +222,8 @@ export const sampleAttributeWithReferenceLines = {
filters: [],
query: {
language: 'kuery',
query: 'transaction.duration.us < 60000000',
query:
'transaction.type: page-load and processor.event: transaction and transaction.type : * and service.name: (elastic or kibana) and transaction.duration.us < 60000000',
},
visualization: {
axisTitlesVisibilitySettings: {
Expand All @@ -244,6 +247,7 @@ export const sampleAttributeWithReferenceLines = {
xAccessor: 'x-axis-column-layer0',
yConfig: [
{
axisMode: 'left',
color: 'green',
forAccessor: 'y-axis-column-layer0',
},
Expand All @@ -259,7 +263,6 @@ export const sampleAttributeWithReferenceLines = {
],
layerId: 'layer0-reference-lines',
layerType: 'referenceLine',
seriesType: 'line',
yConfig: [
{
axisMode: 'bottom',
Expand Down

0 comments on commit b157ed2

Please sign in to comment.