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

stabilized integration tests: use id for saving account

parent 7897fcef
No related branches found
No related tags found
No related merge requests found
Pipeline #4081 failed
...@@ -90,7 +90,7 @@ public class CategoryController extends BaseController ...@@ -90,7 +90,7 @@ public class CategoryController extends BaseController
public String editCategory(Model model, @PathVariable("ID") Integer ID) public String editCategory(Model model, @PathVariable("ID") Integer ID)
{ {
Optional<Category> categoryOptional = categoryService.findById(ID); Optional<Category> categoryOptional = categoryService.findById(ID);
if(!categoryOptional.isPresent()) if(categoryOptional.isEmpty())
{ {
throw new ResourceNotFoundException(); throw new ResourceNotFoundException();
} }
......
...@@ -144,7 +144,7 @@ public class IntegrationTestHelper ...@@ -144,7 +144,7 @@ public class IntegrationTestHelper
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("account-name"))); wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("account-name")));
WebElement inputAccountName = driver.findElement(By.id("account-name")); WebElement inputAccountName = driver.findElement(By.id("account-name"));
inputAccountName.sendKeys(accountName); inputAccountName.sendKeys(accountName);
driver.findElement(By.tagName("button")).click(); driver.findElement(By.id("button-save-account")).click();
} }
private void matchAccounts(List<String> sourceAccounts, List<String> destinationAccounts) private void matchAccounts(List<String> sourceAccounts, List<String> destinationAccounts)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment