Skip to content

Commit

Permalink
PMM-12952 Fix unit test & cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
matejkubinec committed Mar 4, 2024
1 parent 6d52bae commit e59b9b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { TrackingOptions } from '../AddRemoteInstance.types';

import { MetricsParameters, Schema } from './FormParts.types';

export const rdsTrackingOptions = [
export const trackingOptions = [
{ value: TrackingOptions.none, label: Messages.form.trackingOptions.none },
{ value: TrackingOptions.pgStatements, label: Messages.form.trackingOptions.pgStatements },
{ value: TrackingOptions.pgMonitor, label: Messages.form.trackingOptions.pgMonitor },
];

export const trackingOptions = [
export const rdsTrackingOptions = [
{ value: TrackingOptions.none, label: Messages.form.trackingOptions.none },
{ value: TrackingOptions.pgStatements, label: Messages.form.trackingOptions.pgStatements },
{ value: TrackingOptions.pgMonitor, label: Messages.form.trackingOptions.pgMonitor },
];

export const schemaOptions: SelectableValue[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Databases } from 'app/percona/shared/core';

import { AdditionalOptionsFormPart, getAdditionalOptions } from './AdditionalOptions/AdditionalOptions';
import { ExternalServiceConnectionDetails } from './ExternalServiceConnectionDetails/ExternalServiceConnectionDetails';
import { trackingOptions } from './FormParts.constants';
import { trackingOptions, rdsTrackingOptions } from './FormParts.constants';
import { LabelsFormPart } from './Labels/Labels';
import { MainDetailsFormPart } from './MainDetails/MainDetails';

Expand Down Expand Up @@ -197,7 +197,7 @@ describe('getAdditionalOptions ::', () => {
);
const fields = container.querySelectorAll('input');
const trakingFields = screen.getAllByTestId('tracking-radio-button');
expect(trakingFields.length).toBe(trackingOptions.length);
expect(fields.length).toBe(14);
expect(trakingFields.length).toBe(rdsTrackingOptions.length);
expect(fields.length).toBe(13);
});
});

0 comments on commit e59b9b1

Please sign in to comment.