Last active
August 29, 2015 13:57
-
-
Save fflorent/9495047 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for that! Btw. a very cool licensing model. ;-)
Sebastian