diff --git a/identity/app/idapiclient/parser/JsonBodyParser.scala b/identity/app/idapiclient/parser/JsonBodyParser.scala index 645bd0b03e99..b108f785b416 100644 --- a/identity/app/idapiclient/parser/JsonBodyParser.scala +++ b/identity/app/idapiclient/parser/JsonBodyParser.scala @@ -16,7 +16,7 @@ trait JsonBodyParser extends Logging { extractJsonObj: JValue => JValue = identity, )(httpResponseResponse: Response[HttpResponse])(implicit successType: Manifest[T]): Response[T] = { - httpResponseResponse.right.flatMap { httpResponse => + httpResponseResponse.flatMap { httpResponse => try { httpResponse match { case HttpResponse(body, status, message) if status == 502 => diff --git a/identity/app/services/PlaySigninService.scala b/identity/app/services/PlaySigninService.scala index 765298d3c6d8..8a10d6662af9 100644 --- a/identity/app/services/PlaySigninService.scala +++ b/identity/app/services/PlaySigninService.scala @@ -14,7 +14,7 @@ class PlaySigninService(conf: IdentityConfiguration) extends SafeLogging { executionContext: ExecutionContext, ): Future[Response[List[Cookie]]] = { cookiesResponse map { - _.right.map(getCookies(_, rememberMe)) + _.map(getCookies(_, rememberMe)) } } diff --git a/identity/test/idapiclient/IdApiTest.scala b/identity/test/idapiclient/IdApiTest.scala index fff649ad4eac..2122a3295c8b 100644 --- a/identity/test/idapiclient/IdApiTest.scala +++ b/identity/test/idapiclient/IdApiTest.scala @@ -125,8 +125,8 @@ class IdApiTest ) val cookies = cookiesResponse.values cookies.size must equal(1) - cookies(0) must have('key ("SC_GU_U")) - cookies(0) must have('value ("testCookieValue")) + cookies(0) must have(Symbol("key")("SC_GU_U")) + cookies(0) must have(Symbol("value")("testCookieValue")) } } } @@ -154,8 +154,8 @@ class IdApiTest whenReady(idApi.user(testUserId)) { case Left(result) => fail("Got Left(%s), instead of expected Right".format(result.toString())) case Right(user) => { - user must have('id (testUserId)) - user.publicFields must have('username (Some("testUsername"))) + user must have(Symbol("id")(testUserId)) + user.publicFields must have(Symbol("username")(Some("testUsername"))) user.primaryEmailAddress mustEqual "test@example.com" } } diff --git a/identity/test/idapiclient/parser/JsonBodyParserTest.scala b/identity/test/idapiclient/parser/JsonBodyParserTest.scala index 0c3a63f8b174..5537bf281525 100644 --- a/identity/test/idapiclient/parser/JsonBodyParserTest.scala +++ b/identity/test/idapiclient/parser/JsonBodyParserTest.scala @@ -27,7 +27,7 @@ class JsonBodyParserTest extends PathAnyFreeSpec with Matchers { "returns a parse error if the JSON is not valid" in { TestJsonBodyParser.extract[TestType]()(Right(invalidJSONResponse)) match { case Right(result) => fail("extractJsonOrError did not return a Left, got %s".format(result.toString)) - case Left(errors) => errors(0) should have('message ("JSON parsing exception")) + case Left(errors) => errors(0) should have(Symbol("message")("JSON parsing exception")) } } @@ -41,7 +41,7 @@ class JsonBodyParserTest extends PathAnyFreeSpec with Matchers { "extracts the provided type from the JSON body of a successful response" in { TestJsonBodyParser.extract[TestType]()(Right(validJSONResponse)) match { case Left(result) => fail("extract did not return a Right, got Left(%s)".format(result.toString())) - case Right(testObject: TestType) => testObject should have('test ("value")) + case Right(testObject: TestType) => testObject should have(Symbol("test")("value")) case Right(result) => fail("extract did not return a Right of the required type, got a %s".format(result.getClass.getName)) } diff --git a/preview/app/views/showcase.scala.html b/preview/app/views/showcase.scala.html index 1f669527f1cb..bc2e7b2f1628 100644 --- a/preview/app/views/showcase.scala.html +++ b/preview/app/views/showcase.scala.html @@ -79,7 +79,7 @@

Showcase

} - @for(panel <- rundownPanelOutcomes.right.toOption) { + @for(panel <- rundownPanelOutcomes.toOption) {
  • @panel.panelTitle

    @showcase_articlegroup(panel.articleGroup) @@ -96,7 +96,7 @@

    @panel.panelTitle

  • } - @for(panel <- panelOutcome.right.toOption) { + @for(panel <- panelOutcome.toOption) {
  • @for(panelTitle <- panel.panelTitle) {

    diff --git a/sport/test/FixturesFeatureTest.scala b/sport/test/FixturesFeatureTest.scala index a2baf7d0bdfe..6bd78270b214 100644 --- a/sport/test/FixturesFeatureTest.scala +++ b/sport/test/FixturesFeatureTest.scala @@ -4,7 +4,7 @@ import org.scalatest.featurespec.AnyFeatureSpec import org.scalatest.matchers.should.Matchers import org.scalatest.{DoNotDiscover, GivenWhenThen} -import collection.JavaConverters._ +import scala.jdk.CollectionConverters._ import tools.MatchListFeatureTools @DoNotDiscover class FixturesFeatureTest diff --git a/sport/test/ResultsFeatureTest.scala b/sport/test/ResultsFeatureTest.scala index ddf19ff849f9..6269735b9865 100644 --- a/sport/test/ResultsFeatureTest.scala +++ b/sport/test/ResultsFeatureTest.scala @@ -4,7 +4,7 @@ import org.scalatest.featurespec.AnyFeatureSpec import org.scalatest.matchers.should.Matchers import org.scalatest.{DoNotDiscover, GivenWhenThen} -import collection.JavaConverters._ +import scala.jdk.CollectionConverters._ import tools.MatchListFeatureTools @DoNotDiscover class ResultsFeatureTest diff --git a/sport/test/football/model/CompetitionStageTest.scala b/sport/test/football/model/CompetitionStageTest.scala index 47b3602e10cd..b1884e2eb979 100644 --- a/sport/test/football/model/CompetitionStageTest.scala +++ b/sport/test/football/model/CompetitionStageTest.scala @@ -106,13 +106,13 @@ import test._ } "does not add leagueTableEntries for other rounds to group stage" in { - all(leagueTableEntries0) should have('stageNumber ("1")) - all(leagueTableEntries1) should have('stageNumber ("2")) + all(leagueTableEntries0) should have(Symbol("stageNumber")("1")) + all(leagueTableEntries1) should have(Symbol("stageNumber")("2")) } "can get the matches for a given round" in { val testRound = Round("1", Some("Group A")) - all(stages(0).asInstanceOf[Groups].roundMatches(testRound)) should have('round (testRound)) + all(stages(0).asInstanceOf[Groups].roundMatches(testRound)) should have(Symbol("round")(testRound)) } } } @@ -139,8 +139,8 @@ import test._ } "does not add leagueTableEntries for other stages" in { - all(leagueTable0) should have('stageNumber ("1")) - all(leagueTable1) should have('stageNumber ("2")) + all(leagueTable0) should have(Symbol("stageNumber")("1")) + all(leagueTable1) should have(Symbol("stageNumber")("2")) } } } @@ -169,7 +169,7 @@ import test._ "can get the matches for a given round" in { val testRound = Round("1", Some("Quarter Final")) - all(stages(0).asInstanceOf[Knockout].roundMatches(testRound)) should have('round (testRound)) + all(stages(0).asInstanceOf[Knockout].roundMatches(testRound)) should have(Symbol("round")(testRound)) } } diff --git a/sport/test/tools/MatchListFeatureTools.scala b/sport/test/tools/MatchListFeatureTools.scala index 0e9053607bf9..23707da2509c 100644 --- a/sport/test/tools/MatchListFeatureTools.scala +++ b/sport/test/tools/MatchListFeatureTools.scala @@ -4,7 +4,7 @@ import org.fluentlenium.core.domain.{FluentList, FluentWebElement} import org.openqa.selenium.interactions.Actions import play.api.test.TestBrowser -import collection.JavaConverters._ +import scala.jdk.CollectionConverters._ import org.scalatest.matchers.should.Matchers trait MatchListFeatureTools extends Matchers {