Skip to content

Instantly share code, notes, and snippets.

@fflorent
Last active August 29, 2015 13:57
Show Gist options
  • Save fflorent/9495047 to your computer and use it in GitHub Desktop.
Save fflorent/9495047 to your computer and use it in GitHub Desktop.
/**
* Instructions :
* 1) Go to https://getfirebug.com/testresults, select the "Users" tab
* 2) Expand two groups of your choice
* 3) Run the snippet below in the Console of your choice, as long as it is Firebug :)
*
* License: WTFPL (https://fr.wikipedia.org/wiki/WTF_Public_License)
*/
var groups = $$(".groupBodyRow");
if (groups.length !== 2)
throw "eh, I am only able to compare two groups!";
// Get the textContent of the link of the failures.
var [failures1, failures2] = groups.map((x) => $$(".objectLink", x).map(y => y.textContent));
// Do the filter
var in1Exclusively = failures1.filter((x) => failures2.indexOf(x) === -1);
var in2Exclusively = failures2.filter((x) => failures1.indexOf(x) === -1);
// Extract the informations of the environment for the two test results.
var [label1, label2] = groups.map((x) => x.previousSibling.querySelector(".testGroupInfo").textContent);
// Print the result of the diff
for (let [labelX, inXExclusively] of [[label1, in1Exclusively], [label2, in2Exclusively]])
{
console.log("errors in %c%s%c exclusively : %o", "color:grey; font-weight: bold",
labelX, "color:black; font-style: normal", inXExclusively);
}
@SebastianZ
Copy link

Thanks for that! Btw. a very cool licensing model. ;-)

Sebastian

@fflorent
Copy link
Author

My pleasure :)

Florent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment