Skip to content
Browse files

Full implementation of grouping (fireunit.group('name') and fireunit.…

…groupEnd())
  • Loading branch information...
1 parent 6132618 commit 6266e0539e4f61821892be180bed41dbfc2f9c63 Nicholas C. Zakas committed Apr 5, 2009
Showing with 24 additions and 8 deletions.
  1. +13 −4 chrome/content/fireunit/fireunit.js
  2. +11 −4 chrome/skin/classic/fireunit.css
View
17 chrome/content/fireunit/fireunit.js
@@ -463,7 +463,7 @@ FBL.ns(function() { with (FBL) {
*/
group: function(name){
var panel = context.getPanel(panelName);
- panel.appendGroup(name);
+ panel.appendGroup(name, win.location.href.substr(win.location.href.lastIndexOf("/") + 1));
},
/*
@@ -794,11 +794,13 @@ FBL.ns(function() { with (FBL) {
/*
* Creates a new group entry in the Fireunit console.
* @param {String} name The name of the group to display.
+ * @param {String} fileName The name of the file in which the group is
+ * located.
*/
- appendGroup: function(name){
+ appendGroup: function(name, fileName){
var tbody = this.getTableBase();
Firebug.FireUnitModule.TestResultRep.groupStartTag.insertRows(
- {name: name}, tbody.lastChild ? tbody.lastChild : tbody)[0];
+ {name: name, fileName: fileName}, tbody.lastChild ? tbody.lastChild : tbody)[0];
var row = Firebug.FireUnitModule.TestResultRep.groupContainerTag.insertRows(
{}, tbody.lastChild ? tbody.lastChild : tbody)[0];
if (!this.groups){
@@ -883,7 +885,14 @@ FBL.ns(function() { with (FBL) {
//displays header for group
groupStartTag:
TR({"class": "testGroupStart opened"},
- TD({"class": "testGroupName", "colspan":2}, "$name")
+ TD({"class":"testResultCol", width: "100%"},
+ DIV({"class": "testGroupName"}, "$name")
+ ),
+ TD({"class": "testResultCol"},
+ DIV({"class": "testResultFileName testResultLabel"},
+ "$fileName"
+ )
+ )
),
//container for group contents
View
15 chrome/skin/classic/fireunit.css
@@ -208,12 +208,12 @@
/************************************************************************************************/
-/* Support for Grouping */
+/* Styles for grouping of results */
.testGroupStart {
background: white;
height:17px;
- cursor: pointer;
+ border-bottom: 1px solid #EFEFEF;
}
.testGroupStart:hover {
@@ -226,10 +226,17 @@
background-position: 2px 2px;
font-weight: bold;
padding-left: 18px;
- border-bottom: 1px solid #EFEFEF;
+ cursor: pointer;
+ position: absolute;
+ -moz-user-select: none;
+}
+
+.testGroupStart .testGroupName:hover {
+ color: blue;
+ text-decoration: underline;
}
-.opened > .testGroupName {
+.opened > .testResultCol > .testGroupName {
background-image: url(chrome://firebug/skin/win/twistyOpen.png);
}

0 comments on commit 6266e05

Please sign in to comment.
Something went wrong with that request. Please try again.