From 16bf1448e478a207584faf8fd979741b65094030 Mon Sep 17 00:00:00 2001 From: mrfoxygmfr Date: Thu, 1 May 2025 10:24:37 +0300 Subject: feat(test): add selenium for http tests --- src/main/resources/templates/common.html | 2 +- .../http/PartnersControllerTest.java | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/test/java/ru/mrfoxygmfr/warehouse_accounting/http/PartnersControllerTest.java (limited to 'src') diff --git a/src/main/resources/templates/common.html b/src/main/resources/templates/common.html index 24af612..6dfd5ba 100644 --- a/src/main/resources/templates/common.html +++ b/src/main/resources/templates/common.html @@ -11,7 +11,7 @@ margin-top: 20px; } - + Система складского учета diff --git a/src/test/java/ru/mrfoxygmfr/warehouse_accounting/http/PartnersControllerTest.java b/src/test/java/ru/mrfoxygmfr/warehouse_accounting/http/PartnersControllerTest.java new file mode 100644 index 0000000..0cb64bb --- /dev/null +++ b/src/test/java/ru/mrfoxygmfr/warehouse_accounting/http/PartnersControllerTest.java @@ -0,0 +1,21 @@ +package ru.mrfoxygmfr.warehouse_accounting.http; + +import org.junit.jupiter.api.Test; +import org.openqa.selenium.*; +import org.openqa.selenium.chrome.ChromeDriver; + +import static org.junit.jupiter.api.Assertions.*; + +public class PartnersControllerTest { + private final String srcURL = "http://localhost:8080/"; + private final String title = "Система складского учета"; + + @Test + void PartnersPageTest() { + ChromeDriver driver = new ChromeDriver(); + driver.get(srcURL); + assertEquals(title, driver.getTitle()); + driver.quit(); + } +} + -- cgit mrf-deployment