Skip to content

Commit

Permalink
add test for closing dialog via escape key
Browse files Browse the repository at this point in the history
  • Loading branch information
NFriedo committed Dec 17, 2024
1 parent 6c0335c commit 5fe5dfd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/modules/page/room/RoomMembers.page.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,18 @@ describe("RoomMembersPage", () => {
expect(dialog.props("modelValue")).toBe(false);
});

it("should close dialog on escape key", async () => {
const { wrapper } = setup();

const dialog = wrapper.getComponent(VDialog);
await dialog.setValue(true);

const dialogContent = dialog.getComponent(AddMembers);
await dialogContent.trigger("keydown.escape");

expect(dialog.props("modelValue")).toBe(false);
});

it("should call addMembers method on @add:members", async () => {
const { wrapper } = setup();

Expand Down

0 comments on commit 5fe5dfd

Please sign in to comment.