From c8c093491f1a295080c8ac0e52309428b5851713 Mon Sep 17 00:00:00 2001
From: Robert Goldmann <deadlocker@gmx.de>
Date: Sat, 21 Nov 2020 19:59:39 +0100
Subject: [PATCH] handle url encoded paths

---
 .../integration/helpers/IntegrationTestHelper.java   | 12 ++++++++++++
 1 file changed, 12 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 66b275ba7..420ffcd88 100644
--- a/src/test/java/de/deadlocker8/budgetmaster/integration/helpers/IntegrationTestHelper.java
+++ b/src/test/java/de/deadlocker8/budgetmaster/integration/helpers/IntegrationTestHelper.java
@@ -8,6 +8,9 @@ import org.openqa.selenium.support.ui.WebDriverWait;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -91,6 +94,15 @@ public class IntegrationTestHelper
 			path = path.substring(1);
 		}
 
+		try
+		{
+			path = URLDecoder.decode(path, StandardCharsets.UTF_8.toString());
+		}
+		catch(UnsupportedEncodingException ex)
+		{
+			throw new RuntimeException(ex.getCause());
+		}
+
 		driver.get(url + "/settings/database/requestImport");
 
 		// upload database
-- 
GitLab