Skip to content

Commit 921e6e3

Browse files
committed
chore: remove some tests
1 parent 6ee150d commit 921e6e3

File tree

1 file changed

+0
-67
lines changed

1 file changed

+0
-67
lines changed

e2e/navigate-long-message-lists.test.ts

-67
Original file line numberDiff line numberDiff line change
@@ -185,71 +185,4 @@ test.describe('scroll to the bottom', () => {
185185
.sees(MessageList)
186186
.isScrolledToBottom(`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageListContainer}`);
187187
});
188-
189-
test('after loading more messages on new message notification click', async ({
190-
controller,
191-
page,
192-
user,
193-
}) => {
194-
// scroll without loading more messages
195-
await scrollInSteps(user);
196-
197-
// trigger load more messages
198-
const firstLoadedMessage = await page.locator(
199-
`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageListContainer} li:first-of-type`,
200-
);
201-
await firstLoadedMessage.scrollIntoViewIfNeeded();
202-
await controller.sendOtherUserMessage();
203-
204-
// click the notification
205-
await page.waitForSelector(getMessageNotificationSelector(NEW_MESSAGE_NOTIFICATION_TEXT));
206-
await user.clicks(MessageNotification).text(NEW_MESSAGE_NOTIFICATION_TEXT);
207-
208-
// check that you are at the bottom
209-
await user
210-
.sees(MessageList)
211-
.isScrolledToBottom(`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageListContainer}`);
212-
});
213-
});
214-
215-
test.describe('pagination', () => {
216-
test.beforeEach(async ({ controller, user }) => {
217-
await controller.openStory(
218-
'navigate-long-message-lists--user1',
219-
selectors.channelPreviewButton,
220-
);
221-
await user.clicks(ChannelPreview).text(CHANNEL_NAME);
222-
});
223-
224-
test('does not lead to the viewport content change', async ({ page, user }) => {
225-
const messageList = await page.locator(`${USER1_CHAT_VIEW_CLASSNAME} ${selectors.messageList}`);
226-
227-
const firstMessageFirstPage = await user.get(Message)(FIRST_MESSAGE_FIRST_PAGE);
228-
229-
let firstLoadedMessageBoxBeforePagination;
230-
const msgListBoxBeforePagination = await messageList.boundingBox();
231-
232-
// get message position before the next page of messages is received
233-
page.once('request', async () => {
234-
firstLoadedMessageBoxBeforePagination = await firstMessageFirstPage.boundingBox();
235-
});
236-
237-
await Promise.all([
238-
page.waitForResponse((r) => r.url().includes('/query') && r.ok()),
239-
firstMessageFirstPage.scrollIntoViewIfNeeded(),
240-
]);
241-
242-
const msgListBoxAfterPagination = await messageList.boundingBox();
243-
const firstLoadedMessageBoxAfterPagination = await firstMessageFirstPage.boundingBox();
244-
245-
const firstMessageShiftDistanceYToViewport =
246-
firstLoadedMessageBoxBeforePagination.y - firstLoadedMessageBoxAfterPagination.y;
247-
expect(firstMessageShiftDistanceYToViewport).toBeLessThanOrEqual(
248-
firstLoadedMessageBoxBeforePagination.height,
249-
);
250-
expect(firstMessageShiftDistanceYToViewport).toBeGreaterThanOrEqual(
251-
-firstLoadedMessageBoxBeforePagination.height,
252-
);
253-
expect(msgListBoxBeforePagination.height).not.toStrictEqual(msgListBoxAfterPagination.height);
254-
});
255188
});

0 commit comments

Comments
 (0)