diff --git a/x-pack/plugins/cases/public/components/case_settings/sync_alerts_switch.test.tsx b/x-pack/plugins/cases/public/components/case_settings/sync_alerts_switch.test.tsx
index 588c14a4ef51a..12c28a3930a99 100644
--- a/x-pack/plugins/cases/public/components/case_settings/sync_alerts_switch.test.tsx
+++ b/x-pack/plugins/cases/public/components/case_settings/sync_alerts_switch.test.tsx
@@ -6,29 +6,20 @@
*/
import React from 'react';
-import { screen } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import type { AppMockRenderer } from '../../common/mock';
-import { createAppMockRenderer } from '../../common/mock';
import { SyncAlertsSwitch } from './sync_alerts_switch';
-// Failing: See https://github.com/elastic/kibana/issues/192997
-describe.skip('SyncAlertsSwitch', () => {
- let appMockRender: AppMockRenderer;
-
- beforeEach(() => {
- appMockRender = createAppMockRenderer();
- });
-
+describe('SyncAlertsSwitch', () => {
it('it renders', async () => {
- appMockRender.render();
+ render();
expect(await screen.findByTestId('sync-alerts-switch')).toBeInTheDocument();
});
it('it toggles the switch', async () => {
- appMockRender.render();
+ render();
await userEvent.click(await screen.findByTestId('sync-alerts-switch'));
@@ -39,20 +30,20 @@ describe.skip('SyncAlertsSwitch', () => {
});
it('it disables the switch', async () => {
- appMockRender.render();
+ render();
expect(await screen.findByTestId('sync-alerts-switch')).toHaveProperty('disabled', true);
});
it('it start as off', async () => {
- appMockRender.render();
+ render();
expect(await screen.findByText('Off')).toBeInTheDocument();
expect(screen.queryByText('On')).not.toBeInTheDocument();
});
it('it shows the correct labels', async () => {
- appMockRender.render();
+ render();
expect(await screen.findByText('On')).toBeInTheDocument();
expect(screen.queryByText('Off')).not.toBeInTheDocument();