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

Fix test running in IntelliJ UI by resolving ScalaTest 3.1 vs 3.2 conflict #4286

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

tonytw1
Copy link
Contributor

@tonytw1 tonytw1 commented Jun 13, 2024

What does this change?

Fixes this error when trying to run a single test in the IntelliJ IDE:

Screenshot 2024-06-09 at 18 43 03

Downgrade "org.scalatestplus" %% "mockito-3-4" to 3.1 series to match the 3.1 ScalaTest pulled in by scalatestplus-play.

Resolves a scalac -deprecation snag which breaks running of tests in IntelliJ. Warns about a deprecation on .right.value but then doesn't know about the new method because ScalaTest 3.2 is not available on the IntelliJ classpath.

This commit works by pushing the transitive ScalaTest from "org.scalatestplus" %% "mockito-3-4" back down to 3.1 for compatibility with "scalatestplus-play".

Notably "scalatestplus-play" cannot be leveled to 6.0.0 / ScalaTest 3.2 without moving to Scala 2.13 because it has not been released for 2.12.

How should a reviewer test this change?

How can success be measured?

Single tests can be run in the IDE. Faster feedback loop. Prevent the urban myth that you can't run tests in the IDE from taking hold.

Who should look at this?

Tested? Documented?

  • locally by committer
  • locally by Guardian reviewer
  • on the Guardian's TEST environment
  • relevant documentation added or amended (if needed)

@tonytw1 tonytw1 changed the title Fix test running in IntelliJ UI by resolving ScalaTest 3.1 vs 3.2 flict Fix test running in IntelliJ UI by resolving ScalaTest 3.1 vs 3.2 conflict Jun 13, 2024
@tonytw1 tonytw1 marked this pull request as ready for review June 13, 2024 21:20
@tonytw1 tonytw1 requested a review from a team as a code owner June 13, 2024 21:20
@tonytw1
Copy link
Contributor Author

tonytw1 commented Jun 13, 2024

CI passes after rebasing to pickup recent docker image during tests changes.

@tonytw1 tonytw1 force-pushed the 20240613-restore-tests-in-intellij branch from 1772477 to bce9bc4 Compare June 13, 2024 21:32
…flict.

Downgrade "org.scalatestplus" %% "mockito-3-4" to 3.1 series to match the 3.1 ScalaTest pulled in by scalatestplus-play.

Resolves a scalac -deprecation snag which breaks running of tests in IntelliJ.
Warns about a deprecation on .right.value but then doesn't know about the new method because ScalaTest 3.2 is not available on the IntelliJ classpath.

This commit works by pushing the transitive ScalaTest from "org.scalatestplus" %% "mockito-3-4" back down to 3.1 for compatibility with "scalatestplus-play".

Notably "scalatestplus-play" cannot be leveled to 6.0.0 / ScalaTest 3.2 without moving to Scala 2.13 because it has not been released for 2.12.
@tonytw1 tonytw1 force-pushed the 20240613-restore-tests-in-intellij branch from bce9bc4 to 9086e36 Compare June 25, 2024 08:26
@prout-bot
Copy link

Seen on auth, usage, image-loader, metadata-editor, leases, cropper, media-api, kahuna (merged by @tonytw1 25 minutes and 35 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on thrall (merged by @tonytw1 25 minutes and 39 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on collections (merged by @tonytw1 25 minutes and 43 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants