Skip to content

Commit

Permalink
Fix telemetry_management_section tests
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo committed Apr 27, 2021
1 parent 8861632 commit f2b513b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ import TelemetryManagementSection from './telemetry_management_section';
import { TelemetryService } from '../../../telemetry/public/services';
import { coreMock } from '../../../../core/public/mocks';
import { render } from '@testing-library/react';
import type { DocLinksStart } from 'src/core/public';

describe('TelemetryManagementSectionComponent', () => {
const coreStart = coreMock.createStart();
const docLinks = {} as DocLinksStart['links'];
const coreSetup = coreMock.createSetup();

it('renders as expected', () => {
Expand Down Expand Up @@ -45,6 +47,7 @@ describe('TelemetryManagementSectionComponent', () => {
enableSaving={true}
isSecurityExampleEnabled={isSecurityExampleEnabled}
toasts={coreStart.notifications.toasts}
docLinks={docLinks}
/>
)
).toMatchSnapshot();
Expand Down Expand Up @@ -78,6 +81,7 @@ describe('TelemetryManagementSectionComponent', () => {
enableSaving={true}
isSecurityExampleEnabled={isSecurityExampleEnabled}
toasts={coreStart.notifications.toasts}
docLinks={docLinks}
/>
</React.Suspense>
);
Expand All @@ -93,6 +97,7 @@ describe('TelemetryManagementSectionComponent', () => {
enableSaving={true}
toasts={coreStart.notifications.toasts}
isSecurityExampleEnabled={isSecurityExampleEnabled}
docLinks={docLinks}
/>
</React.Suspense>
);
Expand Down Expand Up @@ -130,6 +135,7 @@ describe('TelemetryManagementSectionComponent', () => {
isSecurityExampleEnabled={isSecurityExampleEnabled}
enableSaving={true}
toasts={coreStart.notifications.toasts}
docLinks={docLinks}
/>
);
try {
Expand Down Expand Up @@ -177,6 +183,7 @@ describe('TelemetryManagementSectionComponent', () => {
enableSaving={true}
isSecurityExampleEnabled={isSecurityExampleEnabled}
toasts={coreStart.notifications.toasts}
docLinks={docLinks}
/>
);
try {
Expand Down Expand Up @@ -215,6 +222,7 @@ describe('TelemetryManagementSectionComponent', () => {
enableSaving={true}
isSecurityExampleEnabled={isSecurityExampleEnabled}
toasts={coreStart.notifications.toasts}
docLinks={docLinks}
/>
);
try {
Expand Down Expand Up @@ -254,6 +262,7 @@ describe('TelemetryManagementSectionComponent', () => {
isSecurityExampleEnabled={isSecurityExampleEnabled}
enableSaving={true}
toasts={coreStart.notifications.toasts}
docLinks={docLinks}
/>
);
try {
Expand Down Expand Up @@ -293,6 +302,7 @@ describe('TelemetryManagementSectionComponent', () => {
isSecurityExampleEnabled={isSecurityExampleEnabled}
enableSaving={true}
toasts={coreStart.notifications.toasts}
docLinks={docLinks}
/>
);

Expand Down Expand Up @@ -332,6 +342,7 @@ describe('TelemetryManagementSectionComponent', () => {
enableSaving={true}
isSecurityExampleEnabled={isSecurityExampleEnabled}
toasts={coreStart.notifications.toasts}
docLinks={docLinks}
/>
);
try {
Expand Down Expand Up @@ -382,6 +393,7 @@ describe('TelemetryManagementSectionComponent', () => {
enableSaving={true}
toasts={coreStart.notifications.toasts}
isSecurityExampleEnabled={isSecurityExampleEnabled}
docLinks={docLinks}
/>
).html()
).toMatchSnapshot();
Expand Down

0 comments on commit f2b513b

Please sign in to comment.