Permalink
Browse files

Use safari

  • Loading branch information...
sdelamo committed Oct 17, 2018
1 parent 1f41786 commit 95e9ffe45bef8b2d570f95c44f850e8caab341f8
View
@@ -59,6 +59,8 @@ dependencies {
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testRuntime "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-safari-driver', version: '3.14.0'
testCompile "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testCompile "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
testCompile "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
@@ -61,7 +61,9 @@ class BookingCRUDSpec extends GebReportingSpec {
page.buttons.create()
then:
at CreateBookingPage
waitFor {
at CreateBookingPage
}
}
def 'enter the details'() {
@@ -82,7 +84,9 @@ class BookingCRUDSpec extends GebReportingSpec {
page.save()
then:
at BookingShowPage
waitFor {
at BookingShowPage
}
}
def 'check the entered details'() {
@@ -117,7 +121,9 @@ class BookingCRUDSpec extends GebReportingSpec {
editPage.buttons.update()
then:
at BookingShowPage
waitFor {
at BookingShowPage
}
}
def 'check in listing'() {
@@ -126,7 +132,9 @@ class BookingCRUDSpec extends GebReportingSpec {
page.nav.home()
then:
at BookingListPage
waitFor {
at BookingListPage
}
when:
BookingListPage listPage = browser.page BookingListPage
@@ -149,7 +157,9 @@ class BookingCRUDSpec extends GebReportingSpec {
page.table.select('Tim Cook')
then:
at BookingShowPage
waitFor {
at BookingShowPage
}
and:
BookingShowPage showPage = browser.page BookingShowPage
@@ -165,7 +175,9 @@ class BookingCRUDSpec extends GebReportingSpec {
withConfirm { page.buttons.delete() }
then:
at BookingListPage
waitFor {
at BookingListPage
}
when:
BookingListPage listPage = browser.page BookingListPage
@@ -30,7 +30,9 @@ class ExtraCRUDSpec extends GebReportingSpec {
page.buttons.create()
then:
at CreateExtraPage
waitFor {
at CreateExtraPage
}
}
def 'enter the extra details'() {
@@ -42,7 +44,9 @@ class ExtraCRUDSpec extends GebReportingSpec {
page.save()
then:
at ShowExtraPage
waitFor {
at ShowExtraPage
}
}
def 'check the entered details for the extra'() {
@@ -68,7 +72,9 @@ class ExtraCRUDSpec extends GebReportingSpec {
editPage.buttons.update()
then:
at ShowExtraPage
waitFor {
at ShowExtraPage
}
}
def 'check extra in listing'() {
@@ -100,7 +106,9 @@ class ExtraCRUDSpec extends GebReportingSpec {
page.table.select('English Breakfast')
then:
at ShowExtraPage
waitFor {
at ShowExtraPage
}
}
def 'delete extra'() {
@@ -111,7 +119,9 @@ class ExtraCRUDSpec extends GebReportingSpec {
withConfirm { page.buttons.delete() }
then:
at ExtraListPage
waitFor {
at ExtraListPage
}
when:
ExtraListPage listPage = browser.page ExtraListPage
@@ -30,7 +30,9 @@ class RoomCRUDSpec extends GebReportingSpec {
page.buttons.create()
then:
at CreateRoomPage
waitFor {
at CreateRoomPage
}
}
def 'enter the details'() {
@@ -42,7 +44,9 @@ class RoomCRUDSpec extends GebReportingSpec {
page.save()
then:
at ShowRoomPage
waitFor {
at ShowRoomPage
}
}
def 'check the entered details'() {
@@ -68,7 +72,9 @@ class RoomCRUDSpec extends GebReportingSpec {
editPage.buttons.update()
then:
at ShowRoomPage
waitFor {
at ShowRoomPage
}
}
def 'check in listing'() {
@@ -100,7 +106,9 @@ class RoomCRUDSpec extends GebReportingSpec {
page.table.select('Room101')
then:
at ShowRoomPage
waitFor {
at ShowRoomPage
}
}
def 'delete room'() {
@@ -111,7 +119,9 @@ class RoomCRUDSpec extends GebReportingSpec {
withConfirm { page.buttons.delete() }
then:
at RoomListPage
waitFor {
at RoomListPage
}
when:
RoomListPage listPage = browser.page RoomListPage
@@ -2,9 +2,15 @@ import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.safari.SafariDriver
environments {
// You need to configure in Safari -> Develop -> Allowed Remote Automation
safari {
driver = { new SafariDriver() }
}
// run via “./gradlew -Dgeb.env=chrome iT”
chrome {
driver = { new ChromeDriver() }

0 comments on commit 95e9ffe

Please sign in to comment.