Remove release announcements for new sounds & room list (#31544)

* Remove release announcements for new sounds & room list

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-12-19 14:40:44 +00:00
committed by GitHub
parent 71c5b71f5c
commit c37fef459d
14 changed files with 107 additions and 225 deletions

View File

@@ -25,7 +25,8 @@ test.describe("Release announcement", () => {
labsFlags: ["feature_new_room_list"],
});
test(
// There is no release announcement currently live
test.skip(
"should display the new room list release announcement",
{ tag: "@screenshot" },
async ({ page, app, room, util }) => {

View File

@@ -23,7 +23,6 @@ import {
useRoomListHeaderViewModel,
} from "../../../viewmodels/roomlist/RoomListHeaderViewModel";
import { RoomListOptionsMenu } from "./RoomListOptionsMenu";
import { ReleaseAnnouncement } from "../../../structures/ReleaseAnnouncement";
/**
* The header view for the room list
@@ -46,38 +45,23 @@ export function RoomListHeaderView(): JSX.Element {
{vm.displaySpaceMenu && <SpaceMenu vm={vm} />}
</Flex>
<Flex align="center" gap="var(--cpd-space-2x)">
<ReleaseAnnouncement
feature="newRoomList_sort"
header={_t("room_list|release_announcement|sort|title")}
description={_t("room_list|release_announcement|sort|description")}
closeLabel={_t("room_list|release_announcement|next")}
placement="bottom"
>
<div className="mx_RoomListHeaderView_ReleaseAnnouncementAnchor">
<RoomListOptionsMenu vm={vm} />
</div>
</ReleaseAnnouncement>
<div className="mx_RoomListHeaderView_ReleaseAnnouncementAnchor">
<RoomListOptionsMenu vm={vm} />
</div>
{/* If we don't display the compose menu, it means that the user can only send DM */}
<ReleaseAnnouncement
feature="newRoomList_intro"
header={_t("room_list|release_announcement|intro|title")}
description={_t("room_list|release_announcement|intro|description")}
closeLabel={_t("room_list|release_announcement|next")}
>
<div className="mx_RoomListHeaderView_ReleaseAnnouncementAnchor">
{vm.displayComposeMenu ? (
<ComposeMenu vm={vm} />
) : (
<IconButton
onClick={(e) => vm.createChatRoom(e.nativeEvent)}
tooltip={_t("action|new_conversation")}
>
<ComposeIcon color="var(--cpd-color-icon-secondary)" aria-hidden />
</IconButton>
)}
</div>
</ReleaseAnnouncement>
<div className="mx_RoomListHeaderView_ReleaseAnnouncementAnchor">
{vm.displayComposeMenu ? (
<ComposeMenu vm={vm} />
) : (
<IconButton
onClick={(e) => vm.createChatRoom(e.nativeEvent)}
tooltip={_t("action|new_conversation")}
>
<ComposeIcon color="var(--cpd-color-icon-secondary)" aria-hidden />
</IconButton>
)}
</div>
</Flex>
</Flex>
);

View File

@@ -11,8 +11,6 @@ import { useRoomListViewModel } from "../../../viewmodels/roomlist/RoomListViewM
import { RoomList } from "./RoomList";
import { EmptyRoomList } from "./EmptyRoomList";
import { RoomListPrimaryFilters } from "./RoomListPrimaryFilters";
import { _t } from "../../../../languageHandler";
import { ReleaseAnnouncement } from "../../../structures/ReleaseAnnouncement";
/**
* Host the room list and the (future) room filters
@@ -30,17 +28,9 @@ export function RoomListView(): JSX.Element {
}
return (
<>
<ReleaseAnnouncement
feature="newRoomList_filter"
header={_t("room_list|release_announcement|filter|title")}
description={_t("room_list|release_announcement|filter|description")}
closeLabel={_t("room_list|release_announcement|next")}
placement="right"
>
<div>
<RoomListPrimaryFilters vm={vm} />
</div>
</ReleaseAnnouncement>
<div>
<RoomListPrimaryFilters vm={vm} />
</div>
{listBody}
</>
);

View File

@@ -31,7 +31,6 @@ import QuickThemeSwitcher from "./QuickThemeSwitcher";
import Modal from "../../../Modal";
import DevtoolsDialog from "../dialogs/DevtoolsDialog";
import { SdkContextClass } from "../../../contexts/SDKContext";
import { ReleaseAnnouncement } from "../../structures/ReleaseAnnouncement";
const QuickSettingsButton: React.FC<{
isPanelCollapsed: boolean;
@@ -169,16 +168,7 @@ const QuickSettingsButton: React.FC<{
return (
<>
<ReleaseAnnouncement
feature="newRoomList_settings"
header={_t("room_list|release_announcement|settings|title")}
description={_t("room_list|release_announcement|settings|description")}
closeLabel={_t("room_list|release_announcement|done")}
placement="right"
>
{button}
</ReleaseAnnouncement>
{button}
{contextMenu}
</>
);

View File

@@ -79,7 +79,6 @@ import { Landmark, LandmarkNavigation } from "../../../accessibility/LandmarkNav
import { KeyboardShortcut } from "../settings/KeyboardShortcut";
import { ModuleApi } from "../../../modules/Api.ts";
import { useModuleSpacePanelItems } from "../../../modules/ExtrasApi.ts";
import { ReleaseAnnouncement } from "../../structures/ReleaseAnnouncement";
const useSpaces = (): [Room[], MetaSpace[], Room[], SpaceKey] => {
const invites = useEventEmitterState<Room[]>(SpaceStore.instance, UPDATE_INVITED_SPACES, () => {
@@ -415,74 +414,65 @@ const SpacePanel: React.FC = () => {
onDragEndHandler();
}}
>
<ReleaseAnnouncement
feature="newNotificationSounds"
header={_t("settings|notifications|sounds_release_announcement|title")}
description={_t("settings|notifications|sounds_release_announcement|description")}
closeLabel={_t("action|ok")}
displayArrow={false}
placement="right-start"
<nav
className={classNames("mx_SpacePanel", {
collapsed: isPanelCollapsed,
newUi: newRoomListEnabled,
})}
onKeyDown={(ev) => {
const navAction = getKeyBindingsManager().getNavigationAction(ev);
if (
navAction === KeyBindingAction.NextLandmark ||
navAction === KeyBindingAction.PreviousLandmark
) {
LandmarkNavigation.findAndFocusNextLandmark(
Landmark.ACTIVE_SPACE_BUTTON,
navAction === KeyBindingAction.PreviousLandmark,
);
ev.stopPropagation();
ev.preventDefault();
return;
}
onKeyDownHandler(ev);
}}
ref={ref}
aria-label={_t("common|spaces")}
>
<nav
className={classNames("mx_SpacePanel", {
collapsed: isPanelCollapsed,
newUi: newRoomListEnabled,
})}
onKeyDown={(ev) => {
const navAction = getKeyBindingsManager().getNavigationAction(ev);
if (
navAction === KeyBindingAction.NextLandmark ||
navAction === KeyBindingAction.PreviousLandmark
) {
LandmarkNavigation.findAndFocusNextLandmark(
Landmark.ACTIVE_SPACE_BUTTON,
navAction === KeyBindingAction.PreviousLandmark,
);
ev.stopPropagation();
ev.preventDefault();
return;
<UserMenu isPanelCollapsed={isPanelCollapsed}>
<AccessibleButton
className={classNames("mx_SpacePanel_toggleCollapse", {
expanded: !isPanelCollapsed,
})}
onClick={() => setPanelCollapsed(!isPanelCollapsed)}
title={isPanelCollapsed ? _t("action|expand") : _t("action|collapse")}
caption={
<KeyboardShortcut
value={{ ctrlOrCmdKey: true, shiftKey: true, key: "d" }}
className="mx_SpacePanel_Tooltip_KeyboardShortcut"
/>
}
onKeyDownHandler(ev);
}}
ref={ref}
aria-label={_t("common|spaces")}
>
<UserMenu isPanelCollapsed={isPanelCollapsed}>
<AccessibleButton
className={classNames("mx_SpacePanel_toggleCollapse", {
expanded: !isPanelCollapsed,
})}
onClick={() => setPanelCollapsed(!isPanelCollapsed)}
title={isPanelCollapsed ? _t("action|expand") : _t("action|collapse")}
caption={
<KeyboardShortcut
value={{ ctrlOrCmdKey: true, shiftKey: true, key: "d" }}
className="mx_SpacePanel_Tooltip_KeyboardShortcut"
/>
}
>
<ChevronRightIcon />
</AccessibleButton>
</UserMenu>
<Droppable droppableId="top-level-spaces">
{(provided, snapshot) => (
<InnerSpacePanel
{...provided.droppableProps}
isPanelCollapsed={isPanelCollapsed}
setPanelCollapsed={setPanelCollapsed}
isDraggingOver={snapshot.isDraggingOver}
innerRef={provided.innerRef}
>
<ChevronRightIcon />
</AccessibleButton>
</UserMenu>
<Droppable droppableId="top-level-spaces">
{(provided, snapshot) => (
<InnerSpacePanel
{...provided.droppableProps}
isPanelCollapsed={isPanelCollapsed}
setPanelCollapsed={setPanelCollapsed}
isDraggingOver={snapshot.isDraggingOver}
innerRef={provided.innerRef}
>
{provided.placeholder}
</InnerSpacePanel>
)}
</Droppable>
{provided.placeholder}
</InnerSpacePanel>
)}
</Droppable>
<ThreadsActivityCentre displayButtonLabel={!isPanelCollapsed} />
<ThreadsActivityCentre displayButtonLabel={!isPanelCollapsed} />
<QuickSettingsButton isPanelCollapsed={isPanelCollapsed} />
</nav>
</ReleaseAnnouncement>
<QuickSettingsButton isPanelCollapsed={isPanelCollapsed} />
</nav>
</DragDropContext>
)}
</RovingTabIndexProvider>

View File

@@ -2219,26 +2219,6 @@
"one": "Currently removing messages in %(count)s room",
"other": "Currently removing messages in %(count)s rooms"
},
"release_announcement": {
"done": "Done",
"filter": {
"description": "Filter your chats with a single click. Expand to view more filters.",
"title": "New quick filters"
},
"intro": {
"description": "The chats list has been updated to be more clear and simple to use.",
"title": "Chats has a new look!"
},
"next": "Next",
"settings": {
"description": "To show or hide message previews, go to All settings > Preferences > Room list",
"title": "Some settings have moved"
},
"sort": {
"description": "Change the ordering of your chats from most recent to A-Z",
"title": "Sort your chats"
}
},
"room": {
"more_options": "More Options",
"open_room": "Open room %(roomName)s"
@@ -2908,10 +2888,6 @@
"rule_suppress_notices": "Messages sent by bot",
"rule_tombstone": "When rooms are upgraded",
"show_message_desktop_notification": "Show message in desktop notification",
"sounds_release_announcement": {
"description": "Your notification ping and call ringer have been updated—clearer, quicker, and less disruptive",
"title": "Weve refreshed your sounds"
},
"voip": "Audio and Video calls"
},
"preferences": {

View File

@@ -17,14 +17,10 @@ import ToastStore from "./ToastStore";
/**
* The features are shown in the array order.
* We include a `_test_dummy` value to enable tests to function even where there are no running release announcements.
* This value must be at the end of the list.
*/
const FEATURES = [
"newNotificationSounds",
"newRoomList_intro",
"newRoomList_sort",
"newRoomList_filter",
"newRoomList_settings",
] as const;
const FEATURES = ["_test_dummy1", "_test_dummy2"] as const;
/**
* All the features that can be shown in the release announcements.
*/

View File

@@ -22,12 +22,7 @@ describe("ReleaseAnnouncement", () => {
function renderReleaseAnnouncement() {
return render(
<ReleaseAnnouncement
feature="newNotificationSounds"
header="header"
description="description"
closeLabel="close"
>
<ReleaseAnnouncement feature="_test_dummy1" header="header" description="description" closeLabel="close">
<div>content</div>
</ReleaseAnnouncement>,
);

View File

@@ -25,7 +25,7 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
class="_icon-button_1pz9o_8 mx_SpaceMenu_button"
data-kind="primary"
data-state="closed"
id="radix-_r_q_"
id="radix-_r_i_"
role="button"
style="--cpd-icon-button-size: 20px;"
tabindex="0"
@@ -55,7 +55,6 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
@@ -63,11 +62,11 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
aria-expanded="false"
aria-haspopup="menu"
aria-label="Room Options"
aria-labelledby="_r_12_"
aria-labelledby="_r_m_"
class="_icon-button_1pz9o_8"
data-kind="primary"
data-state="closed"
id="radix-_r_10_"
id="radix-_r_k_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
@@ -93,18 +92,17 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
</button>
</div>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
aria-disabled="false"
aria-expanded="false"
aria-haspopup="menu"
aria-labelledby="_r_1d_"
aria-labelledby="_r_t_"
class="_icon-button_1pz9o_8"
data-kind="primary"
data-state="closed"
id="radix-_r_1b_"
id="radix-_r_r_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
@@ -165,7 +163,7 @@ exports[`<RoomListHeaderView /> compose menu should not display the compose menu
class="_icon-button_1pz9o_8 mx_SpaceMenu_button"
data-kind="primary"
data-state="closed"
id="radix-_r_1k_"
id="radix-_r_14_"
role="button"
style="--cpd-icon-button-size: 20px;"
tabindex="0"
@@ -195,7 +193,6 @@ exports[`<RoomListHeaderView /> compose menu should not display the compose menu
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
@@ -203,11 +200,11 @@ exports[`<RoomListHeaderView /> compose menu should not display the compose menu
aria-expanded="false"
aria-haspopup="menu"
aria-label="Room Options"
aria-labelledby="_r_1s_"
aria-labelledby="_r_18_"
class="_icon-button_1pz9o_8"
data-kind="primary"
data-state="closed"
id="radix-_r_1q_"
id="radix-_r_16_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
@@ -233,11 +230,10 @@ exports[`<RoomListHeaderView /> compose menu should not display the compose menu
</button>
</div>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
aria-labelledby="_r_25_"
aria-labelledby="_r_1d_"
class="_icon-button_1pz9o_8"
data-kind="primary"
role="button"
@@ -329,7 +325,6 @@ exports[`<RoomListHeaderView /> should render 'room options' button 1`] = `
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
@@ -337,11 +332,11 @@ exports[`<RoomListHeaderView /> should render 'room options' button 1`] = `
aria-expanded="false"
aria-haspopup="menu"
aria-label="Room Options"
aria-labelledby="_r_8_"
aria-labelledby="_r_4_"
class="_icon-button_1pz9o_8"
data-kind="primary"
data-state="closed"
id="radix-_r_6_"
id="radix-_r_2_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
@@ -367,18 +362,17 @@ exports[`<RoomListHeaderView /> should render 'room options' button 1`] = `
</button>
</div>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
aria-disabled="false"
aria-expanded="false"
aria-haspopup="menu"
aria-labelledby="_r_j_"
aria-labelledby="_r_b_"
class="_icon-button_1pz9o_8"
data-kind="primary"
data-state="closed"
id="radix-_r_h_"
id="radix-_r_9_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
@@ -439,7 +433,7 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
class="_icon-button_1pz9o_8 mx_SpaceMenu_button"
data-kind="primary"
data-state="closed"
id="radix-_r_4e_"
id="radix-_r_36_"
role="button"
style="--cpd-icon-button-size: 20px;"
tabindex="0"
@@ -469,7 +463,6 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
@@ -477,11 +470,11 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
aria-expanded="false"
aria-haspopup="menu"
aria-label="Room Options"
aria-labelledby="_r_4m_"
aria-labelledby="_r_3a_"
class="_icon-button_1pz9o_8"
data-kind="primary"
data-state="closed"
id="radix-_r_4k_"
id="radix-_r_38_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
@@ -507,18 +500,17 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
</button>
</div>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
aria-disabled="false"
aria-expanded="false"
aria-haspopup="menu"
aria-labelledby="_r_51_"
aria-labelledby="_r_3h_"
class="_icon-button_1pz9o_8"
data-kind="primary"
data-state="closed"
id="radix-_r_4v_"
id="radix-_r_3f_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
@@ -577,7 +569,6 @@ exports[`<RoomListHeaderView /> space menu should not display the space menu 1`]
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
@@ -585,11 +576,11 @@ exports[`<RoomListHeaderView /> space menu should not display the space menu 1`]
aria-expanded="false"
aria-haspopup="menu"
aria-label="Room Options"
aria-labelledby="_r_5e_"
aria-labelledby="_r_3q_"
class="_icon-button_1pz9o_8"
data-kind="primary"
data-state="closed"
id="radix-_r_5c_"
id="radix-_r_3o_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
@@ -615,18 +606,17 @@ exports[`<RoomListHeaderView /> space menu should not display the space menu 1`]
</button>
</div>
<div
aria-haspopup="dialog"
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
>
<button
aria-disabled="false"
aria-expanded="false"
aria-haspopup="menu"
aria-labelledby="_r_5p_"
aria-labelledby="_r_41_"
class="_icon-button_1pz9o_8"
data-kind="primary"
data-state="closed"
id="radix-_r_5n_"
id="radix-_r_3v_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"

View File

@@ -4,7 +4,6 @@ exports[`QuickSettingsButton should render the quick settings button in expanded
<DocumentFragment>
<button
aria-expanded="true"
aria-haspopup="dialog"
aria-label="Quick settings"
class="_icon-button_1pz9o_8 mx_QuickSettingsButton expanded"
data-kind="primary"

View File

@@ -3,12 +3,8 @@
exports[`<SpacePanel /> should show all activated MetaSpaces in the correct order 1`] = `
<DocumentFragment>
<nav
aria-controls="_r_2_"
aria-describedby="_r_2_"
aria-haspopup="dialog"
aria-label="Spaces"
class="mx_SpacePanel collapsed newUi"
data-floating-ui-inert=""
>
<div
class="mx_UserMenu"
@@ -336,11 +332,11 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
aria-expanded="false"
aria-haspopup="menu"
aria-label="Threads"
aria-labelledby="_r_16_"
aria-labelledby="_r_12_"
class="_icon-button_1pz9o_8 mx_ThreadsActivityCentreButton"
data-kind="primary"
data-state="closed"
id="radix-_r_14_"
id="radix-_r_10_"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
@@ -368,7 +364,7 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
<button
aria-expanded="false"
aria-label="Quick settings"
aria-labelledby="_r_1f_"
aria-labelledby="_r_17_"
class="_icon-button_1pz9o_8 mx_QuickSettingsButton"
data-kind="primary"
role="button"
@@ -394,30 +390,5 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
</div>
</button>
</nav>
<span
aria-hidden="true"
data-floating-ui-inert=""
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
tabindex="-1"
/>
<span
data-floating-ui-focus-guard=""
data-type="outside"
role="button"
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
tabindex="0"
/>
<span
aria-owns="_r_1k_"
data-floating-ui-inert=""
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
/>
<span
data-floating-ui-focus-guard=""
data-type="outside"
role="button"
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
tabindex="0"
/>
</DocumentFragment>
`;

View File

@@ -117,13 +117,13 @@ describe("ReleaseAnnouncementStore", () => {
it("should listen to release announcement data changes in the store", async () => {
const secondStore = new ReleaseAnnouncementStore();
expect(secondStore.getReleaseAnnouncement()).toBe("newNotificationSounds");
expect(secondStore.getReleaseAnnouncement()).toBe("_test_dummy1");
const promise = listenReleaseAnnouncementChanged();
await secondStore.nextReleaseAnnouncement();
expect(await promise).toBe("newRoomList_intro");
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("newRoomList_intro");
expect(await promise).toBe("_test_dummy2");
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("_test_dummy2");
});
it("should return null when there are toasts on screen", async () => {