mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
Add keyboard navigation for users, groups, branches, tags, sources, changesets and plugins (#2153)
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
This commit is contained in:
committed by
GitHub
parent
da71004dd0
commit
eea60deadb
@@ -88,7 +88,7 @@ describe("shortcutIterator", () => {
|
||||
expect(result.error).toBeUndefined();
|
||||
});
|
||||
|
||||
it("should call last callback upon pressing forward in initial state", async () => {
|
||||
it("should call first callback upon pressing forward in initial state", async () => {
|
||||
const callback = jest.fn();
|
||||
const callback2 = jest.fn();
|
||||
const callback3 = jest.fn();
|
||||
@@ -101,12 +101,12 @@ describe("shortcutIterator", () => {
|
||||
|
||||
Mousetrap.trigger("j");
|
||||
|
||||
expect(callback).not.toHaveBeenCalled();
|
||||
expect(callback).toHaveBeenCalledTimes(1);
|
||||
expect(callback2).not.toHaveBeenCalled();
|
||||
expect(callback3).toHaveBeenCalledTimes(1);
|
||||
expect(callback3).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should call first callback once upon pressing backward in initial state", async () => {
|
||||
it("should call last callback once upon pressing backward in initial state", async () => {
|
||||
const callback = jest.fn();
|
||||
const callback2 = jest.fn();
|
||||
const callback3 = jest.fn();
|
||||
@@ -117,12 +117,11 @@ describe("shortcutIterator", () => {
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
Mousetrap.trigger("k");
|
||||
Mousetrap.trigger("k");
|
||||
|
||||
expect(callback).toHaveBeenCalledTimes(1);
|
||||
expect(callback).not.toHaveBeenCalled();
|
||||
expect(callback2).not.toHaveBeenCalled();
|
||||
expect(callback3).not.toHaveBeenCalled();
|
||||
expect(callback3).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("should not allow moving past the end of the callback array", async () => {
|
||||
|
||||
Reference in New Issue
Block a user