mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-06 02:51:34 +00:00
Show popout when press printable character
This commit is contained in:
@@ -42,7 +42,21 @@ describe("PopoutController", () => {
|
||||
expectToBeShown(dialog);
|
||||
});
|
||||
|
||||
it("doesn't show the dialog on other key press (tab)", () => {
|
||||
it("shows and updates on number press", () => {
|
||||
button.dispatchEvent(new KeyboardEvent("keydown", { key: "1" }));
|
||||
|
||||
expectToBeShown(dialog);
|
||||
expect(input1.value).toBe("1");
|
||||
});
|
||||
|
||||
it("shows and updates on character press", () => {
|
||||
button.dispatchEvent(new KeyboardEvent("keydown", { key: "a" }));
|
||||
|
||||
expectToBeShown(dialog);
|
||||
expect(input1.value).toBe("a");
|
||||
});
|
||||
|
||||
it("doesn't show the dialog on control key press (tab)", () => {
|
||||
button.dispatchEvent(new KeyboardEvent("keydown", { keyCode: 9 }));
|
||||
|
||||
expectToBeClosed(dialog);
|
||||
|
||||
Reference in New Issue
Block a user