Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • VIPS/VIPSLogic
1 result
Select Git revision
Show changes
Commits on Source (12)
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<dependency> <dependency>
<groupId>org.flywaydb</groupId> <groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId> <artifactId>flyway-core</artifactId>
<version>10.4.1</version> <version>10.5.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.flywaydb</groupId> <groupId>org.flywaydb</groupId>
...@@ -93,6 +93,11 @@ ...@@ -93,6 +93,11 @@
<version>4.7.9.Final</version> <version>4.7.9.Final</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-api</artifactId>
<version>30.1</version>
</dependency>
<dependency> <dependency>
<groupId>org.reflections</groupId> <groupId>org.reflections</groupId>
<artifactId>reflections</artifactId> <artifactId>reflections</artifactId>
...@@ -204,7 +209,7 @@ ...@@ -204,7 +209,7 @@
<dependency> <dependency>
<groupId>no.nibio.vips</groupId> <groupId>no.nibio.vips</groupId>
<artifactId>VIPSCommon</artifactId> <artifactId>VIPSCommon</artifactId>
<version>2.0.1</version> <version>2.0.3-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
...@@ -258,7 +263,7 @@ ...@@ -258,7 +263,7 @@
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>2.0.10</version> <version>2.0.11</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
...@@ -306,7 +311,7 @@ ...@@ -306,7 +311,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>3.2.3</version> <version>3.2.5</version>
<configuration> <configuration>
<argLine>-Xmx6048m</argLine> <argLine>-Xmx6048m</argLine>
</configuration> </configuration>
......
...@@ -7,7 +7,12 @@ from selenium.webdriver.support import expected_conditions as EC ...@@ -7,7 +7,12 @@ from selenium.webdriver.support import expected_conditions as EC
# https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/python/README.md # https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/python/README.md
# BROWSER = 'chrome' # BROWSER = 'chrome'
BROWSER = "firefox" # BROWSER = "firefox"
BROWSER = "edge"
HOST_URL = "http://vipslogic-local.no"
#HOST_URL = "https://logic.testvips.nibio.no"
#HOST_URL = "https://logic.vips.nibio.no"
@pytest.fixture @pytest.fixture
...@@ -20,10 +25,15 @@ def browser(): ...@@ -20,10 +25,15 @@ def browser():
firefox_options = webdriver.FirefoxOptions() firefox_options = webdriver.FirefoxOptions()
firefox_options.headless = False firefox_options.headless = False
driver = webdriver.Firefox(options=firefox_options) driver = webdriver.Firefox(options=firefox_options)
elif BROWSER == "edge":
edge_options = webdriver.EdgeOptions()
edge_options.headless = False
driver = webdriver.Edge(options=edge_options)
else: else:
raise Exception("Browser must be set to either chrome or firefox") raise Exception("Browser must be set to chrome, firefox or edge")
driver.get("http://vipslogic/index.html") #driver.get("http://vipslogic/index.html")
driver.get(f"{HOST_URL}/index.html")
assert driver.title == "Please log in" assert driver.title == "Please log in"
driver.implicitly_wait(0.5) driver.implicitly_wait(0.5)
...@@ -45,7 +55,7 @@ def test_admin_organisms(browser): ...@@ -45,7 +55,7 @@ def test_admin_organisms(browser):
link = WebDriverWait(browser, 15).until( link = WebDriverWait(browser, 15).until(
EC.element_to_be_clickable((By.XPATH, '//a[text()="Organisms"]')) EC.element_to_be_clickable((By.XPATH, '//a[text()="Organisms"]'))
) )
assert link.get_attribute("href") == "http://vipslogic/organism" assert link.get_attribute("href") == f"{HOST_URL}/organism"
link.click() link.click()
assert browser.title == "Organisms" assert browser.title == "Organisms"
link = WebDriverWait(browser, 15).until( link = WebDriverWait(browser, 15).until(
...@@ -60,7 +70,7 @@ def test_admin_scheduling(browser): ...@@ -60,7 +70,7 @@ def test_admin_scheduling(browser):
link = WebDriverWait(browser, 10).until( link = WebDriverWait(browser, 10).until(
EC.element_to_be_clickable((By.XPATH, '//a[text()="Scheduling"]')) EC.element_to_be_clickable((By.XPATH, '//a[text()="Scheduling"]'))
) )
assert link.get_attribute("href") == "http://vipslogic/scheduling" assert link.get_attribute("href") == f"{HOST_URL}/scheduling"
link.click() link.click()
assert browser.title == "Scheduling overview" assert browser.title == "Scheduling overview"
...@@ -70,7 +80,7 @@ def test_admin_organization_group(browser): ...@@ -70,7 +80,7 @@ def test_admin_organization_group(browser):
link = WebDriverWait(browser, 10).until( link = WebDriverWait(browser, 10).until(
EC.element_to_be_clickable((By.XPATH, '//a[text()="Organization groups"]')) EC.element_to_be_clickable((By.XPATH, '//a[text()="Organization groups"]'))
) )
assert link.get_attribute("href") == "http://vipslogic/organizationgroup" assert link.get_attribute("href") == f"{HOST_URL}/organizationgroup"
link.click() link.click()
assert browser.title == "Organization groups" assert browser.title == "Organization groups"
...@@ -80,7 +90,7 @@ def test_admin_apple_fruit_moth(browser): ...@@ -80,7 +90,7 @@ def test_admin_apple_fruit_moth(browser):
link = WebDriverWait(browser, 10).until( link = WebDriverWait(browser, 10).until(
EC.element_to_be_clickable((By.XPATH, '//a[text()="Apple fruit moth"]')) EC.element_to_be_clickable((By.XPATH, '//a[text()="Apple fruit moth"]'))
) )
assert link.get_attribute("href") == "http://vipslogic/applefruitmoth" assert link.get_attribute("href") == f"{HOST_URL}/applefruitmoth"
link.click() link.click()
assert browser.title == "Rognebærmøllstasjoner" assert browser.title == "Rognebærmøllstasjoner"
...@@ -90,7 +100,7 @@ def test_admin_users(browser): ...@@ -90,7 +100,7 @@ def test_admin_users(browser):
link = WebDriverWait(browser, 20).until( link = WebDriverWait(browser, 20).until(
EC.element_to_be_clickable((By.XPATH, '//a[text()="Users"]')) EC.element_to_be_clickable((By.XPATH, '//a[text()="Users"]'))
) )
assert link.get_attribute("href") == "http://vipslogic/user" assert link.get_attribute("href") == f"{HOST_URL}/user"
link.click() link.click()
WebDriverWait(browser, 20).until( WebDriverWait(browser, 20).until(
EC.visibility_of_element_located((By.XPATH, "//h1[text()='Users']")) EC.visibility_of_element_located((By.XPATH, "//h1[text()='Users']"))
...@@ -103,7 +113,7 @@ def test_admin_forecasts(browser): ...@@ -103,7 +113,7 @@ def test_admin_forecasts(browser):
link = WebDriverWait(browser, 20).until( link = WebDriverWait(browser, 20).until(
EC.element_to_be_clickable((By.XPATH, '//a[text()="Forecasts"]')) EC.element_to_be_clickable((By.XPATH, '//a[text()="Forecasts"]'))
) )
assert link.get_attribute("href") == "http://vipslogic/forecastConfiguration" assert link.get_attribute("href") == f"{HOST_URL}/forecastConfiguration"
link.click() link.click()
WebDriverWait(browser, 20).until( WebDriverWait(browser, 20).until(
EC.visibility_of_element_located((By.XPATH, "//h1[text()='Forecasts']")) EC.visibility_of_element_located((By.XPATH, "//h1[text()='Forecasts']"))
......
...@@ -34,7 +34,7 @@ public class SessionControllerGetter { ...@@ -34,7 +34,7 @@ public class SessionControllerGetter {
// This obviously has to be changed when changing the application name in Maven // This obviously has to be changed when changing the application name in Maven
// TODO: Refactor out to System properties (e.g. in standalone.xml in JBoss/WildFly) // TODO: Refactor out to System properties (e.g. in standalone.xml in JBoss/WildFly)
public static final String JNDI_PATH = "java:global/VIPSLogic-2023.1/"; public static final String JNDI_PATH = "java:global/VIPSLogic-2024.1/";
public static SchedulingBean getSchedulingBean() public static SchedulingBean getSchedulingBean()
{ {
......
...@@ -50,10 +50,7 @@ import javax.persistence.PersistenceContext; ...@@ -50,10 +50,7 @@ import javax.persistence.PersistenceContext;
import org.geotools.geometry.jts.JTS; import org.geotools.geometry.jts.JTS;
import org.geotools.referencing.CRS; import org.geotools.referencing.CRS;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.TransformException;
import no.nibio.vips.logic.controller.session.SessionControllerGetter; import no.nibio.vips.logic.controller.session.SessionControllerGetter;
import no.nibio.vips.logic.controller.session.UserBean; import no.nibio.vips.logic.controller.session.UserBean;
...@@ -67,6 +64,10 @@ import no.nibio.vips.logic.messaging.UniversalMessageFormat; ...@@ -67,6 +64,10 @@ import no.nibio.vips.logic.messaging.UniversalMessageFormat;
import no.nibio.vips.logic.util.GISEntityUtil; import no.nibio.vips.logic.util.GISEntityUtil;
import no.nibio.vips.logic.util.Globals; import no.nibio.vips.logic.util.Globals;
import no.nibio.vips.logic.util.SimpleMailSender; import no.nibio.vips.logic.util.SimpleMailSender;
import org.geotools.api.referencing.FactoryException;
import org.geotools.api.referencing.crs.CoordinateReferenceSystem;
import org.geotools.api.referencing.operation.MathTransform;
import org.geotools.api.referencing.operation.TransformException;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......