Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/src/end-to-end/emojipicker/emojipicker.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,13 @@ describe("Check Emoji Picker Functionality", () => {
] as const) {
if (top === 0) {
await userEvent.keyboard("{ArrowDown}".repeat(12));
// Wait for the final row to mount and its keyboard scroll to finish
// before testing manual scrolling; key delivery alone doesn't wait
// for Frimousse's virtualization and the selection effect.
await waitForSelector(
'[aria-rowindex="13"] .bn-frimousse-emoji[data-selected]',
);
await waitForSelectedEmoji();
await scrollTo(0);
}
await vi.waitFor(() => {
Expand Down Expand Up @@ -538,7 +545,7 @@ describe("Check Emoji Picker Functionality", () => {
test("should scroll to a mounted emoji without estimating its position", async () => {
await focusOnEditor();
await userEvent.keyboard(":an");
await waitForSelector(".bn-frimousse-emoji[data-selected]");
await waitForSelectedEmoji();
const viewport = await waitForSelector("[frimousse-viewport]");
viewport.scrollTop = 96;
for (let frame = 0; frame < 3; frame++) {
Expand Down
Loading