MINOR: Tweaks to ModelAdmin tabs HTML, and salad tests (from r104078)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112451 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-10-15 01:33:10 +00:00
parent 3b279b30a0
commit e9b8594fe9
2 changed files with 17 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<% if SearchClassSelector = tabs %>
<ul>
<% control ModelForms %>
<li class="$FirstLast"><a href="#{$Form.Name}_$ClassName">$Title</a></li>
<li class="$FirstLast"><a id="tab-ModelAdmin_$Title.HTMLATT" href="#{$Form.Name}_$ClassName">$Title</a></li>
<% end_control %>
</ul>
<% end_if %>

View File

@ -2,8 +2,23 @@
## General rules for the SilverStripe CMS as a whole. They mostly have to do with the LeftAndMain
## interface
# Match general CMS tabs, ModelAdmin needs another system
Given /I click on the "([^\"]*)" tab/ do |tab|
Given "I click the \"tab-Root_Content_set_#{tab}\" link"
found = nil
links = @salad.browser.links()
links.each {|link|
if /^tab-.+/.match(link.id) then
if link.innerText == tab or /^tab-.*#{tab}(_set)?/.match(link.id) then
found = link
break
end
end
}
if found then
Given "I click the \"#{found.id}\" link"
else
fail("Could not find the \"#{tab}\" tab")
end
end
Given /I wait for a status message/ do