diff --git a/build.gradle b/build.gradle index c6857d1..a5bb7e5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ plugins { - id 'org.springframework.boot' version '2.4.4' - id 'io.spring.dependency-management' version '1.0.11.RELEASE' + id 'org.springframework.boot' version '2.7.18' + id 'io.spring.dependency-management' version '1.1.6' id 'java' } group = 'org.commandline' version = '0.0.1-SNAPSHOT' -sourceCompatibility = '11' +sourceCompatibility = '21' configurations { compileOnly { @@ -22,6 +22,7 @@ ext { set('testcontainersVersion', "1.15.2") set('jdbiVersion', "3.18.0") set('junitJupiterVersion','5.6.2') + set('lombokVersion', '1.18.34') } dependencies { @@ -33,9 +34,9 @@ dependencies { implementation "org.jdbi:jdbi3-sqlobject:${jdbiVersion}" implementation "org.jdbi:jdbi3-postgres:${jdbiVersion}" implementation "org.flywaydb:flyway-core" - compileOnly 'org.projectlombok:lombok' - runtimeOnly 'org.postgresql:postgresql' - annotationProcessor 'org.projectlombok:lombok' + compileOnly "org.projectlombok:lombok:${lombokVersion}" + runtimeOnly "org.postgresql:postgresql" + annotationProcessor "org.projectlombok:lombok:${lombokVersion}" testImplementation "org.testcontainers:postgresql:${testcontainersVersion}" testImplementation "org.testcontainers:selenium:${testcontainersVersion}" testImplementation "org.seleniumhq.selenium:selenium-remote-driver" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f371643..e1adfb4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/test/java/org/commandline/grocerypos/SeleniumUIWebIntegrationTests.java b/src/test/java/org/commandline/grocerypos/SeleniumUIWebIntegrationTests.java index d018fbb..35cf5d6 100644 --- a/src/test/java/org/commandline/grocerypos/SeleniumUIWebIntegrationTests.java +++ b/src/test/java/org/commandline/grocerypos/SeleniumUIWebIntegrationTests.java @@ -3,6 +3,7 @@ import org.commandline.grocerypos.testutil.ScreenshotOnFailureExtension; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.RemoteWebDriver; @@ -30,15 +31,15 @@ public class SeleniumUIWebIntegrationTests { public void testHappyPath() { RemoteWebDriver webDriver = this.container.getWebDriver(); webDriver.get("http://host.docker.internal:" + port + "/index"); - WebElement messageElement = webDriver.findElementById("greeting"); + WebElement messageElement = webDriver.findElement(By.id("greeting")); assertEquals("Hello, POS system!", messageElement.getText()); - WebElement input = webDriver.findElementById("nextItemId"); + WebElement input = webDriver.findElement(By.id("nextItemId")); input.sendKeys("1"); - WebElement submit = webDriver.findElementById("submitButton"); + WebElement submit = webDriver.findElement(By.id("submitButton")); submit.click(); - WebElement lineItemOne = webDriver.findElementById("lineItem-1"); + WebElement lineItemOne = webDriver.findElement(By.id("lineItem-1")); assertTrue(lineItemOne.getText().contains("Buzz Cola")); - WebElement total = webDriver.findElementById("total"); + WebElement total = webDriver.findElement(By.id("total")); assertTrue(total.getText().contains("$1.50")); } }