Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
MidhunSureshR committed Sep 28, 2024
1 parent a9199a4 commit 481ea9e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/views/messages/MStickerBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class MStickerBody extends MImageBody {

return {
placement: "right",
label: content.body,
description: content.body,
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/views/rooms/MessageComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ export class MessageComposer extends React.Component<IProps, IState> {
});

return (
<Tooltip open={isTooltipOpen} label={formatTimeLeft(secondsLeft)} placement="top">
<Tooltip open={isTooltipOpen} description={formatTimeLeft(secondsLeft)} placement="bottom">
<div className={classes} ref={this.ref} role="region" aria-label={_t("a11y|message_composer")}>
{recordingTooltip}
<div className="mx_MessageComposer_wrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe("<CallGuestLinkButton />", () => {

it("shows the JoinRuleDialog on click with private join rules", async () => {
getComponent(room);
fireEvent.click(screen.getByLabelText("Share call link"));
fireEvent.click(screen.getByRole("button", { name: "Share call link" }));
expect(modalSpy).toHaveBeenCalledWith(JoinRuleDialog, { room, canInvite: false });
// pretend public was selected
jest.spyOn(room, "getJoinRule").mockReturnValue(JoinRule.Public);
Expand All @@ -115,7 +115,7 @@ describe("<CallGuestLinkButton />", () => {
it("shows the ShareDialog on click with public join rules", () => {
jest.spyOn(room, "getJoinRule").mockReturnValue(JoinRule.Public);
getComponent(room);
fireEvent.click(screen.getByLabelText("Share call link"));
fireEvent.click(screen.getByRole("button", { name: "Share call link" }));
const callParams = modalSpy.mock.calls[0];
expect(callParams[0]).toEqual(ShareDialog);
expect(callParams[1].target.toString()).toEqual(expectedShareDialogProps.target);
Expand All @@ -127,7 +127,7 @@ describe("<CallGuestLinkButton />", () => {
jest.spyOn(room, "getJoinRule").mockReturnValue(JoinRule.Knock);
jest.spyOn(room, "canInvite").mockReturnValue(true);
getComponent(room);
fireEvent.click(screen.getByLabelText("Share call link"));
fireEvent.click(screen.getByRole("button", { name: "Share call link" }));
const callParams = modalSpy.mock.calls[0];
expect(callParams[0]).toEqual(ShareDialog);
expect(callParams[1].target.toString()).toEqual(expectedShareDialogProps.target);
Expand Down
10 changes: 5 additions & 5 deletions test/components/views/spaces/ThreadsActivityCentre-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ describe("ThreadsActivityCentre", () => {
return screen.getByRole("menu");
};

const getTACDescription = () => {
return screen.getByText("Threads");
const getTACDescription = (container: ReturnType<typeof render>["container"]) => {
return container.querySelector(".mx_ThreadsActivityCentreButton_Text");
};

const renderTAC = (props?: ComponentProps<typeof ThreadsActivityCentre>) => {
render(
return render(
<MatrixClientContext.Provider value={cli}>
<ThreadsActivityCentre {...props} />
</MatrixClientContext.Provider>,
Expand Down Expand Up @@ -130,9 +130,9 @@ describe("ThreadsActivityCentre", () => {
});

it("should render the threads activity centre button and the display label", async () => {
renderTAC({ displayButtonLabel: true });
const { container } = renderTAC({ displayButtonLabel: true });
expect(getTACButton()).toBeInTheDocument();
expect(getTACDescription()).toBeInTheDocument();
expect(getTACDescription(container)).toBeInTheDocument();
});

it("should render the threads activity centre menu when the button is clicked", async () => {
Expand Down

0 comments on commit 481ea9e

Please sign in to comment.