Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cricket Players Unique Name #27464

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Cricket Players Unique Name #27464

wants to merge 8 commits into from

Conversation

ioannakok
Copy link
Contributor

@ioannakok ioannakok commented Sep 6, 2024

Closes #27442

We need to be able to distinguish between bowlers and catchers that have the same surname. This is a first step to be able to know their unique name.

What is the value of this and can you measure success?

What does this change?

Screenshots

Checklist

ioannakok and others added 7 commits September 24, 2024 12:10
We need to be able to distinguish between bowlers and catchers that have the same surname. This is a first step to be able to know their unique name.

Co-authored-by: Roberto Tyley <[email protected]>
import org.scalatest.matchers.should.Matchers
import test.{ConfiguredTestSuite, WithMaterializer, WithTestApplicationContext, WithTestExecutionContext, WithTestWsClient}

@DoNotDiscover class CricketPaDeserialisationTest
Copy link
Contributor Author

@ioannakok ioannakok Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is WIP so I added @DoNotDiscover to keep the build green. At the moment it's failing with error:

cricket.feed.CricketPaDeserialisationTest *** ABORTED ***
[info]   java.lang.NullPointerException:
[info]   at test.WithMaterializer.materializer(package.scala:121)
[info]   at test.WithMaterializer.materializer$(package.scala:121)
[info]   at cricket.feed.CricketPaDeserialisationTest.materializer$lzycompute(CricketPaDeserialisationTest.scala:11)
[info]   at cricket.feed.CricketPaDeserialisationTest.materializer(CricketPaDeserialisationTest.scala:11)
[info]   at test.WithTestWsClient.$anonfun$lazyWsClient$1(package.scala:127)
[info]   at common.Lazy.get(Lazy.scala:16)
[info]   at common.Lazy$.conversionLazy(Lazy.scala:7)
[info]   at test.WithTestWsClient.wsClient(package.scala:128)
[info]   at test.WithTestWsClient.wsClient$(package.scala:128)
[info]   at cricket.feed.CricketPaDeserialisationTest.wsClient$lzycompute(CricketPaDeserialisationTest.scala:11)

We will probably want to change the test anyway and use test data instead of hitting the PA API.
Examples of xml sports test data in the codebase:
https://github.com/guardian/frontend/tree/main/admin/test/football/testdata
https://github.com/guardian/frontend/blob/main/sport/test/resources/rugby/feed/live-scores.xml

@ioannakok ioannakok changed the title Create a map of cricker players id and unique name Cricket Players Unique Name Sep 24, 2024
We would like to be able to use the full name of a bowler or a catcher if two players in the same team share the same surname. We also want to leave the description as it is if there is no need for subsitution, e.g. when dismissal type is "Run Out"

Co-authored-by: Roberto Tyley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cricket scorecard: Add full name when two bowlers have the same surname
1 participant