diff --git a/BudgetMasterServer/src/main/resources/templates/transactions/newTransactionNormal.ftl b/BudgetMasterServer/src/main/resources/templates/transactions/newTransactionNormal.ftl index 4f5321a95316b1eb4d9d37a3041814fe4400fcd3..c529aaa42442ccf7b000bf1055981797d2c99919 100644 --- a/BudgetMasterServer/src/main/resources/templates/transactions/newTransactionNormal.ftl +++ b/BudgetMasterServer/src/main/resources/templates/transactions/newTransactionNormal.ftl @@ -73,7 +73,7 @@ <@customSelectMacros.customAccountSelect "account-select-wrapper" "account" accounts selectedAccount "col s12 m12 l8 offset-l2" locale.getString("transaction.new.label.account") "transaction-account"/> <#-- repeating options --> - <@newTransactionMacros.transactionRepeating transaction currentDate isEdit/> + <@newTransactionMacros.transactionRepeating transaction currentDate/> <#-- buttons --> <@newTransactionMacros.buttons cancelURL='/transactions' includeContinueButton=true/> diff --git a/BudgetMasterServer/src/main/resources/templates/transactions/newTransactionTransfer.ftl b/BudgetMasterServer/src/main/resources/templates/transactions/newTransactionTransfer.ftl index b1f96bc1aab5b4b7545b2a997eadc47fc0593c97..3ef2b5821fb76eb230398c65eaff29b994bd346d 100644 --- a/BudgetMasterServer/src/main/resources/templates/transactions/newTransactionTransfer.ftl +++ b/BudgetMasterServer/src/main/resources/templates/transactions/newTransactionTransfer.ftl @@ -79,7 +79,7 @@ <@customSelectMacros.customAccountSelect "transfer-account-select-wrapper" "transferAccount" accounts selectedTransferAccount "col s12 m12 l8 offset-l2" locale.getString("transaction.new.label.transfer.account") "transaction-destination-account"/> <#-- repeating options --> - <@newTransactionMacros.transactionRepeating transaction currentDate isEdit/> + <@newTransactionMacros.transactionRepeating transaction currentDate/> <#-- buttons --> <@newTransactionMacros.buttons cancelURL='/transactions' includeContinueButton=true/> diff --git a/BudgetMasterServer/src/main/resources/templates/transactions/transactionsMacros.ftl b/BudgetMasterServer/src/main/resources/templates/transactions/transactionsMacros.ftl index abd1370458e2ad39a68d73991f0e38a164909769..544ae8cfc52b944ce156a9f454b1d94184dc3eaf 100644 --- a/BudgetMasterServer/src/main/resources/templates/transactions/transactionsMacros.ftl +++ b/BudgetMasterServer/src/main/resources/templates/transactions/transactionsMacros.ftl @@ -72,7 +72,7 @@ <a href="<@s.url '/transactions/' + transaction.ID?c + '/edit'/>" class="btn-floating btn background-green-dark"><i class="material-icons">edit</i></a> </li> <li> - <a href="<@s.url '/transactions/' + transaction.ID?c + '/editFutureRepetitions'/>" class="btn-floating btn mobile-fab-tip no-wrap">${locale.getString("repeating.button.edit.future")}</a> + <a href="<@s.url '/transactions/' + transaction.ID?c + '/editFutureRepetitions'/>" class="btn-floating btn mobile-fab-tip no-wrap button-edit-future-occurrences">${locale.getString("repeating.button.edit.future")}</a> <a href="<@s.url '/transactions/' + transaction.ID?c + '/editFutureRepetitions'/>" class="btn-floating btn background-orange"><i class="material-icons">move_up</i></a> </li> </ul> diff --git a/BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/EditFutureOccurrencesOfRepeatingTransactionTest.java b/BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/EditFutureOccurrencesOfRepeatingTransactionTest.java index 3b19393e753da2c2284d05092f37382ce6585e1e..17d4ca532d96df44b8aae2c7b29acc8974b0fb79 100644 --- a/BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/EditFutureOccurrencesOfRepeatingTransactionTest.java +++ b/BudgetMasterServer/src/test/java/de/deadlocker8/budgetmaster/integration/selenium/EditFutureOccurrencesOfRepeatingTransactionTest.java @@ -6,7 +6,6 @@ import de.deadlocker8.budgetmaster.integration.helpers.SeleniumTestBase; import de.deadlocker8.budgetmaster.integration.helpers.TransactionTestHelper; import org.junit.jupiter.api.Test; import org.openqa.selenium.By; -import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; @@ -48,17 +47,15 @@ class EditFutureOccurrencesOfRepeatingTransactionTest extends SeleniumTestBase TransactionTestHelper.gotoSpecificYearAndMonth(driver, 2022, "October"); List<WebElement> transactionsRows = driver.findElements(By.cssSelector(".transaction-container .hide-on-med-and-down.transaction-row-top")); - List<WebElement> columns = transactionsRows.get(transactionsRows.size() - 4).findElements(By.className("col")); - columns.get(4).findElement(By.className("button-edit")).click(); + final WebElement row = transactionsRows.get(transactionsRows.size() - 4); + List<WebElement> columns = row.findElements(By.className("col")); + columns.get(4).findElement(By.className("edit-transaction-button-link")).click(); + final WebElement buttonEditFutureOccurrences = row.findElement(By.className("button-edit-future-occurrences")); WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5)); - wait.until(ExpectedConditions.textToBePresentInElementLocated(By.cssSelector(".headline"), "Edit Transaction")); - - final WebElement buttonEditFutureOccurrences = driver.findElement(By.id("button-transaction-edit-future-occurrences")); - ((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", buttonEditFutureOccurrences); - assertThat(buttonEditFutureOccurrences.isDisplayed()).isTrue(); - + wait.until(ExpectedConditions.visibilityOf(buttonEditFutureOccurrences)); buttonEditFutureOccurrences.click(); + wait = new WebDriverWait(driver, Duration.ofSeconds(5)); wait.until(ExpectedConditions.textToBePresentInElementLocated(By.cssSelector(".headline"), "New Transaction"));