Skip to content

Commit

Permalink
Merge pull request #104 from hmrc/PLATUI-2243_uplift-dependencies
Browse files Browse the repository at this point in the history
PLATUI-2243: Uplifted dependencies
  • Loading branch information
JoPintoPaul committed Apr 3, 2023
2 parents 3d3b999 + 41a168c commit 2b046d8
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 35 deletions.
2 changes: 1 addition & 1 deletion app/uk/gov/hmrc/helpfrontend/views/CookiesTable.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@this(govukTable: GovukTable)

@(id: String, section: String, cookieIds: Seq[String], captionKey: Option[String] = Some("help.cookies.how_used.default.table.caption"),
captionClasses: String = "")(implicit request: Request[_], messages: Messages, appConfig: AppConfig)
captionClasses: String = "")(implicit request: Request[_], messages: Messages)
@cookies = @{
for (cookieId <- cookieIds) yield
Cookie(
Expand Down
2 changes: 0 additions & 2 deletions app/uk/gov/hmrc/helpfrontend/views/Layout.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*@

@import uk.gov.hmrc.helpfrontend.config.AppConfig
@import views.html.helper.CSPNonce

@this(
hmrcReportTechnicalIssueHelper: HmrcReportTechnicalIssueHelper,
Expand All @@ -31,7 +30,6 @@
@hmrcLayout(
pageTitle = pageTitle,
displayHmrcBanner = true,
nonce = CSPNonce.get,
isWelshTranslationAvailable = true,
accessibilityStatementUrl = appConfig.accessibilityStatementUrl
)(content)
15 changes: 3 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import uk.gov.hmrc.DefaultBuildSettings.addTestReportOption
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin.publishingSettings

val appName = "help-frontend"

Expand Down Expand Up @@ -37,26 +36,18 @@ lazy val microservice = Project(appName, file("."))
.settings(
majorVersion := 4,
PlayKeys.playDefaultPort := 9240,
scalaVersion := "2.12.12",
scalaVersion := "2.13.8",
libraryDependencies ++= AppDependencies.compile ++ AppDependencies.test,
TwirlKeys.templateImports ++= Seq(
"uk.gov.hmrc.helpfrontend.config.AppConfig",
"uk.gov.hmrc.govukfrontend.views.html.components._",
"uk.gov.hmrc.hmrcfrontend.views.html.components._",
"uk.gov.hmrc.hmrcfrontend.views.html.helpers._"
),
// ***************
// Use the silencer plugin to suppress warnings
// You may turn it on for `views` too to suppress warnings from unused imports in compiled twirl templates, but this will hide other warnings.
scalacOptions += "-P:silencer:pathFilters=views;routes",
scalacOptions += "-Wconf:src=routes/.*:s",
scalacOptions += "-Wconf:cat=unused-imports&src=html/.*:s",
Assets / pipelineStages := Seq(gzip),
PlayKeys.devSettings ++= Seq("metrics.enabled" -> "false"),
libraryDependencies ++= Seq(
compilerPlugin("com.github.ghik" % "silencer-plugin" % silencerVersion cross CrossVersion.full),
"com.github.ghik" % "silencer-lib" % silencerVersion % Provided cross CrossVersion.full
),
// ***************
publishingSettings,
unitTestSettings,
integrationTestSettings,
acceptanceTestSettings
Expand Down
6 changes: 0 additions & 6 deletions conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ include "frontend.conf"
appName = "help-frontend"
play.http.router = prod.Routes

# An ApplicationLoader that uses Guice to bootstrap the application.
play.application.loader = "uk.gov.hmrc.play.bootstrap.ApplicationLoader"

# Primary entry point for all HTTP requests on Play applications
play.http.requestHandler = "uk.gov.hmrc.play.bootstrap.http.RequestHandler"

# Provides an implementation of AuditConnector. Use `uk.gov.hmrc.play.audit.AuditModule` or create your own.
# An audit connector must be provided.
play.modules.enabled += "uk.gov.hmrc.play.audit.AuditModule"
Expand Down
4 changes: 2 additions & 2 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import sbt._

object AppDependencies {

private val bootstrapVersion = "7.12.0"
private val bootstrapVersion = "7.15.0"

val compile = Seq(
"uk.gov.hmrc" %% "bootstrap-frontend-play-28" % bootstrapVersion,
"uk.gov.hmrc" %% "play-frontend-hmrc" % "5.3.0-play-28"
"uk.gov.hmrc" %% "play-frontend-hmrc" % "7.3.0-play-28"
)

val test = Seq(
Expand Down
8 changes: 4 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefact

resolvers += Resolver.typesafeRepo("releases")

addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.8.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.1.0")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.18")
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.9.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.2.0")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.19")
addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-accessibility-linter" % "0.27.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-accessibility-linter" % "0.35.0")
6 changes: 3 additions & 3 deletions test/acceptance/pages/OnlineServicesTermsPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import acceptance.conf.TestConfiguration
import org.openqa.selenium.{By, WebDriver}
import org.scalatestplus.selenium.Page

import collection.JavaConverters._
import scala.jdk.CollectionConverters._

object OnlineServicesTermsPage extends BasePage {
override val url: String =
Expand All @@ -33,15 +33,15 @@ object OnlineServicesTermsPage extends BasePage {

def subHeadings(implicit webDriver: WebDriver): Seq[String] = {
val subHeadingElements = webDriver.findElements(By.className("govuk-heading-l")).asScala
subHeadingElements.map(_.getText)
subHeadingElements.toSeq.map(_.getText)
}

def links(implicit webDriver: WebDriver): Seq[String] = {
val linkElements = webDriver
.findElement(By.className("govuk-main-wrapper"))
.findElements(By.className("govuk-link"))
.asScala
linkElements.map(_.getAttribute("href"))
linkElements.toSeq.map(_.getAttribute("href"))
}

def languageOfPage(implicit webDriver: WebDriver): String = webDriver
Expand Down
10 changes: 5 additions & 5 deletions test/it/RedirectIntegrationSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import play.api.test.FakeRequest
import play.api.test.Helpers._

import scala.concurrent.Await
import scala.concurrent.duration._
import scala.concurrent.duration.{SECONDS, _}

class RedirectIntegrationSpec extends AnyWordSpec with Matchers {

Expand All @@ -49,15 +49,15 @@ class RedirectIntegrationSpec extends AnyWordSpec with Matchers {
"respond with a 301 redirect" in {
val app = buildApp()

val response: Result = Await.result(route(app, cookiesRequest).get, 1 seconds)
val response: Result = Await.result(route(app, cookiesRequest).get, Duration(1, SECONDS))

response.header.status shouldBe MOVED_PERMANENTLY
}

"redirect to tracking consent running locally" in {
val app = buildApp()

val response: Result = Await.result(route(app, cookiesRequest).get, 1 seconds)
val response: Result = Await.result(route(app, cookiesRequest).get, Duration(1, SECONDS))

val headers = response.header.headers

Expand All @@ -71,7 +71,7 @@ class RedirectIntegrationSpec extends AnyWordSpec with Matchers {
Map("platform.frontend.host" -> "https://example.com")
)

val response: Result = Await.result(route(app, cookiesRequest).get, 1 seconds)
val response: Result = Await.result(route(app, cookiesRequest).get, Duration(1, SECONDS))

val headers = response.header.headers

Expand All @@ -85,7 +85,7 @@ class RedirectIntegrationSpec extends AnyWordSpec with Matchers {
"respond with a 200" in {
val app = buildApp()

val response: Result = Await.result(route(app, cookieDetailsRequest).get, 1 seconds)
val response: Result = Await.result(route(app, cookieDetailsRequest).get, Duration(1, SECONDS))

response.header.status shouldBe OK
}
Expand Down

0 comments on commit 2b046d8

Please sign in to comment.