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

ScalaTest 3.2 #353

Merged
merged 18 commits into from
Oct 7, 2022
Merged

ScalaTest 3.2 #353

merged 18 commits into from
Oct 7, 2022

Conversation

cheeseng
Copy link
Member

@cheeseng cheeseng commented Apr 18, 2022

  • Updated to use ScalaTest 3.2.13.
  • Dropped PhantomJS support.
  • Added support for new MS Edge browser support.

.gitignore Outdated Show resolved Hide resolved
@@ -102,17 +101,23 @@ lazy val `scalatestplus-play` = project
mimaSettings,
organization := "org.scalatestplus.play",
libraryDependencies ++= Seq(
// Note: It seems like the only jackson version that works with all play, play-ws, play-json and selenium is 2.11.4.
// play will bring in older version of selenium as well, so need excluding and let scalatest+selenium brings in the newer version.4
Copy link
Member

Choose a reason for hiding this comment

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

If I remember correctly, this is because new selenium versions do not support Java 8 anymore, but right now Play still is build with Java 8.
However we are going to drop Java 8 very soon, so that would resolve that problem.

project/plugins.sbt Outdated Show resolved Hide resolved
@cheeseng
Copy link
Member Author

@mkurz I just pushed a quick commit according to your comments, do you mind to see if it is fit for merging now?

Thanks!

@cheeseng
Copy link
Member Author

@mkurz I have resolved the conflict and upgraded to use scalatest+selenium 3.2.12.1, which includes a new support for MS Edge browser, do you mind to review and consider merging this when it is convenient for you?

Thanks!

@mkurz
Copy link
Member

mkurz commented May 25, 2022

@cheeseng Sure I will, I was a bit busy the last days, I will be back working on Play soon. Stay tuned.

@cheeseng cheeseng requested a review from mkurz July 9, 2022 09:34
@cheeseng
Copy link
Member Author

cheeseng commented Jul 9, 2022

@mkurz Ping! I have resolved the conflict and this PR is ready for your review again. Thanks!

@mkurz
Copy link
Member

mkurz commented Jul 11, 2022

Thanks @cheeseng! I want to set up GitHub actions before merging this pull request (actually, this is the last repo in the Play organization missing GHA) to make sure this change passes all the tests.

@cheeseng
Copy link
Member Author

@mkurz That's a good idea, I am adding CI build in scalatest+selenium (one of the dependency here) and it seems to work:

scalatest/scalatestplus-selenium#20

But when I added the same ci.yml here it failed with this weird error:

[error] Failed to derive version from git tags. Maybe run `git fetch --unshallow`? Version: 0.0.0+1-1e104898

I am not familiar with this, may be it is related to sbt-dynver?

@cheeseng
Copy link
Member Author

@mkurz By the way I think the current main is broken now? When I tried to build it I got the following error:

cheeseng@cheeseng-RAVEN:~/git/scalatestplus-play$ sbt clean test
[info] welcome to sbt 1.7.1 (GraalVM Community Java 1.8.0_302)
[info] loading global plugins from /home/cheeseng/.sbt/1.0/plugins
[info] loading settings for project scalatestplus-play-build from plugins.sbt ...
[info] loading project definition from /home/cheeseng/git/scalatestplus-play/project
/home/cheeseng/git/scalatestplus-play/build.sbt:35: warning: method sonatypeRepo in class ResolverFunctions is deprecated (since 1.7.0): Use sonatypeOssRepos instead
ThisBuild / resolvers += Resolver.sonatypeRepo("releases")
                                  ^
[info] loading settings for project scalatestplus-play-root from build.sbt ...
[info] set current project to scalatestplus-play-root (in build file:/home/cheeseng/git/scalatestplus-play/)
[success] Total time: 0 s, completed Jul 13, 2022 10:58:49 PM
[info] Updating 
[info] Resolved  dependencies
[warn] 
[warn] 	Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading org.scalatestplus:selenium-4-1_2.13:3.1.4.0
[error]   Not found
[error]   Not found
[error]   not found: /home/cheeseng/.ivy2/local/org.scalatestplus/selenium-4-1_2.13/3.1.4.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://oss.sonatype.org/service/local/repositories/releases/content/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://oss.sonatype.org/content/repositories/snapshots/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://repo.artima.com/releases/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: /home/cheeseng/.m2/repository/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://oss.sonatype.org/content/repositories/orgscalactic-1457/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://oss.sonatype.org/content/repositories/orgscalatest-1753/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error] 	at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:345)
[error] 	at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:314)
[error] 	at scala.util.Either$LeftProjection.map(Either.scala:573)
[error] 	at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:314)
[error] 	at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error] 	at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:59)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:133)
[error] 	at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:146)
[error] 	at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:146)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:127)
[error] 	at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] 	at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:160)
[error] 	at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3688)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] (scalatestplus-play / update) sbt.librarymanagement.ResolveException: Error downloading org.scalatestplus:selenium-4-1_2.13:3.1.4.0
[error]   Not found
[error]   Not found
[error]   not found: /home/cheeseng/.ivy2/local/org.scalatestplus/selenium-4-1_2.13/3.1.4.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://oss.sonatype.org/service/local/repositories/releases/content/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://oss.sonatype.org/content/repositories/snapshots/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://repo.artima.com/releases/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: /home/cheeseng/.m2/repository/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://oss.sonatype.org/content/repositories/orgscalactic-1457/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error]   not found: https://oss.sonatype.org/content/repositories/orgscalatest-1753/org/scalatestplus/selenium-4-1_2.13/3.1.4.0/selenium-4-1_2.13-3.1.4.0.pom
[error] Total time: 10 s, completed Jul 13, 2022 10:59:00 PM

@cheeseng
Copy link
Member Author

@mkurz I have added ci.yml that will run CI, here's the successfully run for this PR:

https://github.com/playframework/scalatestplus-play/runs/7341113874?check_suite_focus=true

Cheers.

@cheeseng
Copy link
Member Author

cheeseng commented Aug 1, 2022

@mkurz Ping again! I have updated the PR to use the newly released ScalaTest 3.2.13, the CI tests run that included in this PR seems to be green also:

https://github.com/playframework/scalatestplus-play/runs/7604177607?check_suite_focus=true

Cheers.

@cheeseng
Copy link
Member Author

cheeseng commented Sep 1, 2022

@mkurz Ping again! I have updated the PR to use selenium 4.4.0 and htmlunit 3.64.0, and the CI build is green.

@mkurz
Copy link
Member

mkurz commented Sep 6, 2022

@cheeseng Thanks again, fantastic! I will have a look asap 👍

…eServerPerSuiteWithOneBrowserPerTestSpec to prevent test failure flickerig.
@cheeseng
Copy link
Member Author

@mkurz Ping again! I fixed the conflict and added some fix to avoid flickering of test failures, the CI passed also, do you mind to look at this again?

Thanks.

@mkurz
Copy link
Member

mkurz commented Sep 21, 2022

@cheeseng Sorry not being responsive here, I want to dedicate time tomorrow for this issue.

@cheeseng
Copy link
Member Author

@mkurz No worry at all, will be looking forward to tomorrow! :)

For the sharable workflow, may I suggest that we address it in a separate PR? As it is quite different from the main intent for this PR.

Cheers.

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.

None yet

3 participants