Skip to content

Commit

Permalink
Merge branch 'feature-3.2.0-M1'
Browse files Browse the repository at this point in the history
  • Loading branch information
bvenners committed Nov 30, 2019
2 parents 5ae8b59 + bae3dd9 commit 443bf02
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 16 deletions.
24 changes: 20 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name := "selenium-2.45"

organization := "org.scalatestplus"

version := "3.1.0.0-RC3"
version := "3.1.0.0"

homepage := Some(url("https://github.com/scalatest/scalatestplus-selenium"))

Expand All @@ -23,15 +23,31 @@ developers := List(
)
)

crossScalaVersions := List("2.10.7", "2.11.12", "2.12.10", "2.13.0")
crossScalaVersions := List("2.10.7", "2.11.12", "2.12.10", "2.13.1")

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.1.0-RC3",
"org.seleniumhq.selenium" % "selenium-java" % "2.45.0",
"org.scalatest" %% "scalatest" % "3.1.0",
"org.seleniumhq.selenium" % "selenium-java" % "2.45.0",
"org.eclipse.jetty" % "jetty-server" % "9.4.12.v20180830" % "test",
"org.eclipse.jetty" % "jetty-webapp" % "9.4.12.v20180830" % "test"
)

import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _}
import scala.xml.transform.{RewriteRule, RuleTransformer}

// skip dependency elements with a scope
pomPostProcess := { (node: XmlNode) =>
new RuleTransformer(new RewriteRule {
override def transform(node: XmlNode): XmlNodeSeq = node match {
case e: Elem if e.label == "dependency"
&& e.child.exists(child => child.label == "scope") =>
def txt(label: String): String = "\"" + e.child.filter(_.label == label).flatMap(_.text).mkString + "\""
Comment(s""" scoped dependency ${txt("groupId")} % ${txt("artifactId")} % ${txt("version")} % ${txt("scope")} has been omitted """)
case _ => node
}
}).transform(node).head
}

testOptions in Test :=
Seq(
Tests.Argument(TestFrameworks.ScalaTest,
Expand Down
4 changes: 2 additions & 2 deletions src/test/scala/org/scalatestplus/selenium/DriverSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.ie.InternetExplorerDriver
import org.scalatest.tagobjects.Slow

class DriverSpec extends FunSpec {
class DriverSpec extends funspec.AnyFunSpec {

describe("Tests grouped using Driver trait") {

trait GoogleSearchSpec extends FunSpecLike with concurrent.Eventually { this: WebBrowser with Driver =>
trait GoogleSearchSpec extends funspec.AnyFunSpecLike with concurrent.Eventually { this: WebBrowser with Driver =>

describe("google.com") {

Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/org/scalatestplus/selenium/JettySpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import org.scalatest._
import org.eclipse.jetty.server.{NetworkConnector, Server}
import org.eclipse.jetty.webapp.WebAppContext

trait JettySpec extends FunSpec {
trait JettySpec extends funspec.AnyFunSpec {

private val serverThread = new Thread() {
private val server = new Server(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/
package org.scalatestplus.selenium

import org.scalatest.{FunSpec, FunSuite}
import org.scalatest._
import org.scalatest.time.SpanSugar
import java.io.File
import org.scalatest.Args
import org.scalatestplus.selenium.SharedHelpers.SilentReporter
import org.scalatest.Ignore
import org.scalatest.Matchers
import org.scalatest.matchers.should.Matchers

@Ignore
class ScreenshotSpec extends JettySpec with Matchers with SpanSugar with WebBrowser with HtmlUnit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ import org.openqa.selenium.firefox.FirefoxProfile
import org.openqa.selenium.htmlunit.HtmlUnitDriver
import org.openqa.selenium.ie.InternetExplorerDriver
import org.openqa.selenium.safari.SafariDriver
import org.scalatest.Args
import org.scalatest.FunSpec
import org.scalatest.Matchers
import org.scalatest.ParallelTestExecution
import org.scalatest._
import SharedHelpers.SilentReporter
import org.scalatest.Suite
import org.scalatest.exceptions.TestFailedException
Expand All @@ -40,7 +37,7 @@ import org.scalatest.time.SpanSugar
import scala.reflect.ClassTag
import org.scalactic.source.Position.here

trait InputFieldBehaviour extends JettySpec with Matchers with SpanSugar with WebBrowser with HtmlUnit {
trait InputFieldBehaviour extends JettySpec with matchers.should.Matchers with SpanSugar with WebBrowser with HtmlUnit {
def inputField[T <: ValueElement](file: String, fn: (String) => T, typeDescription: String, description: String, value1: String, value2: String, lineNumber: Int): Unit = {
it("should throw TFE with valid stack depth if specified item not found") {
go to (host + file)
Expand Down Expand Up @@ -160,7 +157,7 @@ trait InputFieldBehaviour extends JettySpec with Matchers with SpanSugar with We

}

class WebBrowserSpec extends JettySpec with Matchers with SpanSugar with WebBrowser with HtmlUnit with InputFieldBehaviour {
class WebBrowserSpec extends JettySpec with matchers.should.Matchers with SpanSugar with WebBrowser with HtmlUnit with InputFieldBehaviour {

describe("textField") {
it("should throw TFE with valid stack depth if specified item not found") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.openqa.selenium.WebDriver.{Options, TargetLocator, Navigation}
import org.openqa.selenium._
import org.scalatest.exceptions.TestFailedException
import org.scalatest.exceptions.StackDepthException
import org.scalatest.Matchers
import org.scalatest.matchers.should.Matchers

import org.scalactic.source

Expand Down

0 comments on commit 443bf02

Please sign in to comment.