From 1456257821f7ffc8bceec58626090073509c4e1b Mon Sep 17 00:00:00 2001 From: Anton Arnautov Date: Mon, 5 Aug 2024 13:46:54 +0200 Subject: [PATCH] Adjust test snapshots --- .../Avatar/__tests__/Avatar.test.js | 23 ++++++++++++++----- .../ChannelPreviewMessenger.test.js.snap | 1 + .../__snapshots__/MessageStatus.test.js.snap | 1 + .../VirtualizedMessageListComponents.test.js | 11 ++++++++- ...tualizedMessageListComponents.test.js.snap | 3 +++ .../UserItem/__tests__/UserItem.test.js | 20 ++++++++++++---- 6 files changed, 47 insertions(+), 12 deletions(-) diff --git a/src/components/Avatar/__tests__/Avatar.test.js b/src/components/Avatar/__tests__/Avatar.test.js index e2ed64954..b45990d7c 100644 --- a/src/components/Avatar/__tests__/Avatar.test.js +++ b/src/components/Avatar/__tests__/Avatar.test.js @@ -16,15 +16,25 @@ describe('Avatar', () => { const tree = renderer.create().toJSON(); expect(tree).toMatchInlineSnapshot(`
-
+ + +
`); }); @@ -33,10 +43,11 @@ describe('Avatar', () => { const tree = renderer.create().toJSON(); expect(tree).toMatchInlineSnapshot(`
{ it('should not render custom head in Header when not loading more messages', () => { const context = { head }; const { container } = renderElements(
); - expect(container).toMatchInlineSnapshot(`
`); + expect(container).toMatchInlineSnapshot(` +
+
+ Custom head +
+
+ `); }); it('should render custom LoadingIndicator instead of head when loading more', () => { @@ -150,6 +156,9 @@ describe('VirtualizedMessageComponents', () => { const { container } = renderElements(
, componentContext); expect(container).toMatchInlineSnapshot(`
+
+ Custom head +
diff --git a/src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageListComponents.test.js.snap b/src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageListComponents.test.js.snap index 47619c06a..2054e8874 100644 --- a/src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageListComponents.test.js.snap +++ b/src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageListComponents.test.js.snap @@ -50,6 +50,9 @@ exports[`VirtualizedMessageComponents EmptyPlaceholder should render for main me exports[`VirtualizedMessageComponents Header should not render custom head in Header when loading more messages, but the LoadingIndicator 1`] = `
+
+ Custom head +
diff --git a/src/components/UserItem/__tests__/UserItem.test.js b/src/components/UserItem/__tests__/UserItem.test.js index aaf7527c7..1e6461f27 100644 --- a/src/components/UserItem/__tests__/UserItem.test.js +++ b/src/components/UserItem/__tests__/UserItem.test.js @@ -18,15 +18,25 @@ describe('UserItem', () => { className="str-chat__user-item" >
-
+ + +