Skip to content

Commit 6fe9522

Browse files
authored
Merge pull request #1621 from GetStream/develop
v9.1.1
2 parents df293e5 + 3d34245 commit 6fe9522

31 files changed

+414
-1629
lines changed

β€Ž.env.exampleβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ E2E_TEST_USER_2='test-user-2'
66
E2E_TEST_USER_2_TOKEN='test-user-2-jwt'
77
E2E_JUMP_TO_MESSAGE_CHANNEL='jump-to-message'
88
E2E_ADD_MESSAGE_CHANNEL='add-message'
9-
E2E_ADDITIONAL_CHANNELS="mr-channel-1,mr-channel-2"
9+
E2E_ADDITIONAL_CHANNELS="mr-channel-1,mr-channel-2,edit-message-channel"
1010
E2E_LONG_MESSAGE_LISTS_CHANNEL='navigate-long-message-lists'

β€Ž.ladle/components.tsxβ€Ž

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
import type { GlobalProvider } from "@ladle/react";
1+
import type { GlobalProvider } from '@ladle/react';
22
import React from 'react';
33

4-
import "./styles.css";
4+
import './styles.css';
55

66
// https://ladle.dev/docs/providers
77
// At the moment used to provide the styles from ./styles.css to all the stories
8-
export const Provider: GlobalProvider = ({ children }) => (
9-
<>
10-
{children}
11-
</>
12-
);
8+
export const Provider: GlobalProvider = ({ children }) => <>{children}</>;

β€Že2e/navigate-long-message-lists.test.tsβ€Ž

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test.describe('thread autoscroll', () => {
2525
);
2626
await user.clicks(ChannelPreview).text(CHANNEL_NAME);
2727
await Promise.all([
28-
page.waitForResponse((r) => r.url().includes('/messages') && r.ok()),
28+
page.waitForResponse((r) => r.url().includes('/replies') && r.ok()),
2929
user.clicks(Thread).open('replies'),
3030
]);
3131
});
@@ -45,45 +45,36 @@ test.describe('thread autoscroll', () => {
4545
});
4646

4747
test('only if I send a message', async ({ page, user }) => {
48-
let thread = await user.get(Thread)(USER1_CHAT_VIEW_CLASSNAME);
49-
const messageData = await thread.locator(selectors.messageData);
50-
const avatars = await thread.locator(selectors.avatar);
48+
const thread = user.get(Thread)(USER1_CHAT_VIEW_CLASSNAME);
49+
const avatars = thread.locator(selectors.avatar);
5150

52-
await Promise.all([
53-
page.waitForResponse((r) => r.url().includes('/replies') && r.ok()),
54-
expect(thread).toHaveScreenshot({
55-
mask: [messageData, avatars],
56-
}),
57-
]);
51+
await expect(thread).toHaveScreenshot({
52+
mask: [avatars],
53+
});
5854

5955
await Promise.all([
6056
page.waitForResponse((r) => r.url().includes('/message') && r.ok()),
6157
user.submits(MessageInput).reply(MY_ADDED_REPLY_TEXT),
6258
]);
6359

6460
await expect(thread).toHaveScreenshot({
65-
mask: [messageData, avatars],
61+
mask: [avatars],
6662
});
6763
});
6864

6965
test('not if I receive a message', async ({ controller, page, user }) => {
70-
const thread = await user.get(Thread)(USER1_CHAT_VIEW_CLASSNAME);
71-
const messageData = await thread.locator(selectors.messageData);
72-
const avatars = await thread.locator(selectors.avatar);
73-
74-
await Promise.all([
75-
page.waitForResponse((r) => r.url().includes('/replies') && r.ok()),
76-
expect(thread).toHaveScreenshot({
77-
mask: [messageData, avatars],
78-
}),
79-
]);
66+
const thread = user.get(Thread)(USER1_CHAT_VIEW_CLASSNAME);
67+
const avatars = thread.locator(selectors.avatar);
8068

69+
await expect(thread).toHaveScreenshot({
70+
mask: [avatars],
71+
});
8172
await Promise.all([
8273
page.waitForResponse((r) => r.url().includes('/message') && r.ok()),
8374
await controller.sendOtherUserReply(),
8475
]);
8576
await expect(thread).toHaveScreenshot({
86-
mask: [messageData, avatars],
77+
mask: [avatars],
8778
});
8879
});
8980
});
247 Bytes
Loading
104 Bytes
Loading
470 Bytes
Loading
247 Bytes
Loading
104 Bytes
Loading
470 Bytes
Loading
247 Bytes
Loading

0 commit comments

Comments
Β (0)