mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
89d6b036b4
testsession/start now includes a comment of the form <!-- SUCCESS: DBNAME=DatabaseName -->, which can be used by behat and other consumers to validate that the tesession was actually started. It's included the database name in its output, which is a small piece of information disclosure, but not a big deal compared to the generally dev-only nature of this module. It requires a fix to Cookie::set(), to ensure that set cookies also apperar immediately in $_COOKIE. Otherwise the call to DB::get_alternative_database_name() after it is set won't return a value.
35 lines
935 B
Scheme
35 lines
935 B
Scheme
<!-- SUCCESS: DBNAME=$DatabaseName -->
|
|
<p>
|
|
Started testing session.
|
|
<% if Fixture %>Loaded fixture "$Fixture" into database.<% end_if %>
|
|
Time to start testing; where would you like to start?
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<a id="home-link" href="$BaseHref">Homepage - published site</a>
|
|
</li>
|
|
<li>
|
|
<a id="draft-link" href="$BaseHref/?stage=Stage">Homepage - draft site</a>
|
|
</li>
|
|
<li>
|
|
<a id="admin-link" href="$BaseHref/admin/">CMS Admin</a>
|
|
</li>
|
|
<li>
|
|
<a id="end-link" href="$Link(end)">End your test session</a>
|
|
</li>
|
|
</ul>
|
|
<% include TestSession_State %>
|
|
<form action="$Link(set)">
|
|
<p>
|
|
Enter a fixture file name to add it to the test session.
|
|
Don't forget to visit dev/testsession/end when you're done!
|
|
</p>
|
|
<p>
|
|
Fixture file:
|
|
<input id="fixture-file" name="fixture" />
|
|
</p>
|
|
<input type="hidden" name="flush" value="1">
|
|
<p>
|
|
<input id="start-session" value="Start test session" type="submit" />
|
|
</p>
|
|
</form> |