mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR: Tweaks to ModelAdmin tabs HTML, and salad tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@104078 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0aba4e6bc1
commit
cbc0b0a849
@ -6,7 +6,7 @@
|
|||||||
<% if SearchClassSelector = tabs %>
|
<% if SearchClassSelector = tabs %>
|
||||||
<ul class="tabstrip">
|
<ul class="tabstrip">
|
||||||
<% control ModelForms %>
|
<% 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 %>
|
<% end_control %>
|
||||||
</ul>
|
</ul>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
@ -28,4 +28,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end_control %>
|
<% end_control %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,8 +2,23 @@
|
|||||||
## General rules for the SilverStripe CMS as a whole. They mostly have to do with the LeftAndMain
|
## General rules for the SilverStripe CMS as a whole. They mostly have to do with the LeftAndMain
|
||||||
## interface
|
## interface
|
||||||
|
|
||||||
|
# Match general CMS tabs, ModelAdmin needs another system
|
||||||
Given /I click on the "([^\"]*)" tab/ do |tab|
|
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
|
end
|
||||||
|
|
||||||
Given /I wait for a status message/ do
|
Given /I wait for a status message/ do
|
||||||
|
Loading…
Reference in New Issue
Block a user