mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FEATURE: Add 'Given I load the fixture file "app/tests/xyz.yml"' step to salad
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104232 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4b9b1dd928
commit
21af61e666
@ -1,5 +1,28 @@
|
||||
# Reset database
|
||||
if $baseURL and $browser then
|
||||
$browser.goto $baseURL + 'dev/tests/endsession'
|
||||
$browser.goto $baseURL + 'dev/tests/startsession?fixture=sapphire/tests/Bare.yml&flush=1'
|
||||
def loadFixture(fileName)
|
||||
if $baseURL and $browser then
|
||||
$browser.goto $baseURL + "dev/tests/sessionloadyml?fixture=" + fileName + "&flush=1"
|
||||
else
|
||||
fail("No \$baseUrl or \$browser found")
|
||||
end
|
||||
end
|
||||
|
||||
def startSession
|
||||
# Reset database
|
||||
if $baseURL and $browser then
|
||||
$browser.goto $baseURL + 'dev/tests/endsession'
|
||||
else
|
||||
fail("No \$baseUrl or \$browser found")
|
||||
end
|
||||
fileName = 'sapphire/tests/Bare.yml'
|
||||
if $baseURL and $browser then
|
||||
$browser.goto $baseURL + "dev/tests/startsession?fixture=" + fileName + "&flush=1"
|
||||
else
|
||||
fail("No \$baseUrl or \$browser found")
|
||||
end
|
||||
end
|
||||
|
||||
Given /load the fixture file "([^"]+)"/ do |fileName|
|
||||
loadFixture(fileName)
|
||||
end
|
||||
|
||||
startSession()
|
||||
|
Loading…
Reference in New Issue
Block a user