Improve randomString mock for better snapshots (#11375)

This commit is contained in:
Michael Telatynski
2023-08-09 09:39:48 +01:00
committed by GitHub
parent c3574c2050
commit 57a0d99dc8
49 changed files with 133 additions and 256 deletions
@@ -32,11 +32,6 @@ import { getMockClientWithEventEmitter, mockClientMethodsUser } from "../../../t
import { PollHistoryDialog } from "../../../../src/components/views/dialogs/PollHistoryDialog";
import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks";
// Fake random strings to give a predictable snapshot for checkbox IDs
jest.mock("matrix-js-sdk/src/randomstring", () => ({
randomString: () => "abdefghi",
}));
describe("<RoomSummaryCard />", () => {
const userId = "@alice:domain.org";
const mockClient = getMockClientWithEventEmitter({
@@ -41,7 +41,7 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
/>
</span>
<div
aria-describedby="mx_TooltipTarget_abdefghi"
aria-describedby="mx_TooltipTarget_vY7Q4uEh"
class="mx_TextWithTooltip_target mx_RoomSummaryCard_e2ee"
tabindex="0"
/>