From a6764f267f21bd8dd4fca3b6b70032c247825f95 Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Fri, 2 Oct 2020 15:11:16 -0400 Subject: [PATCH] Fix console log and add a test. --- .../step_screenshot_display.test.tsx | 74 ++++++++++++++++++- .../uptime/public/state/selectors/index.ts | 5 +- 2 files changed, 74 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/uptime/public/components/monitor/synthetics/__tests__/step_screenshot_display.test.tsx b/x-pack/plugins/uptime/public/components/monitor/synthetics/__tests__/step_screenshot_display.test.tsx index 5b3eca6727eb90..16db430dbd73a1 100644 --- a/x-pack/plugins/uptime/public/components/monitor/synthetics/__tests__/step_screenshot_display.test.tsx +++ b/x-pack/plugins/uptime/public/components/monitor/synthetics/__tests__/step_screenshot_display.test.tsx @@ -16,7 +16,6 @@ describe('StepScreenshotDisplayProps', () => { })); it('displays screenshot thumbnail when present', () => { - // reactUseSpy. const wrapper = mountWithIntl( { `); }); + it('uses alternative text when step name not available', () => { + const wrapper = mountWithIntl( + + ); + + wrapper.update(); + + expect(wrapper.find('EuiPopover')).toMatchInlineSnapshot(` + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={false} + panelPaddingSize="m" + > + +
+
+ +
+
+
+
+ `); + }); + it('displays No Image message when screenshot does not exist', () => { expect( shallowWithIntl( diff --git a/x-pack/plugins/uptime/public/state/selectors/index.ts b/x-pack/plugins/uptime/public/state/selectors/index.ts index 7acb3befa0d6b5..6bfe67468aae58 100644 --- a/x-pack/plugins/uptime/public/state/selectors/index.ts +++ b/x-pack/plugins/uptime/public/state/selectors/index.ts @@ -95,7 +95,4 @@ export const selectedFiltersSelector = ({ selectedFilters }: AppState) => select export const monitorIdSelector = ({ ui: { monitorId } }: AppState) => monitorId; -export const journeySelector = ({ journeys }: AppState) => { - console.log('journeys', journeys); - return journeys; -}; +export const journeySelector = ({ journeys }: AppState) => journeys;