Removed superfluous 'tracks' directory at the root of the repository.

Testing commits to github.
This commit is contained in:
bsag 2008-05-20 21:28:26 +01:00
parent 6a42901514
commit 4cbf5a34d3
2269 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,19 @@
Description:
Generates a stub Selenium test case.
Examples:
./script/generate selenium login
will create:
/test/selenium/login.sel
./script/generate selenium user/create
will create:
/test/selenium/user/create.sel
./script/generate selenium login.rsel
will create:
/test/selenium/login.rsel
./script/generate selenium logout.rhtml
will create:
/test/selenium/logout.rhtml

View file

@ -0,0 +1,50 @@
class SeleniumGenerator < Rails::Generator::Base
def initialize runtime_args, runtime_options = {}
super
usage if @args.empty?
end
def banner
"Usage: #{$0} #{spec.name} testname [options]"
end
def manifest
record do |m|
path = 'test/selenium'
path = File.join(path, suite_path) unless suite_path.empty?
m.directory path
template = case File.extname(filename)
when '.rhtml' then 'rhtml.rhtml'
when '.rsel' then 'rselenese.rhtml'
else 'selenese.rhtml'
end
m.template template, File.join(path, filename)
end
end
def filename
name = File.basename args[0]
extensions = ['.sel', '.rhtml', '.rsel']
name = "#{name}.sel" unless extensions.include? File.extname(name)
name
end
def suite_path
sp = File.dirname args[0]
sp = '' if sp == '.'
sp
end
def testcase_link
l = "http://localhost:3000/selenium/tests/"
l = "#{l}#{suite_path}/" unless suite_path.empty?
l + filename
end
def suite_link
l = "http://localhost:3000/selenium"
l = "#{l}/TestRunner.html?test=tests/#{suite_path}" unless suite_path.empty?
l
end
end

View file

@ -0,0 +1,16 @@
<p>It's often a good idea to start the test with opening <tt>/selenium/setup</tt> (see <%%= link_to 'here', :controller => 'selenium', :action => 'setup' %> for more info).</p>
<table>
<tr><th colspan="3"><%%= @page_title %></th></tr>
<tr><td>open</td><td>/selenium/setup</td><td>&nbsp;</td></tr>
<%% for page in ['/', '/home'] -%>
<tr><td>open</td><td><%%= page %></td><td>&nbsp;</td></tr>
<tr><td>assertTitle</td><td>Home</td><td>&nbsp;</td></tr>
<%% end -%>
</table>
<p>More information about the commands is available <a href="http://release.openqa.org/selenium-core/nightly/reference.html">here</a>.</p>
<p>You can write comments above and below the commands, but you can only have one set of commands, i.e. one table, per test.</p>
<p>Point the browser to <a href="<%= testcase_link %>"><%= testcase_link %></a> to see how this test is rendered, or to <a href="<%= suite_link %>"><%= suite_link %></a> to run the suite.</p>

View file

@ -0,0 +1,14 @@
# It's often a good idea to start the test with 'setup'.
# See /selenium/setup for more info.
setup
open '/'
assert_title 'Home'
# More information about the commands is available at:
# http://release.openqa.org/selenium-core/nightly/reference.html
# See also the RDoc for SeleniumOnRails::TestBuilder.
#
# Point the browser to <%= testcase_link %> to see
# how this test is rendered, or to <%= suite_link %> to
# run the suite.

View file

@ -0,0 +1,11 @@
It's often a good idea to start the test with opening <tt>/selenium/setup</tt> (see "here":/selenium/setup for more info).
|open|/selenium/setup|
|open|/|
|assertTitle|Home|
More information about the commands is available "here":http://release.openqa.org/selenium-core/nightly/reference.html.
You can write comments above and below the commands, but you can only have one set of commands, i.e. one table, per test. "RedCloth":http://www.whytheluckystiff.net/ruby/redcloth/ is used for formatting if installed.
Point the browser to "<%= testcase_link %>":<%= testcase_link %> to see how this test is rendered, or to "<%= suite_link %>":<%= suite_link %> to run the suite.