From e6d989eae6459b89b6793b331bc40a7f6bca0ec4 Mon Sep 17 00:00:00 2001
From: Robert Goldmann <deadlocker@gmx.de>
Date: Sat, 21 Nov 2020 20:59:06 +0100
Subject: [PATCH] stabilized integration tests

---
 .../integration/helpers/IntegrationTestHelper.java           | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/test/java/de/deadlocker8/budgetmaster/integration/helpers/IntegrationTestHelper.java b/src/test/java/de/deadlocker8/budgetmaster/integration/helpers/IntegrationTestHelper.java
index 420ffcd88..650738545 100644
--- a/src/test/java/de/deadlocker8/budgetmaster/integration/helpers/IntegrationTestHelper.java
+++ b/src/test/java/de/deadlocker8/budgetmaster/integration/helpers/IntegrationTestHelper.java
@@ -122,6 +122,8 @@ public class IntegrationTestHelper
 		matchAccounts(sourceAccounts, destinationAccounts);
 
 		// confirm import
+		WebDriverWait wait = new WebDriverWait(driver, 5);
+		wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("buttonImport")));
 		driver.findElement(By.id("buttonImport")).click();
 
 		assertEquals(Localization.getString("menu.settings"), IntegrationTestHelper.getTextNode(driver.findElement(By.className("headline"))));
@@ -134,6 +136,9 @@ public class IntegrationTestHelper
 	private void createAccountOnImport(String accountName)
 	{
 		driver.findElement(By.className("button-new-account")).click();
+
+		WebDriverWait wait = new WebDriverWait(driver, 5);
+		wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("account-name")));
 		WebElement inputAccountName = driver.findElement(By.id("account-name"));
 		inputAccountName.sendKeys(accountName);
 		driver.findElement(By.tagName("button")).click();
-- 
GitLab