1
+ import org .openqa .selenium .firefox .FirefoxOptions
2
+ import org .openqa .selenium .firefox .FirefoxDriver
1
3
import sbt .Keys ._
2
4
3
5
import org .scalajs .sbtplugin .ScalaJSCrossVersion
@@ -7,17 +9,23 @@ import org.openqa.selenium.Capabilities
7
9
import org .scalajs .jsenv .selenium .SeleniumJSEnv
8
10
import org .scalajs .jsenv .selenium .TestCapabilities
9
11
10
- val previousVersion : Option [String ] = Some (" 1.1.1" )
12
+ // we're breaking bincompat with the bump to selenium 4
13
+ val previousVersion : Option [String ] = None
11
14
12
15
val newScalaBinaryVersionsInThisRelease : Set [String ] =
13
16
Set ()
14
17
15
18
val commonSettings : Seq [Setting [_]] = Seq (
16
19
version := " 1.1.2-SNAPSHOT" ,
17
20
organization := " org.scala-js" ,
18
- scalaVersion := " 2.11.12" ,
19
- crossScalaVersions := Seq (" 2.11.12" , " 2.12.10" , " 2.13.1" ),
20
- scalacOptions ++= Seq (" -deprecation" , " -feature" , " -Xfatal-warnings" ),
21
+ scalaVersion := " 2.12.20" ,
22
+ crossScalaVersions := Seq (" 2.12.10" , " 2.13.15" , " 3.3.4" ),
23
+ scalacOptions ++= Seq (
24
+ " -deprecation" ,
25
+ " -feature" ,
26
+ " -Xfatal-warnings" ,
27
+ " -Wconf:msg=constructor URL in class URL is deprecated:s" ,
28
+ ),
21
29
22
30
homepage := Some (url(" http://scala-js.org/" )),
23
31
licenses += (" BSD New" ,
@@ -60,7 +68,7 @@ val jsEnvCapabilities = settingKey[org.openqa.selenium.Capabilities](
60
68
61
69
val testSettings : Seq [Setting [_]] = commonSettings ++ Seq (
62
70
jsEnvCapabilities := TestCapabilities .fromEnv,
63
- jsEnv := new SeleniumJSEnv (jsEnvCapabilities.value),
71
+ jsEnv := new SeleniumJSEnv (jsEnvCapabilities.value, SeleniumJSEnv . Config ().withDriverFactory(caps => new FirefoxDriver ( new FirefoxOptions (caps))) ),
64
72
scalaJSUseMainModuleInitializer := true
65
73
)
66
74
@@ -77,10 +85,10 @@ lazy val seleniumJSEnv: Project = project.
77
85
* It pulls in "closure-compiler-java-6" which in turn bundles some old
78
86
* guava stuff which in turn makes selenium fail.
79
87
*/
80
- " org.seleniumhq.selenium" % " selenium-server " % " 3.141.59 " ,
81
- " org.scala-js" %% " scalajs-js-envs" % " 1.1.1" ,
88
+ " org.seleniumhq.selenium" % " selenium-java " % " 4.25.0 " ,
89
+ ( " org.scala-js" %% " scalajs-js-envs" % " 1.1.1" ) cross CrossVersion .for3Use2_13 ,
82
90
" com.google.jimfs" % " jimfs" % " 1.1" ,
83
- " org.scala-js" %% " scalajs-js-envs-test-kit" % " 1.1.1" % " test" ,
91
+ ( " org.scala-js" %% " scalajs-js-envs-test-kit" % " 1.1.1" % " test" ) cross CrossVersion .for3Use2_13 ,
84
92
" com.novocode" % " junit-interface" % " 0.11" % " test"
85
93
),
86
94
@@ -117,7 +125,7 @@ lazy val seleniumJSEnv: Project = project.
117
125
pomIncludeRepository := { _ => false },
118
126
119
127
// The chrome driver seems to not deal with parallelism very well (#47).
120
- parallelExecution in Test := false
128
+ ( Test / parallelExecution) := false
121
129
)
122
130
123
131
lazy val seleniumJSEnvTest : Project = project.
@@ -135,6 +143,7 @@ lazy val seleniumJSHttpEnvTest: Project = project.
135
143
jsEnvCapabilities.value,
136
144
SeleniumJSEnv .Config ()
137
145
.withMaterializeInServer(" tmp" , " http://localhost:8080/tmp/" )
146
+ .withDriverFactory((caps) => new FirefoxDriver (new FirefoxOptions (caps)))
138
147
)
139
148
},
140
149
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind .ESModule ) }
0 commit comments