From eed21ef56e6c82e3e4fe6b4fa64578baee616ebb Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Sun, 16 Nov 2025 09:44:32 +0100 Subject: [PATCH 1/5] ls test --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f36be2..4fcaa9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: E2E Tests on: push: - branches: [ "main" ] + branches: [ "main", "test/**" ] workflow_dispatch: jobs: @@ -22,7 +22,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y chromium-browser chromium-chromedriver - sudo ln -s /usr/bin/chromium-browser /usr/bin/google-chrome + ls /usr/bin -alh # Verify the installation - name: Verify Chromium and ChromeDriver From 0db1e5f5080f16a56614d5394ccfdd5b70ebcbad Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Sun, 16 Nov 2025 09:48:26 +0100 Subject: [PATCH 2/5] Added file location check --- tests/Berufsschule_HAM.E2ETests/Helper/AppHelper.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Berufsschule_HAM.E2ETests/Helper/AppHelper.cs b/tests/Berufsschule_HAM.E2ETests/Helper/AppHelper.cs index a23068d..a27550e 100644 --- a/tests/Berufsschule_HAM.E2ETests/Helper/AppHelper.cs +++ b/tests/Berufsschule_HAM.E2ETests/Helper/AppHelper.cs @@ -56,6 +56,10 @@ public static class AppHelper options.AddArgument("--no-sandbox"); options.AddArgument("--disable-dev-shm-usage"); options.AddArgument("--window-size=1920,1080"); + if (File.Exists("/usr/bin/chromium-browser")) + { + options.BinaryLocation = "/usr/bin/chromium-browser"; + } return new ChromeDriver(options); } From c301e052b38d652f742c0041e79b20b4ed31466a Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Sun, 16 Nov 2025 10:54:06 +0100 Subject: [PATCH 3/5] Cleaned up test.yml, added ScrollIntoView to AssetsHelper --- .github/workflows/test.yml | 1 - tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fcaa9a..865f4e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,6 @@ jobs: run: | sudo apt-get update sudo apt-get install -y chromium-browser chromium-chromedriver - ls /usr/bin -alh # Verify the installation - name: Verify Chromium and ChromeDriver diff --git a/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs b/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs index 9062b26..90e5a5c 100644 --- a/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs +++ b/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs @@ -19,6 +19,7 @@ public static class AssetsHelper AppHelper.AwaitVisible(driver, By.Id("createLocationSelect-ts-control")); driver.FindElement(By.Id("createLocationSelect-ts-control")).Click(); AppHelper.Timeout(driver, 30).Until(ExpectedConditions.ElementExists(By.Id("createLocationSelect-opt-1"))); + AppHelper.ScrollIntoViewAndClick(driver, driver.FindElement(By.Id("createLocationSelect-opt-1"))); driver.ExecuteJavaScript("document.getElementById(\"createLocationSelect-ts-control\").value=\"somewhere\""); driver.ExecuteJavaScript("document.getElementById(\"createLocationSelect-opt-1\").click()"); driver.FindElement(By.Id("createUsersSelect-ts-control")).Click(); From 999e7495c00355bf7a2b1ffdd6f3eaf9594d9113 Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Sun, 16 Nov 2025 16:33:51 +0100 Subject: [PATCH 4/5] Replaced timeout with Thread.Sleep --- tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs b/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs index 90e5a5c..385a350 100644 --- a/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs +++ b/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs @@ -18,7 +18,7 @@ public static class AssetsHelper driver.FindElement(By.Id("createName")).SendKeys(AppHelper.GetRandomName()); AppHelper.AwaitVisible(driver, By.Id("createLocationSelect-ts-control")); driver.FindElement(By.Id("createLocationSelect-ts-control")).Click(); - AppHelper.Timeout(driver, 30).Until(ExpectedConditions.ElementExists(By.Id("createLocationSelect-opt-1"))); + Thread.Sleep(1); //AppHelper.Timeout(driver, 30).Until(ExpectedConditions.ElementExists(By.Id("createLocationSelect-opt-1"))); AppHelper.ScrollIntoViewAndClick(driver, driver.FindElement(By.Id("createLocationSelect-opt-1"))); driver.ExecuteJavaScript("document.getElementById(\"createLocationSelect-ts-control\").value=\"somewhere\""); driver.ExecuteJavaScript("document.getElementById(\"createLocationSelect-opt-1\").click()"); From 62897dde112d62080457e0aaf85d483a98cb9c89 Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Sun, 16 Nov 2025 16:46:29 +0100 Subject: [PATCH 5/5] Fixed typo --- tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs b/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs index 385a350..c488b92 100644 --- a/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs +++ b/tests/Berufsschule_HAM.E2ETests/Helper/AssetsHelper.cs @@ -18,9 +18,9 @@ public static class AssetsHelper driver.FindElement(By.Id("createName")).SendKeys(AppHelper.GetRandomName()); AppHelper.AwaitVisible(driver, By.Id("createLocationSelect-ts-control")); driver.FindElement(By.Id("createLocationSelect-ts-control")).Click(); - Thread.Sleep(1); //AppHelper.Timeout(driver, 30).Until(ExpectedConditions.ElementExists(By.Id("createLocationSelect-opt-1"))); + Thread.Sleep(1000); //AppHelper.Timeout(driver, 30).Until(ExpectedConditions.ElementExists(By.Id("createLocationSelect-opt-1"))); AppHelper.ScrollIntoViewAndClick(driver, driver.FindElement(By.Id("createLocationSelect-opt-1"))); - driver.ExecuteJavaScript("document.getElementById(\"createLocationSelect-ts-control\").value=\"somewhere\""); + //driver.ExecuteJavaScript("document.getElementById(\"createLocationSelect-ts-control\").value=\"somewhere\""); driver.ExecuteJavaScript("document.getElementById(\"createLocationSelect-opt-1\").click()"); driver.FindElement(By.Id("createUsersSelect-ts-control")).Click(); AppHelper.AwaitVisible(driver, By.Id("createUsersSelect-opt-1"));