Add release announcement for the sounds (#30900)
* Add release announcement for sounds * Update jest test and snapshots * lint * Update e2e test * Add screenshot * Fix order * Fix snapshots
This commit is contained in:
@@ -32,20 +32,26 @@ test.describe("Release announcement", () => {
|
|||||||
// dismiss the toast so the announcement appears
|
// dismiss the toast so the announcement appears
|
||||||
await page.getByRole("button", { name: "Dismiss" }).click();
|
await page.getByRole("button", { name: "Dismiss" }).click();
|
||||||
|
|
||||||
const name = "Chats has a new look!";
|
const newSoundsName = "We’ve refreshed your sounds";
|
||||||
|
// The new sounds release announcement should be displayed
|
||||||
|
await util.assertReleaseAnnouncementIsVisible(newSoundsName);
|
||||||
|
// Hide the new sounds release announcement
|
||||||
|
const newSoundsDialog = util.getReleaseAnnouncement(newSoundsName);
|
||||||
|
await newSoundsDialog.getByRole("button", { name: "OK" }).click();
|
||||||
|
|
||||||
// The release announcement should be displayed
|
const newRoomListName = "Chats has a new look!";
|
||||||
await util.assertReleaseAnnouncementIsVisible(name);
|
// The new room list release announcement should be displayed
|
||||||
// Hide the release announcement
|
await util.assertReleaseAnnouncementIsVisible(newRoomListName);
|
||||||
const dialog = util.getReleaseAnnouncement(name);
|
// Hide the new room list release announcement
|
||||||
|
const dialog = util.getReleaseAnnouncement(newRoomListName);
|
||||||
await dialog.getByRole("button", { name: "Next" }).click();
|
await dialog.getByRole("button", { name: "Next" }).click();
|
||||||
|
|
||||||
await util.assertReleaseAnnouncementIsNotVisible(name);
|
await util.assertReleaseAnnouncementIsNotVisible(newRoomListName);
|
||||||
|
|
||||||
await page.reload();
|
await page.reload();
|
||||||
await expect(page.getByRole("button", { name: "Room options" })).toBeVisible();
|
await expect(page.getByRole("button", { name: "Room options" })).toBeVisible();
|
||||||
// Check that once the release announcement has been marked as viewed, it does not appear again
|
// Check that once the release announcements has been marked as viewed, it does not appear again
|
||||||
await util.assertReleaseAnnouncementIsNotVisible(name);
|
await util.assertReleaseAnnouncementIsNotVisible(newRoomListName);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
@@ -68,6 +68,7 @@ import { ThreadsActivityCentre } from "./threads-activity-centre/";
|
|||||||
import AccessibleButton from "../elements/AccessibleButton";
|
import AccessibleButton from "../elements/AccessibleButton";
|
||||||
import { Landmark, LandmarkNavigation } from "../../../accessibility/LandmarkNavigation";
|
import { Landmark, LandmarkNavigation } from "../../../accessibility/LandmarkNavigation";
|
||||||
import { KeyboardShortcut } from "../settings/KeyboardShortcut";
|
import { KeyboardShortcut } from "../settings/KeyboardShortcut";
|
||||||
|
import { ReleaseAnnouncement } from "../../structures/ReleaseAnnouncement";
|
||||||
|
|
||||||
const useSpaces = (): [Room[], MetaSpace[], Room[], SpaceKey] => {
|
const useSpaces = (): [Room[], MetaSpace[], Room[], SpaceKey] => {
|
||||||
const invites = useEventEmitterState<Room[]>(SpaceStore.instance, UPDATE_INVITED_SPACES, () => {
|
const invites = useEventEmitterState<Room[]>(SpaceStore.instance, UPDATE_INVITED_SPACES, () => {
|
||||||
@@ -379,61 +380,72 @@ const SpacePanel: React.FC = () => {
|
|||||||
onDragEndHandler();
|
onDragEndHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<nav
|
<ReleaseAnnouncement
|
||||||
className={classNames("mx_SpacePanel", {
|
feature="newNotificationSounds"
|
||||||
collapsed: isPanelCollapsed,
|
header={_t("settings|notifications|sounds_release_announcement|title")}
|
||||||
newUi: newRoomListEnabled,
|
description={_t("settings|notifications|sounds_release_announcement|description")}
|
||||||
})}
|
closeLabel={_t("action|ok")}
|
||||||
onKeyDown={(ev) => {
|
displayArrow={false}
|
||||||
const navAction = getKeyBindingsManager().getNavigationAction(ev);
|
placement="right-start"
|
||||||
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")}
|
|
||||||
>
|
>
|
||||||
<UserMenu isPanelCollapsed={isPanelCollapsed}>
|
<nav
|
||||||
<AccessibleButton
|
className={classNames("mx_SpacePanel", {
|
||||||
className={classNames("mx_SpacePanel_toggleCollapse", { expanded: !isPanelCollapsed })}
|
collapsed: isPanelCollapsed,
|
||||||
onClick={() => setPanelCollapsed(!isPanelCollapsed)}
|
newUi: newRoomListEnabled,
|
||||||
title={isPanelCollapsed ? _t("action|expand") : _t("action|collapse")}
|
})}
|
||||||
caption={
|
onKeyDown={(ev) => {
|
||||||
<KeyboardShortcut
|
const navAction = getKeyBindingsManager().getNavigationAction(ev);
|
||||||
value={{ ctrlOrCmdKey: true, shiftKey: true, key: "d" }}
|
if (
|
||||||
className="mx_SpacePanel_Tooltip_KeyboardShortcut"
|
navAction === KeyBindingAction.NextLandmark ||
|
||||||
/>
|
navAction === KeyBindingAction.PreviousLandmark
|
||||||
|
) {
|
||||||
|
LandmarkNavigation.findAndFocusNextLandmark(
|
||||||
|
Landmark.ACTIVE_SPACE_BUTTON,
|
||||||
|
navAction === KeyBindingAction.PreviousLandmark,
|
||||||
|
);
|
||||||
|
ev.stopPropagation();
|
||||||
|
ev.preventDefault();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
/>
|
onKeyDownHandler(ev);
|
||||||
</UserMenu>
|
}}
|
||||||
<Droppable droppableId="top-level-spaces">
|
ref={ref}
|
||||||
{(provided, snapshot) => (
|
aria-label={_t("common|spaces")}
|
||||||
<InnerSpacePanel
|
>
|
||||||
{...provided.droppableProps}
|
<UserMenu isPanelCollapsed={isPanelCollapsed}>
|
||||||
isPanelCollapsed={isPanelCollapsed}
|
<AccessibleButton
|
||||||
setPanelCollapsed={setPanelCollapsed}
|
className={classNames("mx_SpacePanel_toggleCollapse", {
|
||||||
isDraggingOver={snapshot.isDraggingOver}
|
expanded: !isPanelCollapsed,
|
||||||
innerRef={provided.innerRef}
|
})}
|
||||||
>
|
onClick={() => setPanelCollapsed(!isPanelCollapsed)}
|
||||||
{provided.placeholder}
|
title={isPanelCollapsed ? _t("action|expand") : _t("action|collapse")}
|
||||||
</InnerSpacePanel>
|
caption={
|
||||||
)}
|
<KeyboardShortcut
|
||||||
</Droppable>
|
value={{ ctrlOrCmdKey: true, shiftKey: true, key: "d" }}
|
||||||
|
className="mx_SpacePanel_Tooltip_KeyboardShortcut"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</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>
|
||||||
|
|
||||||
<ThreadsActivityCentre displayButtonLabel={!isPanelCollapsed} />
|
<ThreadsActivityCentre displayButtonLabel={!isPanelCollapsed} />
|
||||||
|
|
||||||
<QuickSettingsButton isPanelCollapsed={isPanelCollapsed} />
|
<QuickSettingsButton isPanelCollapsed={isPanelCollapsed} />
|
||||||
</nav>
|
</nav>
|
||||||
|
</ReleaseAnnouncement>
|
||||||
</DragDropContext>
|
</DragDropContext>
|
||||||
)}
|
)}
|
||||||
</RovingTabIndexProvider>
|
</RovingTabIndexProvider>
|
||||||
|
|||||||
@@ -2860,6 +2860,10 @@
|
|||||||
"rule_suppress_notices": "Messages sent by bot",
|
"rule_suppress_notices": "Messages sent by bot",
|
||||||
"rule_tombstone": "When rooms are upgraded",
|
"rule_tombstone": "When rooms are upgraded",
|
||||||
"show_message_desktop_notification": "Show message in desktop notification",
|
"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": "We’ve refreshed your sounds"
|
||||||
|
},
|
||||||
"voip": "Audio and Video calls"
|
"voip": "Audio and Video calls"
|
||||||
},
|
},
|
||||||
"preferences": {
|
"preferences": {
|
||||||
|
|||||||
@@ -18,7 +18,13 @@ import ToastStore from "./ToastStore";
|
|||||||
/**
|
/**
|
||||||
* The features are shown in the array order.
|
* The features are shown in the array order.
|
||||||
*/
|
*/
|
||||||
const FEATURES = ["newRoomList_intro", "newRoomList_sort", "newRoomList_filter", "newRoomList_settings"] as const;
|
const FEATURES = [
|
||||||
|
"newNotificationSounds",
|
||||||
|
"newRoomList_intro",
|
||||||
|
"newRoomList_sort",
|
||||||
|
"newRoomList_filter",
|
||||||
|
"newRoomList_settings",
|
||||||
|
] as const;
|
||||||
/**
|
/**
|
||||||
* All the features that can be shown in the release announcements.
|
* All the features that can be shown in the release announcements.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ describe("ReleaseAnnouncement", () => {
|
|||||||
function renderReleaseAnnouncement() {
|
function renderReleaseAnnouncement() {
|
||||||
return render(
|
return render(
|
||||||
<ReleaseAnnouncement
|
<ReleaseAnnouncement
|
||||||
feature="newRoomList_intro"
|
feature="newNotificationSounds"
|
||||||
header="header"
|
header="header"
|
||||||
description="description"
|
description="description"
|
||||||
closeLabel="close"
|
closeLabel="close"
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="flex mx_RoomListHeaderView_title"
|
class="flex mx_RoomListHeaderView_title"
|
||||||
data-floating-ui-inert=""
|
|
||||||
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
||||||
>
|
>
|
||||||
<h1
|
<h1
|
||||||
@@ -26,7 +25,7 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
|
|||||||
class="_icon-button_1pz9o_8 mx_SpaceMenu_button"
|
class="_icon-button_1pz9o_8 mx_SpaceMenu_button"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«rm»"
|
id="radix-«rk»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 20px;"
|
style="--cpd-icon-button-size: 20px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -58,18 +57,17 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
|
|||||||
<div
|
<div
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="menu"
|
aria-haspopup="menu"
|
||||||
aria-label="Room Options"
|
aria-label="Room Options"
|
||||||
aria-labelledby="«ru»"
|
aria-labelledby="«rs»"
|
||||||
class="_icon-button_1pz9o_8"
|
class="_icon-button_1pz9o_8"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«rs»"
|
id="radix-«rq»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 32px;"
|
style="--cpd-icon-button-size: 32px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -95,11 +93,8 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
aria-controls="«r15»"
|
|
||||||
aria-describedby="«r15»"
|
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -109,7 +104,7 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
|
|||||||
class="_icon-button_1pz9o_8"
|
class="_icon-button_1pz9o_8"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«r17»"
|
id="radix-«r15»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 32px;"
|
style="--cpd-icon-button-size: 32px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -139,31 +134,6 @@ exports[`<RoomListHeaderView /> compose menu should display the compose menu 1`]
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<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="«r19»"
|
|
||||||
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"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</DocumentFragment>
|
</DocumentFragment>
|
||||||
@@ -179,7 +149,6 @@ exports[`<RoomListHeaderView /> compose menu should not display the compose menu
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="flex mx_RoomListHeaderView_title"
|
class="flex mx_RoomListHeaderView_title"
|
||||||
data-floating-ui-inert=""
|
|
||||||
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
||||||
>
|
>
|
||||||
<h1
|
<h1
|
||||||
@@ -195,7 +164,7 @@ exports[`<RoomListHeaderView /> compose menu should not display the compose menu
|
|||||||
class="_icon-button_1pz9o_8 mx_SpaceMenu_button"
|
class="_icon-button_1pz9o_8 mx_SpaceMenu_button"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«r1c»"
|
id="radix-«r18»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 20px;"
|
style="--cpd-icon-button-size: 20px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -227,18 +196,17 @@ exports[`<RoomListHeaderView /> compose menu should not display the compose menu
|
|||||||
<div
|
<div
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="menu"
|
aria-haspopup="menu"
|
||||||
aria-label="Room Options"
|
aria-label="Room Options"
|
||||||
aria-labelledby="«r1k»"
|
aria-labelledby="«r1g»"
|
||||||
class="_icon-button_1pz9o_8"
|
class="_icon-button_1pz9o_8"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«r1i»"
|
id="radix-«r1e»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 32px;"
|
style="--cpd-icon-button-size: 32px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -264,11 +232,8 @@ exports[`<RoomListHeaderView /> compose menu should not display the compose menu
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
aria-controls="«r1r»"
|
|
||||||
aria-describedby="«r1r»"
|
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-label="Start chat"
|
aria-label="Start chat"
|
||||||
@@ -302,31 +267,6 @@ exports[`<RoomListHeaderView /> compose menu should not display the compose menu
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<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="«r1t»"
|
|
||||||
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"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</DocumentFragment>
|
</DocumentFragment>
|
||||||
@@ -342,7 +282,6 @@ exports[`<RoomListHeaderView /> should render 'room options' button 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="flex mx_RoomListHeaderView_title"
|
class="flex mx_RoomListHeaderView_title"
|
||||||
data-floating-ui-inert=""
|
|
||||||
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
||||||
>
|
>
|
||||||
<h1
|
<h1
|
||||||
@@ -390,7 +329,6 @@ exports[`<RoomListHeaderView /> should render 'room options' button 1`] = `
|
|||||||
<div
|
<div
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -427,11 +365,8 @@ exports[`<RoomListHeaderView /> should render 'room options' button 1`] = `
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
aria-controls="«rf»"
|
|
||||||
aria-describedby="«rf»"
|
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -471,31 +406,6 @@ exports[`<RoomListHeaderView /> should render 'room options' button 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<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="«rj»"
|
|
||||||
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"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</DocumentFragment>
|
</DocumentFragment>
|
||||||
@@ -511,7 +421,6 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="flex mx_RoomListHeaderView_title"
|
class="flex mx_RoomListHeaderView_title"
|
||||||
data-floating-ui-inert=""
|
|
||||||
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
||||||
>
|
>
|
||||||
<h1
|
<h1
|
||||||
@@ -527,7 +436,7 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
|
|||||||
class="_icon-button_1pz9o_8 mx_SpaceMenu_button"
|
class="_icon-button_1pz9o_8 mx_SpaceMenu_button"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«r3q»"
|
id="radix-«r3g»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 20px;"
|
style="--cpd-icon-button-size: 20px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -559,18 +468,17 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
|
|||||||
<div
|
<div
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="menu"
|
aria-haspopup="menu"
|
||||||
aria-label="Room Options"
|
aria-label="Room Options"
|
||||||
aria-labelledby="«r42»"
|
aria-labelledby="«r3o»"
|
||||||
class="_icon-button_1pz9o_8"
|
class="_icon-button_1pz9o_8"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«r40»"
|
id="radix-«r3m»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 32px;"
|
style="--cpd-icon-button-size: 32px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -596,11 +504,8 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
aria-controls="«r49»"
|
|
||||||
aria-describedby="«r49»"
|
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -610,7 +515,7 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
|
|||||||
class="_icon-button_1pz9o_8"
|
class="_icon-button_1pz9o_8"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«r4b»"
|
id="radix-«r41»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 32px;"
|
style="--cpd-icon-button-size: 32px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -640,31 +545,6 @@ exports[`<RoomListHeaderView /> space menu should display the space menu 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<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="«r4d»"
|
|
||||||
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"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</DocumentFragment>
|
</DocumentFragment>
|
||||||
@@ -680,7 +560,6 @@ exports[`<RoomListHeaderView /> space menu should not display the space menu 1`]
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="flex mx_RoomListHeaderView_title"
|
class="flex mx_RoomListHeaderView_title"
|
||||||
data-floating-ui-inert=""
|
|
||||||
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-1x); --mx-flex-wrap: nowrap;"
|
||||||
>
|
>
|
||||||
<h1
|
<h1
|
||||||
@@ -696,18 +575,17 @@ exports[`<RoomListHeaderView /> space menu should not display the space menu 1`]
|
|||||||
<div
|
<div
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="menu"
|
aria-haspopup="menu"
|
||||||
aria-label="Room Options"
|
aria-label="Room Options"
|
||||||
aria-labelledby="«r4m»"
|
aria-labelledby="«r4a»"
|
||||||
class="_icon-button_1pz9o_8"
|
class="_icon-button_1pz9o_8"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«r4k»"
|
id="radix-«r48»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 32px;"
|
style="--cpd-icon-button-size: 32px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -733,11 +611,8 @@ exports[`<RoomListHeaderView /> space menu should not display the space menu 1`]
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
aria-controls="«r4t»"
|
|
||||||
aria-describedby="«r4t»"
|
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
class="mx_RoomListHeaderView_ReleaseAnnouncementAnchor"
|
||||||
data-floating-ui-inert=""
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -747,7 +622,7 @@ exports[`<RoomListHeaderView /> space menu should not display the space menu 1`]
|
|||||||
class="_icon-button_1pz9o_8"
|
class="_icon-button_1pz9o_8"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«r4v»"
|
id="radix-«r4j»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 32px;"
|
style="--cpd-icon-button-size: 32px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -777,31 +652,6 @@ exports[`<RoomListHeaderView /> space menu should not display the space menu 1`]
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<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="«r51»"
|
|
||||||
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"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</DocumentFragment>
|
</DocumentFragment>
|
||||||
|
|||||||
@@ -3,8 +3,12 @@
|
|||||||
exports[`<SpacePanel /> should show all activated MetaSpaces in the correct order 1`] = `
|
exports[`<SpacePanel /> should show all activated MetaSpaces in the correct order 1`] = `
|
||||||
<DocumentFragment>
|
<DocumentFragment>
|
||||||
<nav
|
<nav
|
||||||
|
aria-controls="«r2»"
|
||||||
|
aria-describedby="«r2»"
|
||||||
|
aria-haspopup="dialog"
|
||||||
aria-label="Spaces"
|
aria-label="Spaces"
|
||||||
class="mx_SpacePanel collapsed newUi"
|
class="mx_SpacePanel collapsed newUi"
|
||||||
|
data-floating-ui-inert=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mx_UserMenu"
|
class="mx_UserMenu"
|
||||||
@@ -233,11 +237,11 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
|
|||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="menu"
|
aria-haspopup="menu"
|
||||||
aria-label="Threads"
|
aria-label="Threads"
|
||||||
aria-labelledby="«r12»"
|
aria-labelledby="«r16»"
|
||||||
class="_icon-button_1pz9o_8 mx_ThreadsActivityCentreButton"
|
class="_icon-button_1pz9o_8 mx_ThreadsActivityCentreButton"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-state="closed"
|
data-state="closed"
|
||||||
id="radix-«r10»"
|
id="radix-«r14»"
|
||||||
role="button"
|
role="button"
|
||||||
style="--cpd-icon-button-size: 32px;"
|
style="--cpd-icon-button-size: 32px;"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -271,5 +275,30 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
|
|||||||
tabindex="0"
|
tabindex="0"
|
||||||
/>
|
/>
|
||||||
</nav>
|
</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="«r1j»"
|
||||||
|
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>
|
</DocumentFragment>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -117,13 +117,13 @@ describe("ReleaseAnnouncementStore", () => {
|
|||||||
|
|
||||||
it("should listen to release announcement data changes in the store", async () => {
|
it("should listen to release announcement data changes in the store", async () => {
|
||||||
const secondStore = new ReleaseAnnouncementStore();
|
const secondStore = new ReleaseAnnouncementStore();
|
||||||
expect(secondStore.getReleaseAnnouncement()).toBe("newRoomList_intro");
|
expect(secondStore.getReleaseAnnouncement()).toBe("newNotificationSounds");
|
||||||
|
|
||||||
const promise = listenReleaseAnnouncementChanged();
|
const promise = listenReleaseAnnouncementChanged();
|
||||||
await secondStore.nextReleaseAnnouncement();
|
await secondStore.nextReleaseAnnouncement();
|
||||||
|
|
||||||
expect(await promise).toBe("newRoomList_sort");
|
expect(await promise).toBe("newRoomList_intro");
|
||||||
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("newRoomList_sort");
|
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("newRoomList_intro");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return null when there are toasts on screen", async () => {
|
it("should return null when there are toasts on screen", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user