Skip to content
Snippets Groups Projects
Commit 3ad773ed authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#651 - added new hotkey to open transaction overview page

parent a9be484d
Branches
Tags
No related merge requests found
build/screenshots/dark/hotkeys.png

45.3 KiB | W: | H:

build/screenshots/dark/hotkeys.png

61.4 KiB | W: | H:

build/screenshots/dark/hotkeys.png
build/screenshots/dark/hotkeys.png
build/screenshots/dark/hotkeys.png
build/screenshots/dark/hotkeys.png
  • 2-up
  • Swipe
  • Onion skin
build/screenshots/light/hotkeys.png

46.6 KiB | W: | H:

build/screenshots/light/hotkeys.png

63.6 KiB | W: | H:

build/screenshots/light/hotkeys.png
build/screenshots/light/hotkeys.png
build/screenshots/light/hotkeys.png
build/screenshots/light/hotkeys.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -6,6 +6,7 @@ import java.text.MessageFormat; ...@@ -6,6 +6,7 @@ import java.text.MessageFormat;
public enum GeneralHotKey implements HotKey public enum GeneralHotKey implements HotKey
{ {
TRANSACTION_OVERVIEW("hotkeys.transactions.overview", false),
CREATE_TRANSACTION("hotkeys.transactions.new.normal", false), CREATE_TRANSACTION("hotkeys.transactions.new.normal", false),
CREATE_TRANSFER_TRANSACTION("hotkeys.transactions.new.transfer", false), CREATE_TRANSFER_TRANSACTION("hotkeys.transactions.new.transfer", false),
CREATE_TRANSACTION_FROM_TEMPLATE("hotkeys.transactions.new.template", false), CREATE_TRANSACTION_FROM_TEMPLATE("hotkeys.transactions.new.template", false),
......
...@@ -472,6 +472,8 @@ home.first.use.home=Los geht's! ...@@ -472,6 +472,8 @@ home.first.use.home=Los geht's!
# hotkeys # hotkeys
hotkeys.general=Allgemein hotkeys.general=Allgemein
hotkeys.transactions.overview=Buchungsübersicht
hotkeys.transactions.overview.key=o
hotkeys.transactions.new.normal=Neue Buchung anlegen hotkeys.transactions.new.normal=Neue Buchung anlegen
hotkeys.transactions.new.normal.key=n hotkeys.transactions.new.normal.key=n
hotkeys.transactions.new.transfer=Neue Umbuchung anlegen hotkeys.transactions.new.transfer=Neue Umbuchung anlegen
......
...@@ -473,6 +473,8 @@ home.first.use.home=Let''s go! ...@@ -473,6 +473,8 @@ home.first.use.home=Let''s go!
# hotkeys # hotkeys
hotkeys.general=General hotkeys.general=General
hotkeys.transactions.overview=Transaction overview
hotkeys.transactions.overview.key=o
hotkeys.transactions.new.normal=Create a transaction hotkeys.transactions.new.normal=Create a transaction
hotkeys.transactions.new.normal.key=n hotkeys.transactions.new.normal.key=n
hotkeys.transactions.new.transfer=Create a transfer hotkeys.transactions.new.transfer=Create a transfer
......
...@@ -47,6 +47,14 @@ Mousetrap.bind('esc', function() ...@@ -47,6 +47,14 @@ Mousetrap.bind('esc', function()
} }
}); });
Mousetrap.bind('o', function()
{
if(areHotKeysEnabled())
{
window.location.href = rootURL + '/transactions';
}
});
let saveTransactionOrTemplateButton = document.getElementById('button-save-transaction'); let saveTransactionOrTemplateButton = document.getElementById('button-save-transaction');
if(saveTransactionOrTemplateButton !== null) if(saveTransactionOrTemplateButton !== null)
{ {
......
...@@ -137,4 +137,16 @@ class HotkeyTest extends SeleniumTestBase ...@@ -137,4 +137,16 @@ class HotkeyTest extends SeleniumTestBase
List<WebElement> transactionsRows = driver.findElements(By.cssSelector(".transaction-container .hide-on-med-and-down.transaction-row-top")); List<WebElement> transactionsRows = driver.findElements(By.cssSelector(".transaction-container .hide-on-med-and-down.transaction-row-top"));
assertThat(transactionsRows).hasSize(2); assertThat(transactionsRows).hasSize(2);
} }
@Test
void hotkey_openTransactionOverview()
{
driver.findElement(By.tagName("body")).sendKeys("o");
WebDriverWait wait = new WebDriverWait(driver, 5);
wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(".headline-date")));
// assert
assertThat(driver.getCurrentUrl()).endsWith("/transactions");
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment