New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gemini-gui

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gemini-gui - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

lib/views/partials/cswitcher.hbs

7

CHANGELOG.md
# Changelog
## 0.2.0 - 2015-04-17
* Work with `gemini` 0.10.x (@SevInf).
* Allow to choose color of background in image boxes (@unlok).
* Correctly update title colors of a parent nodes when replacing
the image (j0tunn).
## 0.1.3 - 2015-02-03

@@ -4,0 +11,0 @@

24

lib/app.js

@@ -78,7 +78,6 @@ 'use strict';

App.prototype.buildDiff = function(referencePath, currentPath) {
var _this = this,
diffPath = temp.path({dir: this.diffDir, suffix: '.png'});
return this._gemini.buildDiff(referencePath, currentPath, diffPath)
.then(function() {
App.prototype.buildDiff = function(failureReport) {
var _this = this;
return this._buildDiffFile(failureReport)
.then(function(diffPath) {
return _this.diffPathToURL(diffPath);

@@ -88,2 +87,17 @@ });

App.prototype._buildDiffFile = function(failureReport) {
var diffPath = temp.path({dir: this.diffDir, suffix: '.png'});
if (typeof failureReport.saveDiffTo === 'function') {
// gemini 0.10.0+ method
return failureReport.saveDiffTo(diffPath).thenResolve(diffPath);
}
// gemini < 0.10 method
return this._gemini.buildDiff(
failureReport.referencePath,
failureReport.currentPath,
diffPath
).thenResolve(diffPath);
};
App.prototype.addFailedTest = function(test) {

@@ -90,0 +104,0 @@ this._failedTests.add(test);

@@ -7,4 +7,9 @@ /*jshint browser:true*/

runButton,
sections;
sections,
forEach = Array.prototype.forEach,
filter = Array.prototype.filter,
hbruntime = require('hbsfy/runtime');
hbruntime.registerPartial('cswitcher', require('../views/partials/cswitcher.hbs'));
function failAllParents(section) {

@@ -121,2 +126,38 @@ while ((section = sections.findParent(section))) {

function handleColorSwitch(target, sources) {
var imageBox = findClosest(target, 'image-box');
sources.forEach(function(item) {
item.classList.remove('cswitcher__item_selected');
});
forEach.call(imageBox.classList, function(cls) {
if (/cswitcher_color_\d+/.test(cls)) {
imageBox.classList.remove(cls);
}
});
target.classList.add('cswitcher__item_selected');
imageBox.classList.add('cswitcher_color_' + target.dataset.id);
}
function bodyClick(e) {
var target = e.target;
if (target.classList.contains('cswitcher__item')) {
handleColorSwitch(
target,
filter.call(target.parentNode.childNodes, function(node) {
return node.nodeType === Node.ELEMENT_NODE;
})
);
}
}
function findClosest(context, cls) {
while ((context = context.parentNode)) {
if (context.classList.contains(cls)) {
return context;
}
}
}
document.addEventListener('DOMContentLoaded', function() {

@@ -131,2 +172,3 @@ sections = new SectionList();

runButton.addEventListener('click', run);
document.body.addEventListener('click', bodyClick);
});

@@ -11,3 +11,5 @@ /*jshint browser:true*/

this._sections = map.call(document.querySelectorAll('.section'), function(node) {
var section = new Section(node);
var parentNode = this._findParentSectionNode(node),
section = new Section(node, parentNode && this._sectionForNode(parentNode));
this._sectionsIndex.add(section);

@@ -19,3 +21,3 @@ return section;

SectionList.prototype = {
constuctor: SectionList,
constructor: SectionList,

@@ -22,0 +24,0 @@ expandAll: function() {

@@ -32,3 +32,3 @@ 'use strict';

function Section(node) {
function Section(node, parent) {
this.suiteId = node.getAttribute('data-suite-id');

@@ -42,6 +42,7 @@ this.stateName = node.getAttribute('data-state-name');

this._titleNode.addEventListener('click', this.toggle.bind(this));
this._parent = parent;
}
Section.prototype = {
constuctor: Section,
constructor: Section,
expand:function() {

@@ -88,4 +89,15 @@ this.domNode.classList.remove('section_collapsed');

setAsSuccess: function(results) {
var failedChild = this.domNode.querySelector('.section.' + statusClass('fail'));
if (failedChild) {
return;
}
this.status = 'success';
this._bodyNode.innerHTML = successTemplate(results);
if (results) {
this._bodyNode.innerHTML = successTemplate(results);
}
if (this._parent && this._parent.status === 'fail') {
this._parent.setAsSuccess();
}
},

@@ -92,0 +104,0 @@

@@ -7,3 +7,3 @@ 'use strict';

COMPATIBLE_GEMINI = '0.8.x || 0.9.x';
COMPATIBLE_GEMINI = ' >= 0.8.x < 0.11.0';

@@ -10,0 +10,0 @@ module.exports = function findGemini() {

@@ -35,3 +35,3 @@ 'use strict';

});
app.buildDiff(data.referencePath, data.currentPath)
app.buildDiff(data)
.done(function(diffURL) {

@@ -38,0 +38,0 @@ response.diffURL = diffURL;

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";function SectionList(){this._sectionsIndex=new Index,this._sections=map.call(document.querySelectorAll(".section"),function(t){var e=new Section(t);return this._sectionsIndex.add(e),e},this)}var Section=require("./section"),Index=require("../common/tests-index"),map=Array.prototype.map,every=Array.prototype.every;SectionList.prototype={constuctor:SectionList,expandAll:function(){this._sections.forEach(function(t){t.expand()})},collapseAll:function(){this._sections.forEach(function(t){t.collapse()})},expandErrors:function(){this._sections.forEach(function(t){t.expandIfError()})},markAllAsQueued:function(){this._sections.forEach(function(t){t.status="queued"})},markIfFinished:function(t){if("fail"!==t.status){var e=t.domNode.querySelectorAll(".section"),n=every.call(e,function(t){return this._sectionForNode(t).isFinished()},this);n&&(t.status="success")}},findSection:function(t){return this._sectionsIndex.find(t)},findParent:function(t){if(t.browserId)return this.findSection({suiteId:t.suiteId,stateName:t.stateName});if(t.stateName)return this.findSection({suiteId:t.suiteId});var e=this._findParentSectionNode(t.domNode);return e?this._sectionForNode(e):null},_findParentSectionNode:function(t){for(;t=t.parentNode;)if(t.classList&&t.classList.contains("section"))return t;return null},_sectionForNode:function(t){var e={suiteId:t.getAttribute("data-suite-id"),stateName:t.getAttribute("data-state-name"),browserId:t.getAttribute("data-browser-id")};return this.findSection(e)}},module.exports=SectionList;
"use strict";function SectionList(){this._sectionsIndex=new Index,this._sections=map.call(document.querySelectorAll(".section"),function(t){var e=this._findParentSectionNode(t),n=new Section(t,e&&this._sectionForNode(e));return this._sectionsIndex.add(n),n},this)}var Section=require("./section"),Index=require("../common/tests-index"),map=Array.prototype.map,every=Array.prototype.every;SectionList.prototype={constructor:SectionList,expandAll:function(){this._sections.forEach(function(t){t.expand()})},collapseAll:function(){this._sections.forEach(function(t){t.collapse()})},expandErrors:function(){this._sections.forEach(function(t){t.expandIfError()})},markAllAsQueued:function(){this._sections.forEach(function(t){t.status="queued"})},markIfFinished:function(t){if("fail"!==t.status){var e=t.domNode.querySelectorAll(".section"),n=every.call(e,function(t){return this._sectionForNode(t).isFinished()},this);n&&(t.status="success")}},findSection:function(t){return this._sectionsIndex.find(t)},findParent:function(t){if(t.browserId)return this.findSection({suiteId:t.suiteId,stateName:t.stateName});if(t.stateName)return this.findSection({suiteId:t.suiteId});var e=this._findParentSectionNode(t.domNode);return e?this._sectionForNode(e):null},_findParentSectionNode:function(t){for(;t=t.parentNode;)if(t.classList&&t.classList.contains("section"))return t;return null},_sectionForNode:function(t){var e={suiteId:t.getAttribute("data-suite-id"),stateName:t.getAttribute("data-state-name"),browserId:t.getAttribute("data-browser-id")};return this.findSection(e)}},module.exports=SectionList;
},{"../common/tests-index":5,"./section":2}],2:[function(require,module,exports){
"use strict";function statusClass(t){return"section_status_"+t}function getInitialStatus(t){for(var s,e=0;e<statusList.length;e++)if(s=statusList[e],t.classList.contains(statusClass(s)))return s;return null}function Section(t){this.suiteId=t.getAttribute("data-suite-id"),this.stateName=t.getAttribute("data-state-name"),this.browserId=t.getAttribute("data-browser-id"),this.domNode=t,this._status=getInitialStatus(t),this._titleNode=t.querySelector(".section__title"),this._bodyNode=t.querySelector(".section__body"),this._titleNode.addEventListener("click",this.toggle.bind(this))}var successTemplate=require("../views/partials/success-result.hbs"),failTemplate=require("../views/partials/fail-result.hbs"),errorTemplate=require("../views/partials/error-result.hbs"),skipTemplate=require("../views/partials/skip-result.hbs"),xhr=require("./xhr"),statusList=["idle","queued","running","success","fail","skip"];Section.prototype={constuctor:Section,expand:function(){this.domNode.classList.remove("section_collapsed")},collapse:function(){this.domNode.classList.add("section_collapsed")},toggle:function(){this.domNode.classList.toggle("section_collapsed")},get status(){return this._status},set status(t){this._status&&this.domNode.classList.remove(statusClass(this._status)),this._status=t,this.domNode.classList.add(statusClass(this._status))},expandIfError:function(){"fail"===this.status?this.expand():this.collapse()},setAsFailure:function(t){this.status="fail",this._bodyNode.innerHTML=failTemplate(t);var s=this._bodyNode.querySelector(".image-box__replace");s.addEventListener("click",this.updateReference.bind(this))},setAsSuccess:function(t){this.status="success",this._bodyNode.innerHTML=successTemplate(t)},setAsSkipped:function(){this.status="skipped",this._bodyNode.innerHTML=skipTemplate()},setAsError:function(t){this.status="fail",this._bodyNode.innerHTML=errorTemplate(t)},isFinished:function(){return"queued"!==this.status&&"running"!==this.status},updateReference:function(){var t=this,s={suiteId:this.suiteId,stateName:this.stateName,browserId:this.browserId};xhr.post("/update-ref",s,function(s,e){s||t.setAsSuccess(e)})}},module.exports=Section;
},{"../views/partials/error-result.hbs":6,"../views/partials/fail-result.hbs":7,"../views/partials/skip-result.hbs":8,"../views/partials/success-result.hbs":9,"./xhr":3}],3:[function(require,module,exports){
"use strict";function statusClass(t){return"section_status_"+t}function getInitialStatus(t){for(var s,e=0;e<statusList.length;e++)if(s=statusList[e],t.classList.contains(statusClass(s)))return s;return null}function Section(t,s){this.suiteId=t.getAttribute("data-suite-id"),this.stateName=t.getAttribute("data-state-name"),this.browserId=t.getAttribute("data-browser-id"),this.domNode=t,this._status=getInitialStatus(t),this._titleNode=t.querySelector(".section__title"),this._bodyNode=t.querySelector(".section__body"),this._titleNode.addEventListener("click",this.toggle.bind(this)),this._parent=s}var successTemplate=require("../views/partials/success-result.hbs"),failTemplate=require("../views/partials/fail-result.hbs"),errorTemplate=require("../views/partials/error-result.hbs"),skipTemplate=require("../views/partials/skip-result.hbs"),xhr=require("./xhr"),statusList=["idle","queued","running","success","fail","skip"];Section.prototype={constructor:Section,expand:function(){this.domNode.classList.remove("section_collapsed")},collapse:function(){this.domNode.classList.add("section_collapsed")},toggle:function(){this.domNode.classList.toggle("section_collapsed")},get status(){return this._status},set status(t){this._status&&this.domNode.classList.remove(statusClass(this._status)),this._status=t,this.domNode.classList.add(statusClass(this._status))},expandIfError:function(){"fail"===this.status?this.expand():this.collapse()},setAsFailure:function(t){this.status="fail",this._bodyNode.innerHTML=failTemplate(t);var s=this._bodyNode.querySelector(".image-box__replace");s.addEventListener("click",this.updateReference.bind(this))},setAsSuccess:function(t){var s=this.domNode.querySelector(".section."+statusClass("fail"));s||(this.status="success",t&&(this._bodyNode.innerHTML=successTemplate(t)),this._parent&&"fail"===this._parent.status&&this._parent.setAsSuccess())},setAsSkipped:function(){this.status="skipped",this._bodyNode.innerHTML=skipTemplate()},setAsError:function(t){this.status="fail",this._bodyNode.innerHTML=errorTemplate(t)},isFinished:function(){return"queued"!==this.status&&"running"!==this.status},updateReference:function(){var t=this,s={suiteId:this.suiteId,stateName:this.stateName,browserId:this.browserId};xhr.post("/update-ref",s,function(s,e){s||t.setAsSuccess(e)})}},module.exports=Section;
},{"../views/partials/error-result.hbs":7,"../views/partials/fail-result.hbs":8,"../views/partials/skip-result.hbs":9,"../views/partials/success-result.hbs":10,"./xhr":3}],3:[function(require,module,exports){
"use strict";exports.post=function(e,n,t){t||(t=n,n=null);var s=new XMLHttpRequest;s.open("POST",e,!0),s.setRequestHeader("Content-Type","application/json"),s.onload=function(){var e=JSON.parse(s.responseText);200===s.status?t(null,e):t(new Error(e.error))},n?s.send(JSON.stringify(n)):s.send()};
},{}],4:[function(require,module,exports){
"use strict";function failAllParents(e){for(;e=sections.findParent(e);)e.status="fail",e.expand()}function listenForEvents(){var e=new EventSource("/events");e.addEventListener("beginSuite",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId});"queued"===n.status&&(n.status="running")}),e.addEventListener("beginState",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});"queued"===n.status&&(n.status="running")}),e.addEventListener("endTest",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});t.equal?n.setAsSuccess(t):(n.setAsFailure(t),n.expand(),failAllParents(n))}),e.addEventListener("skipState",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});n.setAsSkipped();var s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});sections.markIfFinished(s)}),e.addEventListener("error",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});n.setAsError({stack:t.stack}),n.expand(),failAllParents(n)}),e.addEventListener("endState",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});sections.markIfFinished(n)}),e.addEventListener("endSuite",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});sections.markIfFinished(n)}),e.addEventListener("end",function(){runButton.disabled=!1})}function run(){runButton.disabled=!0,xhr.post("/run",function(e){e||sections.markAllAsQueued()})}var SectionList=require("./section-list"),xhr=require("./xhr"),byId=document.getElementById.bind(document),runButton,sections;document.addEventListener("DOMContentLoaded",function(){sections=new SectionList,runButton=byId("run"),listenForEvents(),byId("expandAll").addEventListener("click",sections.expandAll.bind(sections)),byId("collapseAll").addEventListener("click",sections.collapseAll.bind(sections)),byId("expandErrors").addEventListener("click",sections.expandErrors.bind(sections)),runButton.addEventListener("click",run)});
},{"./section-list":1,"./xhr":3}],5:[function(require,module,exports){
"use strict";function failAllParents(e){for(;e=sections.findParent(e);)e.status="fail",e.expand()}function listenForEvents(){var e=new EventSource("/events");e.addEventListener("beginSuite",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId});"queued"===s.status&&(s.status="running")}),e.addEventListener("beginState",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});"queued"===s.status&&(s.status="running")}),e.addEventListener("endTest",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});t.equal?s.setAsSuccess(t):(s.setAsFailure(t),s.expand(),failAllParents(s))}),e.addEventListener("skipState",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});s.setAsSkipped();var n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});sections.markIfFinished(n)}),e.addEventListener("error",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});s.setAsError({stack:t.stack}),s.expand(),failAllParents(s)}),e.addEventListener("endState",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});sections.markIfFinished(s)}),e.addEventListener("endSuite",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});sections.markIfFinished(s)}),e.addEventListener("end",function(e){runButton.disabled=!1})}function run(){runButton.disabled=!0,xhr.post("/run",function(e,t){e||sections.markAllAsQueued()})}function handleColorSwitch(e,t){var s=findClosest(e,"image-box");t.forEach(function(e){e.classList.remove("cswitcher__item_selected")}),forEach.call(s.classList,function(e){/cswitcher_color_\d+/.test(e)&&s.classList.remove(e)}),e.classList.add("cswitcher__item_selected"),s.classList.add("cswitcher_color_"+e.dataset.id)}function bodyClick(e){var t=e.target;t.classList.contains("cswitcher__item")&&handleColorSwitch(t,filter.call(t.parentNode.childNodes,function(e){return e.nodeType===Node.ELEMENT_NODE}))}function findClosest(e,t){for(;e=e.parentNode;)if(e.classList.contains(t))return e}var SectionList=require("./section-list"),xhr=require("./xhr"),byId=document.getElementById.bind(document),runButton,sections,forEach=Array.prototype.forEach,filter=Array.prototype.filter,hbruntime=require("hbsfy/runtime");hbruntime.registerPartial("cswitcher",require("../views/partials/cswitcher.hbs")),document.addEventListener("DOMContentLoaded",function(){sections=new SectionList,runButton=byId("run"),listenForEvents(),byId("expandAll").addEventListener("click",sections.expandAll.bind(sections)),byId("collapseAll").addEventListener("click",sections.collapseAll.bind(sections)),byId("expandErrors").addEventListener("click",sections.expandErrors.bind(sections)),runButton.addEventListener("click",run),document.body.addEventListener("click",bodyClick)});
},{"../views/partials/cswitcher.hbs":6,"./section-list":1,"./xhr":3,"hbsfy/runtime":18}],5:[function(require,module,exports){
"use strict";function TestsIndex(){this._index={}}TestsIndex.prototype={constructor:TestsIndex,add:function(t){if(null!=t.suiteId){var e=this._index[t.suiteId];if(e||(e=this._index[t.suiteId]={suite:null,states:{}}),null==t.stateName)return void(e.suite=t);var s=e.states[t.stateName];return s||(s=e.states[t.stateName]={state:null,browsers:{}}),null==t.browserId?void(s.state=t):void(s.browsers[t.browserId]=t)}},find:function(t){var e=this._index[t.suiteId];if(!e)return null;if(null==t.stateName)return e.suite;var s=e.states[t.stateName];return s?null==t.browserId?s.state:s.browsers[t.browserId]||null:null}},module.exports=TestsIndex;
},{}],6:[function(require,module,exports){
var HandlebarsCompiler=require("hbsfy/runtime");module.exports=HandlebarsCompiler.template(function(e,i,c,r,s){return this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,e.helpers),s=s||{},'<div class="cswitcher">\n <div data-id="1" class="cswitcher__item cswitcher_color_1 cswitcher__item_selected"></div>\n <div data-id="2" class="cswitcher__item cswitcher_color_2"></div>\n <div data-id="3" class="cswitcher__item cswitcher_color_3"></div>\n</div>\n'});
},{"hbsfy/runtime":18}],7:[function(require,module,exports){
var HandlebarsCompiler=require("hbsfy/runtime");module.exports=HandlebarsCompiler.template(function(e,a,r,s,t){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),t=t||{};var l,n,c="",i="function",p=this.escapeExpression;return c+='<pre class="stacktrace">\n',(n=r.stack)?l=n.call(a,{hash:{},data:t}):(n=a&&a.stack,l=typeof n===i?n.call(a,{hash:{},data:t}):n),c+=p(l)+"\n</pre>\n"});
},{"hbsfy/runtime":17}],7:[function(require,module,exports){
var HandlebarsCompiler=require("hbsfy/runtime");module.exports=HandlebarsCompiler.template(function(e,a,i,t,n){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),n=n||{};var s,l,r="",c="function",d=this.escapeExpression;return r+='<div class="image-box">\n <div class="image-box__image">\n <div class="image-box__title">Reference</div>\n <img src="',(l=i.referenceURL)?s=l.call(a,{hash:{},data:n}):(l=a&&a.referenceURL,s=typeof l===c?l.call(a,{hash:{},data:n}):l),r+=d(s)+'" alt="Reference image">\n </div>\n <button class="button image-box__replace">&#x2b05;</button>\n <div class="image-box__image">\n <div class="image-box__title">Current</div>\n <img src="',(l=i.currentURL)?s=l.call(a,{hash:{},data:n}):(l=a&&a.currentURL,s=typeof l===c?l.call(a,{hash:{},data:n}):l),r+=d(s)+'" alt="Current image">\n </div>\n <div class="image-box__image">\n <div class="image-box__title">Diff</div>\n <img src="',(l=i.diffURL)?s=l.call(a,{hash:{},data:n}):(l=a&&a.diffURL,s=typeof l===c?l.call(a,{hash:{},data:n}):l),r+=d(s)+'" alt="Diff image">\n </div>\n</div>\n'});
},{"hbsfy/runtime":17}],8:[function(require,module,exports){
},{"hbsfy/runtime":18}],8:[function(require,module,exports){
var HandlebarsCompiler=require("hbsfy/runtime");module.exports=HandlebarsCompiler.template(function(e,a,i,t,s){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),t=this.merge(t,e.partials),s=s||{};var r,n,l="",c=this,d="function",m=this.escapeExpression;return l+='<div class="image-box">\n ',r=c.invokePartial(t.cswitcher,"cswitcher",a,i,t,s),(r||0===r)&&(l+=r),l+='\n <div class="image-box__image">\n <div class="image-box__title">Reference</div>\n <img src="',(n=i.referenceURL)?r=n.call(a,{hash:{},data:s}):(n=a&&a.referenceURL,r=typeof n===d?n.call(a,{hash:{},data:s}):n),l+=m(r)+'" alt="Reference image">\n </div>\n <button class="button image-box__replace">&#x2b05;</button>\n <div class="image-box__image">\n <div class="image-box__title">Current</div>\n <img src="',(n=i.currentURL)?r=n.call(a,{hash:{},data:s}):(n=a&&a.currentURL,r=typeof n===d?n.call(a,{hash:{},data:s}):n),l+=m(r)+'" alt="Current image">\n </div>\n <div class="image-box__image">\n <div class="image-box__title">Diff</div>\n <img src="',(n=i.diffURL)?r=n.call(a,{hash:{},data:s}):(n=a&&a.diffURL,r=typeof n===d?n.call(a,{hash:{},data:s}):n),l+=m(r)+'" alt="Diff image">\n </div>\n</div>\n'});
},{"hbsfy/runtime":18}],9:[function(require,module,exports){
var HandlebarsCompiler=require("hbsfy/runtime");module.exports=HandlebarsCompiler.template(function(e,r,p,i,s){return this.compilerInfo=[4,">= 1.0.0"],p=this.merge(p,e.helpers),s=s||{},"<p>Test skipped</p>\n"});
},{"hbsfy/runtime":17}],9:[function(require,module,exports){
var HandlebarsCompiler=require("hbsfy/runtime");module.exports=HandlebarsCompiler.template(function(e,a,r,i,n){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),n=n||{};var s,l,t="",c="function",m=this.escapeExpression;return t+='<div class="image-box">\n <div class="image-box__image">\n <img src="',(l=r.referenceURL)?s=l.call(a,{hash:{},data:n}):(l=a&&a.referenceURL,s=typeof l===c?l.call(a,{hash:{},data:n}):l),t+=m(s)+'" alt="Reference image">\n </div>\n</div>\n'});
},{"hbsfy/runtime":17}],10:[function(require,module,exports){
},{"hbsfy/runtime":18}],10:[function(require,module,exports){
var HandlebarsCompiler=require("hbsfy/runtime");module.exports=HandlebarsCompiler.template(function(e,a,i,r,s){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),r=this.merge(r,e.partials),s=s||{};var n,t,l="",c=this,h="function",m=this.escapeExpression;return l+='<div class="image-box">\n ',n=c.invokePartial(r.cswitcher,"cswitcher",a,i,r,s),(n||0===n)&&(l+=n),l+='\n <div class="image-box__image">\n <img src="',(t=i.referenceURL)?n=t.call(a,{hash:{},data:s}):(t=a&&a.referenceURL,n=typeof t===h?t.call(a,{hash:{},data:s}):t),l+=m(n)+'" alt="Reference image">\n </div>\n</div>\n'});
},{"hbsfy/runtime":18}],11:[function(require,module,exports){
"use strict";var base=require("./handlebars/base"),SafeString=require("./handlebars/safe-string")["default"],Exception=require("./handlebars/exception")["default"],Utils=require("./handlebars/utils"),runtime=require("./handlebars/runtime"),create=function(){var e=new base.HandlebarsEnvironment;return Utils.extend(e,base),e.SafeString=SafeString,e.Exception=Exception,e.Utils=Utils,e.VM=runtime,e.template=function(r){return runtime.template(r,e)},e},Handlebars=create();Handlebars.create=create,exports["default"]=Handlebars;
},{"./handlebars/base":11,"./handlebars/exception":12,"./handlebars/runtime":13,"./handlebars/safe-string":14,"./handlebars/utils":15}],11:[function(require,module,exports){
},{"./handlebars/base":12,"./handlebars/exception":13,"./handlebars/runtime":14,"./handlebars/safe-string":15,"./handlebars/utils":16}],12:[function(require,module,exports){
"use strict";function HandlebarsEnvironment(e,r){this.helpers=e||{},this.partials=r||{},registerDefaultHelpers(this)}function registerDefaultHelpers(e){e.registerHelper("helperMissing",function(e){if(2===arguments.length)return void 0;throw new Exception("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(r,t){var i=t.inverse||function(){},n=t.fn;return isFunction(r)&&(r=r.call(this)),r===!0?n(this):r===!1||null==r?i(this):isArray(r)?r.length>0?e.helpers.each(r,t):i(this):n(r)}),e.registerHelper("each",function(e,r){var t,i=r.fn,n=r.inverse,s=0,l="";if(isFunction(e)&&(e=e.call(this)),r.data&&(t=createFrame(r.data)),e&&"object"==typeof e)if(isArray(e))for(var o=e.length;o>s;s++)t&&(t.index=s,t.first=0===s,t.last=s===e.length-1),l+=i(e[s],{data:t});else for(var a in e)e.hasOwnProperty(a)&&(t&&(t.key=a,t.index=s,t.first=0===s),l+=i(e[a],{data:t}),s++);return 0===s&&(l=n(this)),l}),e.registerHelper("if",function(e,r){return isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||Utils.isEmpty(e)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(r,t){return e.helpers["if"].call(this,r,{fn:t.inverse,inverse:t.fn,hash:t.hash})}),e.registerHelper("with",function(e,r){return isFunction(e)&&(e=e.call(this)),Utils.isEmpty(e)?void 0:r.fn(e)}),e.registerHelper("log",function(r,t){var i=t.data&&null!=t.data.level?parseInt(t.data.level,10):1;e.log(i,r)})}function log(e,r){logger.log(e,r)}var Utils=require("./utils"),Exception=require("./exception")["default"],VERSION="1.3.0";exports.VERSION=VERSION;var COMPILER_REVISION=4;exports.COMPILER_REVISION=COMPILER_REVISION;var REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};exports.REVISION_CHANGES=REVISION_CHANGES;var isArray=Utils.isArray,isFunction=Utils.isFunction,toString=Utils.toString,objectType="[object Object]";exports.HandlebarsEnvironment=HandlebarsEnvironment,HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:logger,log:log,registerHelper:function(e,r,t){if(toString.call(e)===objectType){if(t||r)throw new Exception("Arg not supported with multiple helpers");Utils.extend(this.helpers,e)}else t&&(r.not=t),this.helpers[e]=r},registerPartial:function(e,r){toString.call(e)===objectType?Utils.extend(this.partials,e):this.partials[e]=r}};var logger={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,r){if(logger.level<=e){var t=logger.methodMap[e];"undefined"!=typeof console&&console[t]&&console[t].call(console,r)}}};exports.logger=logger,exports.log=log;var createFrame=function(e){var r={};return Utils.extend(r,e),r};exports.createFrame=createFrame;
},{"./exception":12,"./utils":15}],12:[function(require,module,exports){
},{"./exception":13,"./utils":16}],13:[function(require,module,exports){
"use strict";function Exception(r,e){var o;e&&e.firstLine&&(o=e.firstLine,r+=" - "+o+":"+e.firstColumn);for(var t=Error.prototype.constructor.call(this,r),i=0;i<errorProps.length;i++)this[errorProps[i]]=t[errorProps[i]];o&&(this.lineNumber=o,this.column=e.firstColumn)}var errorProps=["description","fileName","lineNumber","message","name","number","stack"];Exception.prototype=new Error,exports["default"]=Exception;
},{}],13:[function(require,module,exports){
},{}],14:[function(require,module,exports){
"use strict";function checkRevision(e){var r=e&&e[0]||1,t=COMPILER_REVISION;if(r!==t){if(t>r){var n=REVISION_CHANGES[t],o=REVISION_CHANGES[r];throw new Exception("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}throw new Exception("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function template(e,r){if(!r)throw new Exception("No environment passed to template");var t=function(e,t,n,o,a,i){var p=r.VM.invokePartial.apply(this,arguments);if(null!=p)return p;if(r.compile){var l={helpers:o,partials:a,data:i};return a[t]=r.compile(e,{data:void 0!==i},r),a[t](n,l)}throw new Exception("The partial "+t+" could not be compiled when running in runtime-only mode")},n={escapeExpression:Utils.escapeExpression,invokePartial:t,programs:[],program:function(e,r,t){var n=this.programs[e];return t?n=program(e,r,t):n||(n=this.programs[e]=program(e,r)),n},merge:function(e,r){var t=e||r;return e&&r&&e!==r&&(t={},Utils.extend(t,r),Utils.extend(t,e)),t},programWithDepth:r.VM.programWithDepth,noop:r.VM.noop,compilerInfo:null};return function(t,o){o=o||{};var a,i,p=o.partial?o:r;o.partial||(a=o.helpers,i=o.partials);var l=e.call(n,p,t,a,i,o.data);return o.partial||r.VM.checkRevision(n.compilerInfo),l}}function programWithDepth(e,r,t){var n=Array.prototype.slice.call(arguments,3),o=function(e,o){return o=o||{},r.apply(this,[e,o.data||t].concat(n))};return o.program=e,o.depth=n.length,o}function program(e,r,t){var n=function(e,n){return n=n||{},r(e,n.data||t)};return n.program=e,n.depth=0,n}function invokePartial(e,r,t,n,o,a){var i={partial:!0,helpers:n,partials:o,data:a};if(void 0===e)throw new Exception("The partial "+r+" could not be found");return e instanceof Function?e(t,i):void 0}function noop(){return""}var Utils=require("./utils"),Exception=require("./exception")["default"],COMPILER_REVISION=require("./base").COMPILER_REVISION,REVISION_CHANGES=require("./base").REVISION_CHANGES;exports.checkRevision=checkRevision,exports.template=template,exports.programWithDepth=programWithDepth,exports.program=program,exports.invokePartial=invokePartial,exports.noop=noop;
},{"./base":11,"./exception":12,"./utils":15}],14:[function(require,module,exports){
},{"./base":12,"./exception":13,"./utils":16}],15:[function(require,module,exports){
"use strict";function SafeString(t){this.string=t}SafeString.prototype.toString=function(){return""+this.string},exports["default"]=SafeString;
},{}],15:[function(require,module,exports){
},{}],16:[function(require,module,exports){
"use strict";function escapeChar(t){return escape[t]||"&amp;"}function extend(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function escapeExpression(t){return t instanceof SafeString?t.toString():t||0===t?(t=""+t,possible.test(t)?t.replace(badChars,escapeChar):t):""}function isEmpty(t){return t||0===t?isArray(t)&&0===t.length?!0:!1:!0}var SafeString=require("./safe-string")["default"],escape={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},badChars=/[&<>"'`]/g,possible=/[&<>"'`]/;exports.extend=extend;var toString=Object.prototype.toString;exports.toString=toString;var isFunction=function(t){return"function"==typeof t};isFunction(/x/)&&(isFunction=function(t){return"function"==typeof t&&"[object Function]"===toString.call(t)});var isFunction;exports.isFunction=isFunction;var isArray=Array.isArray||function(t){return t&&"object"==typeof t?"[object Array]"===toString.call(t):!1};exports.isArray=isArray,exports.escapeExpression=escapeExpression,exports.isEmpty=isEmpty;
},{"./safe-string":14}],16:[function(require,module,exports){
},{"./safe-string":15}],17:[function(require,module,exports){
module.exports=require("./dist/cjs/handlebars.runtime");
},{"./dist/cjs/handlebars.runtime":10}],17:[function(require,module,exports){
},{"./dist/cjs/handlebars.runtime":11}],18:[function(require,module,exports){
module.exports=require("handlebars/runtime")["default"];
},{"handlebars/runtime":16}]},{},[4])
},{"handlebars/runtime":17}]},{},[4])
//# sourceMappingURL=/client.js.map.json

@@ -1,1 +0,1 @@

{"version":3,"file":"bundle.js","sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","lib/client","lib/client/section-list.js","lib/client/xhr.js","lib/client/section.js","lib/common/tests-index.js","lib/views/partials/success-result.hbs","lib/views/partials/fail-result.hbs","lib/views/partials/error-result.hbs","lib/views/partials/skip-result.hbs","node_modules/hbsfy/runtime.js","node_modules/handlebars/runtime.js","node_modules/handlebars/dist/cjs/handlebars.runtime.js","node_modules/handlebars/dist/cjs/handlebars/safe-string.js","node_modules/handlebars/dist/cjs/handlebars/base.js","node_modules/handlebars/dist/cjs/handlebars/exception.js","node_modules/handlebars/dist/cjs/handlebars/utils.js","node_modules/handlebars/dist/cjs/handlebars/runtime.js"],"names":["SectionList","this","_sectionsIndex","Index","_sections","map","call","document","querySelectorAll","node","section","Section","add","require","Array","prototype","every","constuctor","expandAll","forEach","expand","collapseAll","collapse","expandErrors","expandIfError","markAllAsQueued","status","markIfFinished","nodes","domNode","allChildrenFinished","_sectionForNode","isFinished","findSection","query","find","findParent","browserId","suiteId","stateName","parentSectionNode","_findParentSectionNode","parentNode","classList","contains","getAttribute","module","exports","post","url","data","callback","xhr","XMLHttpRequest","open","setRequestHeader","onload","JSON","parse","responseText","Error","error","send","stringify","statusClass","getInitialStatus","sectionNode","i","statusList","length","_status","_titleNode","querySelector","_bodyNode","addEventListener","toggle","bind","successTemplate","failTemplate","errorTemplate","skipTemplate","remove",{"end":{"file":"?","comments_before":[],"nlb":false,"endpos":1552,"pos":1546,"col":8,"line":57,"value":"status","type":"name"},"start":{"file":"?","comments_before":[],"nlb":false,"endpos":1552,"pos":1546,"col":8,"line":57,"value":"status","type":"name"},"name":"status"},"value","setAsFailure","results","innerHTML","replaceButton","updateReference","setAsSuccess","setAsSkipped","setAsError","_this","postData","response","TestsIndex","_index","constructor","item","indexData","suite","states","stateData","state","browsers","HandlebarsCompiler","template","Handlebars","depth0","helpers","partials","compilerInfo","merge","stack1","helper","buffer","functionType","escapeExpression","referenceURL","hash","currentURL","diffURL","stack","base","SafeString","Exception","Utils","runtime","create","hb","HandlebarsEnvironment","extend","VM","spec","string","toString","registerDefaultHelpers","instance","registerHelper","arg","arguments","undefined","context","options","inverse","fn","isFunction","isArray","each","ret","createFrame","j","index","first","last","key","hasOwnProperty","conditional","includeZero","isEmpty","level","parseInt","log","obj","logger","VERSION","COMPILER_REVISION","REVISION_CHANGES",1,2,3,4,"objectType","name","not","registerPartial","str","methodMap","DEBUG","INFO","WARN","ERROR","method","console","object","message","line","firstLine","firstColumn","tmp","idx","errorProps","lineNumber","column","escapeChar","chr","escape","Object","possible","test","replace","badChars","&","<",">","\"","'","`","checkRevision","compilerRevision","currentRevision","runtimeVersions","compilerVersions","templateSpec","env","invokePartialWrapper","partial","result","invokePartial","apply","compile","container","programs","program","programWrapper","param","common","programWithDepth","noop","namespace","args","slice","prog","concat","depth","Function"],"mappings":"AAAA;AECA,YAMA,SAASA,eACLC,KAAKC,eAAiB,GAAIC,OAC1BF,KAAKG,UAAYC,IAAIC,KAAKC,SAASC,iBAAiB,YAAa,SAASC,GACtE,GAAIC,GAAU,GAAIC,SAAQF,EAE1B,OADAR,MAAKC,eAAeU,IAAIF,GACjBA,GACRT,MAXP,GAAIU,SAAUE,QAAQ,aAClBV,MAAQU,QAAQ,yBAChBR,IAAMS,MAAMC,UAAUV,IACtBW,MAAQF,MAAMC,UAAUC,KAW5BhB,aAAYe,WACRE,WAAYjB,YAEZkB,UAAW,WACPjB,KAAKG,UAAUe,QAAQ,SAAST,GAC5BA,EAAQU,YAIhBC,YAAa,WACTpB,KAAKG,UAAUe,QAAQ,SAAST,GAC5BA,EAAQY,cAIhBC,aAAc,WACVtB,KAAKG,UAAUe,QAAQ,SAAST,GAC5BA,EAAQc,mBAIhBC,gBAAiB,WACbxB,KAAKG,UAAUe,QAAQ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AAiBiB,GAExB,MAAIA,aAAkBV,YACbU,EAAOC,WACJD,GAAqB,IAAXA,GAOtBA,EAAS,GAAKA,EAEVgE,SAASC,KAAKjE,GACXA,EAAOkE,QAAQC,SAAUP,YADI5D,GAR3B,GAYiC,QAASyB,SAAQ5E,GAC3D,MAAKA,IAAmB,IAAVA,EAEHgE,QAAQhE,IAA2B,IAAjBA,EAAMd,QAC1B,GAEA,GAJA,EAjEX,GAAIuD,YAAa/G,QAAQ,iBAAiB,WAEtCuL,QACFM,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAGHN,SAAW,YACXH,SAAW,UAcfvJ,SAAQoF,OAASA,MAAO,IAAII,UAAW8D,OAAOtL,UAAUwH,QACxDxF,SAAQwF,SAAWA,QAGnB,IAAIW,YAAa,SAAS/D,GACxB,MAAwB,kBAAVA,GAGZ+D,YAAW,OACbA,WAAa,SAAS/D,GACpB,MAAwB,kBAAVA,IAAiD,sBAAzBoD,SAASjI,KAAK6E,IAGxD,IAAI+D,WACJnG,SAAQmG,WAAaA,UACrB,IAAIC,SAAUrI,MAAMqI,SAAW,SAAShE,GACtC,MAAQA,IAA0B,gBAAVA,GAA+C,mBAAzBoD,SAASjI,KAAK6E,IAA8B,EAE5FpC,SAAQoG,QAAUA,QAmBlBpG,QAAQsE,iBAAmBA,iBAU3BtE,QAAQgH,QAAUA;;ALzElBjH,OAAOC,QAAUlC,QAAQ;;ADFzBiC,OAAOC,QAAUlC,QAAQ,sBAAsB","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","\"use strict\";function failAllParents(e){for(;e=sections.findParent(e);)e.status=\"fail\",e.expand()}function listenForEvents(){var e=new EventSource(\"/events\");e.addEventListener(\"beginSuite\",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId});\"queued\"===n.status&&(n.status=\"running\")}),e.addEventListener(\"beginState\",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});\"queued\"===n.status&&(n.status=\"running\")}),e.addEventListener(\"endTest\",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});t.equal?n.setAsSuccess(t):(n.setAsFailure(t),n.expand(),failAllParents(n))}),e.addEventListener(\"skipState\",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});n.setAsSkipped();var s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});sections.markIfFinished(s)}),e.addEventListener(\"error\",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});n.setAsError({stack:t.stack}),n.expand(),failAllParents(n)}),e.addEventListener(\"endState\",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});sections.markIfFinished(n)}),e.addEventListener(\"endSuite\",function(e){var t=JSON.parse(e.data),n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});sections.markIfFinished(n)}),e.addEventListener(\"end\",function(){runButton.disabled=!1})}function run(){runButton.disabled=!0,xhr.post(\"/run\",function(e){e||sections.markAllAsQueued()})}var SectionList=require(\"./section-list\"),xhr=require(\"./xhr\"),byId=document.getElementById.bind(document),runButton,sections;document.addEventListener(\"DOMContentLoaded\",function(){sections=new SectionList,runButton=byId(\"run\"),listenForEvents(),byId(\"expandAll\").addEventListener(\"click\",sections.expandAll.bind(sections)),byId(\"collapseAll\").addEventListener(\"click\",sections.collapseAll.bind(sections)),byId(\"expandErrors\").addEventListener(\"click\",sections.expandErrors.bind(sections)),runButton.addEventListener(\"click\",run)});","/*jshint browser:true*/\n'use strict';\nvar Section = require('./section'),\n Index = require('../common/tests-index'),\n map = Array.prototype.map,\n every = Array.prototype.every;\n\nfunction SectionList() {\n this._sectionsIndex = new Index();\n this._sections = map.call(document.querySelectorAll('.section'), function(node) {\n var section = new Section(node);\n this._sectionsIndex.add(section);\n return section;\n }, this);\n}\n\nSectionList.prototype = {\n constuctor: SectionList,\n\n expandAll: function() {\n this._sections.forEach(function(section) {\n section.expand();\n });\n },\n\n collapseAll: function() {\n this._sections.forEach(function(section) {\n section.collapse();\n });\n },\n\n expandErrors: function() {\n this._sections.forEach(function(section) {\n section.expandIfError();\n });\n },\n\n markAllAsQueued: function() {\n this._sections.forEach(function(section) {\n section.status = 'queued';\n });\n },\n\n markIfFinished: function(section) {\n if (section.status === 'fail') {\n //already marked as fail\n return;\n }\n var nodes = section.domNode.querySelectorAll('.section');\n var allChildrenFinished = every.call(nodes, function(node) {\n return this._sectionForNode(node).isFinished();\n }, this);\n\n if (allChildrenFinished) {\n section.status = 'success';\n }\n },\n\n findSection: function(query) {\n return this._sectionsIndex.find(query);\n },\n\n findParent: function(section) {\n if (section.browserId) {\n return this.findSection({suiteId: section.suiteId, stateName: section.stateName});\n }\n\n if (section.stateName) {\n return this.findSection({suiteId: section.suiteId});\n }\n var parentSectionNode = this._findParentSectionNode(section.domNode);\n if (parentSectionNode) {\n return this._sectionForNode(parentSectionNode);\n }\n return null;\n },\n\n _findParentSectionNode: function(node) {\n while ((node = node.parentNode)) {\n if (node.classList && node.classList.contains('section')) {\n return node;\n }\n }\n return null;\n },\n\n _sectionForNode: function(domNode) {\n var query = {\n suiteId: domNode.getAttribute('data-suite-id'),\n stateName: domNode.getAttribute('data-state-name'),\n browserId: domNode.getAttribute('data-browser-id')\n };\n\n return this.findSection(query);\n }\n};\n\nmodule.exports = SectionList;\n","/*jshint browser:true*/\n'use strict';\n\nexports.post = function(url, data, callback) {\n if (!callback) {\n callback = data;\n data = null;\n }\n var xhr = new XMLHttpRequest();\n xhr.open('POST', url, true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.onload = function() {\n var data = JSON.parse(xhr.responseText);\n if (xhr.status === 200) {\n callback(null, data);\n } else {\n callback(new Error(data.error));\n }\n };\n\n if (data) {\n xhr.send(JSON.stringify(data));\n } else {\n xhr.send();\n }\n};\n","'use strict';\nvar successTemplate = require('../views/partials/success-result.hbs'),\n failTemplate = require('../views/partials/fail-result.hbs'),\n errorTemplate = require('../views/partials/error-result.hbs'),\n skipTemplate = require('../views/partials/skip-result.hbs'),\n xhr = require('./xhr');\n\nvar statusList = [\n 'idle',\n 'queued',\n 'running',\n 'success',\n 'fail',\n 'skip'\n];\n\nfunction statusClass(status) {\n return 'section_status_' + status;\n}\n\nfunction getInitialStatus(sectionNode) {\n var status;\n for (var i = 0; i< statusList.length; i++) {\n status = statusList[i];\n if (sectionNode.classList.contains(statusClass(status))) {\n return status;\n }\n }\n return null;\n}\n\nfunction Section(node) {\n this.suiteId = node.getAttribute('data-suite-id');\n this.stateName = node.getAttribute('data-state-name');\n this.browserId = node.getAttribute('data-browser-id');\n this.domNode = node;\n this._status = getInitialStatus(node);\n this._titleNode = node.querySelector('.section__title');\n this._bodyNode = node.querySelector('.section__body');\n this._titleNode.addEventListener('click', this.toggle.bind(this));\n}\n\nSection.prototype = {\n constuctor: Section,\n expand:function() {\n this.domNode.classList.remove('section_collapsed');\n },\n\n collapse: function() {\n this.domNode.classList.add('section_collapsed');\n },\n\n toggle: function() {\n this.domNode.classList.toggle('section_collapsed');\n },\n\n get status() {\n return this._status;\n },\n\n set status(value) {\n if (this._status) {\n this.domNode.classList.remove(statusClass(this._status));\n }\n\n this._status = value;\n this.domNode.classList.add(statusClass(this._status));\n },\n\n expandIfError: function() {\n if (this.status === 'fail') {\n this.expand();\n } else {\n this.collapse();\n }\n },\n\n setAsFailure: function(results) {\n this.status = 'fail';\n this._bodyNode.innerHTML = failTemplate(results);\n var replaceButton = this._bodyNode.querySelector('.image-box__replace');\n replaceButton.addEventListener('click', this.updateReference.bind(this));\n },\n\n setAsSuccess: function(results) {\n this.status = 'success';\n this._bodyNode.innerHTML = successTemplate(results);\n },\n\n setAsSkipped: function() {\n this.status = 'skipped';\n this._bodyNode.innerHTML = skipTemplate();\n },\n\n setAsError: function(error) {\n this.status = 'fail';\n this._bodyNode.innerHTML = errorTemplate(error);\n },\n\n isFinished: function() {\n return this.status !== 'queued' &&\n this.status !== 'running';\n },\n\n updateReference: function() {\n var _this = this,\n postData = {\n suiteId: this.suiteId,\n stateName: this.stateName,\n browserId: this.browserId\n };\n xhr.post('/update-ref', postData, function(error, response) {\n if (!error) {\n _this.setAsSuccess(response);\n }\n });\n }\n};\n\nmodule.exports = Section;\n","'use strict';\n\nfunction TestsIndex() {\n this._index = {};\n}\n\nTestsIndex.prototype = {\n constructor: TestsIndex,\n\n add: function(item) {\n if (item.suiteId == null) {\n return;\n }\n\n var indexData = this._index[item.suiteId];\n if (!indexData) {\n indexData = this._index[item.suiteId] = {\n suite: null,\n states: {}\n };\n }\n\n if (item.stateName == null) {\n indexData.suite = item;\n return;\n }\n\n var stateData = indexData.states[item.stateName];\n if (!stateData) {\n stateData = indexData.states[item.stateName] = {\n state: null,\n browsers: {}\n };\n }\n\n if (item.browserId == null) {\n stateData.state = item;\n return;\n }\n stateData.browsers[item.browserId] = item;\n },\n\n find: function(query) {\n var indexData = this._index[query.suiteId];\n if (!indexData) {\n return null;\n }\n if (query.stateName == null) {\n return indexData.suite;\n }\n var stateData = indexData.states[query.stateName];\n if (!stateData) {\n return null;\n }\n\n if (query.browserId == null) {\n return stateData.state;\n }\n\n return stateData.browsers[query.browserId] || null;\n }\n};\n\nmodule.exports = TestsIndex;\n","// hbsfy compiled Handlebars template\nvar HandlebarsCompiler = require('hbsfy/runtime');\nmodule.exports = HandlebarsCompiler.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"<div class=\\\"image-box\\\">\\n <div class=\\\"image-box__image\\\">\\n <img src=\\\"\";\n if (helper = helpers.referenceURL) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.referenceURL); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\" alt=\\\"Reference image\\\">\\n </div>\\n</div>\\n\";\n return buffer;\n });\n","// hbsfy compiled Handlebars template\nvar HandlebarsCompiler = require('hbsfy/runtime');\nmodule.exports = HandlebarsCompiler.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"<div class=\\\"image-box\\\">\\n <div class=\\\"image-box__image\\\">\\n <div class=\\\"image-box__title\\\">Reference</div>\\n <img src=\\\"\";\n if (helper = helpers.referenceURL) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.referenceURL); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\" alt=\\\"Reference image\\\">\\n </div>\\n <button class=\\\"button image-box__replace\\\">&#x2b05;</button>\\n <div class=\\\"image-box__image\\\">\\n <div class=\\\"image-box__title\\\">Current</div>\\n <img src=\\\"\";\n if (helper = helpers.currentURL) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.currentURL); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\" alt=\\\"Current image\\\">\\n </div>\\n <div class=\\\"image-box__image\\\">\\n <div class=\\\"image-box__title\\\">Diff</div>\\n <img src=\\\"\";\n if (helper = helpers.diffURL) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.diffURL); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\" alt=\\\"Diff image\\\">\\n </div>\\n</div>\\n\";\n return buffer;\n });\n","// hbsfy compiled Handlebars template\nvar HandlebarsCompiler = require('hbsfy/runtime');\nmodule.exports = HandlebarsCompiler.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"<pre class=\\\"stacktrace\\\">\\n\";\n if (helper = helpers.stack) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.stack); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\n</pre>\\n\";\n return buffer;\n });\n","// hbsfy compiled Handlebars template\nvar HandlebarsCompiler = require('hbsfy/runtime');\nmodule.exports = HandlebarsCompiler.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"<p>Test skipped</p>\\n\";\n });\n","module.exports = require(\"handlebars/runtime\")[\"default\"];\n","// Create a simple path alias to allow browserify to resolve\n// the runtime on a supported path.\nmodule.exports = require('./dist/cjs/handlebars.runtime');\n","\"use strict\";\n/*globals Handlebars: true */\nvar base = require(\"./handlebars/base\");\n\n// Each of these augment the Handlebars object. No need to setup here.\n// (This is done to easily share code between commonjs and browse envs)\nvar SafeString = require(\"./handlebars/safe-string\")[\"default\"];\nvar Exception = require(\"./handlebars/exception\")[\"default\"];\nvar Utils = require(\"./handlebars/utils\");\nvar runtime = require(\"./handlebars/runtime\");\n\n// For compatibility and usage outside of module systems, make the Handlebars object a namespace\nvar create = function() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = SafeString;\n hb.Exception = Exception;\n hb.Utils = Utils;\n\n hb.VM = runtime;\n hb.template = function(spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n};\n\nvar Handlebars = create();\nHandlebars.create = create;\n\nexports[\"default\"] = Handlebars;","\"use strict\";\n// Build out our basic SafeString type\nfunction SafeString(string) {\n this.string = string;\n}\n\nSafeString.prototype.toString = function() {\n return \"\" + this.string;\n};\n\nexports[\"default\"] = SafeString;","\"use strict\";\nvar Utils = require(\"./utils\");\nvar Exception = require(\"./exception\")[\"default\"];\n\nvar VERSION = \"1.3.0\";\nexports.VERSION = VERSION;var COMPILER_REVISION = 4;\nexports.COMPILER_REVISION = COMPILER_REVISION;\nvar REVISION_CHANGES = {\n 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it\n 2: '== 1.0.0-rc.3',\n 3: '== 1.0.0-rc.4',\n 4: '>= 1.0.0'\n};\nexports.REVISION_CHANGES = REVISION_CHANGES;\nvar isArray = Utils.isArray,\n isFunction = Utils.isFunction,\n toString = Utils.toString,\n objectType = '[object Object]';\n\nfunction HandlebarsEnvironment(helpers, partials) {\n this.helpers = helpers || {};\n this.partials = partials || {};\n\n registerDefaultHelpers(this);\n}\n\nexports.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = {\n constructor: HandlebarsEnvironment,\n\n logger: logger,\n log: log,\n\n registerHelper: function(name, fn, inverse) {\n if (toString.call(name) === objectType) {\n if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); }\n Utils.extend(this.helpers, name);\n } else {\n if (inverse) { fn.not = inverse; }\n this.helpers[name] = fn;\n }\n },\n\n registerPartial: function(name, str) {\n if (toString.call(name) === objectType) {\n Utils.extend(this.partials, name);\n } else {\n this.partials[name] = str;\n }\n }\n};\n\nfunction registerDefaultHelpers(instance) {\n instance.registerHelper('helperMissing', function(arg) {\n if(arguments.length === 2) {\n return undefined;\n } else {\n throw new Exception(\"Missing helper: '\" + arg + \"'\");\n }\n });\n\n instance.registerHelper('blockHelperMissing', function(context, options) {\n var inverse = options.inverse || function() {}, fn = options.fn;\n\n if (isFunction(context)) { context = context.call(this); }\n\n if(context === true) {\n return fn(this);\n } else if(context === false || context == null) {\n return inverse(this);\n } else if (isArray(context)) {\n if(context.length > 0) {\n return instance.helpers.each(context, options);\n } else {\n return inverse(this);\n }\n } else {\n return fn(context);\n }\n });\n\n instance.registerHelper('each', function(context, options) {\n var fn = options.fn, inverse = options.inverse;\n var i = 0, ret = \"\", data;\n\n if (isFunction(context)) { context = context.call(this); }\n\n if (options.data) {\n data = createFrame(options.data);\n }\n\n if(context && typeof context === 'object') {\n if (isArray(context)) {\n for(var j = context.length; i<j; i++) {\n if (data) {\n data.index = i;\n data.first = (i === 0);\n data.last = (i === (context.length-1));\n }\n ret = ret + fn(context[i], { data: data });\n }\n } else {\n for(var key in context) {\n if(context.hasOwnProperty(key)) {\n if(data) { \n data.key = key; \n data.index = i;\n data.first = (i === 0);\n }\n ret = ret + fn(context[key], {data: data});\n i++;\n }\n }\n }\n }\n\n if(i === 0){\n ret = inverse(this);\n }\n\n return ret;\n });\n\n instance.registerHelper('if', function(conditional, options) {\n if (isFunction(conditional)) { conditional = conditional.call(this); }\n\n // Default behavior is to render the positive path if the value is truthy and not empty.\n // The `includeZero` option may be set to treat the condtional as purely not empty based on the\n // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.\n if ((!options.hash.includeZero && !conditional) || Utils.isEmpty(conditional)) {\n return options.inverse(this);\n } else {\n return options.fn(this);\n }\n });\n\n instance.registerHelper('unless', function(conditional, options) {\n return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash});\n });\n\n instance.registerHelper('with', function(context, options) {\n if (isFunction(context)) { context = context.call(this); }\n\n if (!Utils.isEmpty(context)) return options.fn(context);\n });\n\n instance.registerHelper('log', function(context, options) {\n var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;\n instance.log(level, context);\n });\n}\n\nvar logger = {\n methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' },\n\n // State enum\n DEBUG: 0,\n INFO: 1,\n WARN: 2,\n ERROR: 3,\n level: 3,\n\n // can be overridden in the host environment\n log: function(level, obj) {\n if (logger.level <= level) {\n var method = logger.methodMap[level];\n if (typeof console !== 'undefined' && console[method]) {\n console[method].call(console, obj);\n }\n }\n }\n};\nexports.logger = logger;\nfunction log(level, obj) { logger.log(level, obj); }\n\nexports.log = log;var createFrame = function(object) {\n var obj = {};\n Utils.extend(obj, object);\n return obj;\n};\nexports.createFrame = createFrame;","\"use strict\";\n\nvar errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];\n\nfunction Exception(message, node) {\n var line;\n if (node && node.firstLine) {\n line = node.firstLine;\n\n message += ' - ' + line + ':' + node.firstColumn;\n }\n\n var tmp = Error.prototype.constructor.call(this, message);\n\n // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.\n for (var idx = 0; idx < errorProps.length; idx++) {\n this[errorProps[idx]] = tmp[errorProps[idx]];\n }\n\n if (line) {\n this.lineNumber = line;\n this.column = node.firstColumn;\n }\n}\n\nException.prototype = new Error();\n\nexports[\"default\"] = Exception;","\"use strict\";\n/*jshint -W004 */\nvar SafeString = require(\"./safe-string\")[\"default\"];\n\nvar escape = {\n \"&\": \"&amp;\",\n \"<\": \"&lt;\",\n \">\": \"&gt;\",\n '\"': \"&quot;\",\n \"'\": \"&#x27;\",\n \"`\": \"&#x60;\"\n};\n\nvar badChars = /[&<>\"'`]/g;\nvar possible = /[&<>\"'`]/;\n\nfunction escapeChar(chr) {\n return escape[chr] || \"&amp;\";\n}\n\nfunction extend(obj, value) {\n for(var key in value) {\n if(Object.prototype.hasOwnProperty.call(value, key)) {\n obj[key] = value[key];\n }\n }\n}\n\nexports.extend = extend;var toString = Object.prototype.toString;\nexports.toString = toString;\n// Sourced from lodash\n// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt\nvar isFunction = function(value) {\n return typeof value === 'function';\n};\n// fallback for older versions of Chrome and Safari\nif (isFunction(/x/)) {\n isFunction = function(value) {\n return typeof value === 'function' && toString.call(value) === '[object Function]';\n };\n}\nvar isFunction;\nexports.isFunction = isFunction;\nvar isArray = Array.isArray || function(value) {\n return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false;\n};\nexports.isArray = isArray;\n\nfunction escapeExpression(string) {\n // don't escape SafeStrings, since they're already safe\n if (string instanceof SafeString) {\n return string.toString();\n } else if (!string && string !== 0) {\n return \"\";\n }\n\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = \"\" + string;\n\n if(!possible.test(string)) { return string; }\n return string.replace(badChars, escapeChar);\n}\n\nexports.escapeExpression = escapeExpression;function isEmpty(value) {\n if (!value && value !== 0) {\n return true;\n } else if (isArray(value) && value.length === 0) {\n return true;\n } else {\n return false;\n }\n}\n\nexports.isEmpty = isEmpty;","\"use strict\";\nvar Utils = require(\"./utils\");\nvar Exception = require(\"./exception\")[\"default\"];\nvar COMPILER_REVISION = require(\"./base\").COMPILER_REVISION;\nvar REVISION_CHANGES = require(\"./base\").REVISION_CHANGES;\n\nfunction checkRevision(compilerInfo) {\n var compilerRevision = compilerInfo && compilerInfo[0] || 1,\n currentRevision = COMPILER_REVISION;\n\n if (compilerRevision !== currentRevision) {\n if (compilerRevision < currentRevision) {\n var runtimeVersions = REVISION_CHANGES[currentRevision],\n compilerVersions = REVISION_CHANGES[compilerRevision];\n throw new Exception(\"Template was precompiled with an older version of Handlebars than the current runtime. \"+\n \"Please update your precompiler to a newer version (\"+runtimeVersions+\") or downgrade your runtime to an older version (\"+compilerVersions+\").\");\n } else {\n // Use the embedded version info since the runtime doesn't know about this revision yet\n throw new Exception(\"Template was precompiled with a newer version of Handlebars than the current runtime. \"+\n \"Please update your runtime to a newer version (\"+compilerInfo[1]+\").\");\n }\n }\n}\n\nexports.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial\n\nfunction template(templateSpec, env) {\n if (!env) {\n throw new Exception(\"No environment passed to template\");\n }\n\n // Note: Using env.VM references rather than local var references throughout this section to allow\n // for external users to override these as psuedo-supported APIs.\n var invokePartialWrapper = function(partial, name, context, helpers, partials, data) {\n var result = env.VM.invokePartial.apply(this, arguments);\n if (result != null) { return result; }\n\n if (env.compile) {\n var options = { helpers: helpers, partials: partials, data: data };\n partials[name] = env.compile(partial, { data: data !== undefined }, env);\n return partials[name](context, options);\n } else {\n throw new Exception(\"The partial \" + name + \" could not be compiled when running in runtime-only mode\");\n }\n };\n\n // Just add water\n var container = {\n escapeExpression: Utils.escapeExpression,\n invokePartial: invokePartialWrapper,\n programs: [],\n program: function(i, fn, data) {\n var programWrapper = this.programs[i];\n if(data) {\n programWrapper = program(i, fn, data);\n } else if (!programWrapper) {\n programWrapper = this.programs[i] = program(i, fn);\n }\n return programWrapper;\n },\n merge: function(param, common) {\n var ret = param || common;\n\n if (param && common && (param !== common)) {\n ret = {};\n Utils.extend(ret, common);\n Utils.extend(ret, param);\n }\n return ret;\n },\n programWithDepth: env.VM.programWithDepth,\n noop: env.VM.noop,\n compilerInfo: null\n };\n\n return function(context, options) {\n options = options || {};\n var namespace = options.partial ? options : env,\n helpers,\n partials;\n\n if (!options.partial) {\n helpers = options.helpers;\n partials = options.partials;\n }\n var result = templateSpec.call(\n container,\n namespace, context,\n helpers,\n partials,\n options.data);\n\n if (!options.partial) {\n env.VM.checkRevision(container.compilerInfo);\n }\n\n return result;\n };\n}\n\nexports.template = template;function programWithDepth(i, fn, data /*, $depth */) {\n var args = Array.prototype.slice.call(arguments, 3);\n\n var prog = function(context, options) {\n options = options || {};\n\n return fn.apply(this, [context, options.data || data].concat(args));\n };\n prog.program = i;\n prog.depth = args.length;\n return prog;\n}\n\nexports.programWithDepth = programWithDepth;function program(i, fn, data) {\n var prog = function(context, options) {\n options = options || {};\n\n return fn(context, options.data || data);\n };\n prog.program = i;\n prog.depth = 0;\n return prog;\n}\n\nexports.program = program;function invokePartial(partial, name, context, helpers, partials, data) {\n var options = { partial: true, helpers: helpers, partials: partials, data: data };\n\n if(partial === undefined) {\n throw new Exception(\"The partial \" + name + \" could not be found\");\n } else if(partial instanceof Function) {\n return partial(context, options);\n }\n}\n\nexports.invokePartial = invokePartial;function noop() { return \"\"; }\n\nexports.noop = noop;"]}
{"version":3,"file":"bundle.js","sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","lib/client","lib/client/section-list.js","lib/client/xhr.js","lib/views/partials/cswitcher.hbs","node_modules/hbsfy/runtime.js","lib/client/section.js","lib/common/tests-index.js","node_modules/handlebars/runtime.js","node_modules/handlebars/dist/cjs/handlebars.runtime.js","lib/views/partials/success-result.hbs","lib/views/partials/fail-result.hbs","lib/views/partials/error-result.hbs","lib/views/partials/skip-result.hbs","node_modules/handlebars/dist/cjs/handlebars/base.js","node_modules/handlebars/dist/cjs/handlebars/safe-string.js","node_modules/handlebars/dist/cjs/handlebars/exception.js","node_modules/handlebars/dist/cjs/handlebars/utils.js","node_modules/handlebars/dist/cjs/handlebars/runtime.js"],"names":["SectionList","this","_sectionsIndex","Index","_sections","map","call","document","querySelectorAll","node","parentNode","_findParentSectionNode","section","Section","_sectionForNode","add","require","Array","prototype","every","constructor","expandAll","forEach","expand","collapseAll","collapse","expandErrors","expandIfError","markAllAsQueued","status","markIfFinished","nodes","domNode","allChildrenFinished","isFinished","findSection","query","find","findParent","browserId","suiteId","stateName","parentSectionNode","classList","contains","getAttribute","module","exports","post","url","data","callback","xhr","XMLHttpRequest","open","setRequestHeader","onload","JSON","parse","responseText","Error","error","send","stringify","HandlebarsCompiler","template","Handlebars","depth0","helpers","partials","compilerInfo","merge","statusClass","getInitialStatus","sectionNode","i","statusList","length","parent","_status","_titleNode","querySelector","_bodyNode","addEventListener","toggle","bind","_parent","successTemplate","failTemplate","errorTemplate","skipTemplate","remove",{"end":{"file":"?","comments_before":[],"nlb":false,"endpos":1588,"endcol":14,"endline":58,"pos":1582,"col":8,"line":58,"value":"status","type":"name"},"start":{"file":"?","comments_before":[],"nlb":false,"endpos":1588,"endcol":14,"endline":58,"pos":1582,"col":8,"line":58,"value":"status","type":"name"},"name":"status"},"value","setAsFailure","results","innerHTML","replaceButton","updateReference","setAsSuccess","failedChild","setAsSkipped","setAsError","_this","postData","response","TestsIndex","_index","item","indexData","suite","states","stateData","state","browsers","base","SafeString","Exception","Utils","runtime","create","hb","HandlebarsEnvironment","extend","VM","spec","stack1","helper","buffer","self","functionType","escapeExpression","invokePartial","cswitcher","referenceURL","hash","currentURL","diffURL","stack","registerDefaultHelpers","instance","registerHelper","arg","arguments","undefined","context","options","inverse","fn","isFunction","isArray","each","ret","createFrame","j","index","first","last","key","hasOwnProperty","conditional","includeZero","isEmpty","level","parseInt","log","obj","logger","VERSION","COMPILER_REVISION","REVISION_CHANGES",1,2,3,4,"toString","objectType","name","not","registerPartial","str","methodMap","DEBUG","INFO","WARN","ERROR","method","console","object","string","message","line","firstLine","firstColumn","tmp","idx","errorProps","lineNumber","column","escapeChar","chr","escape","Object","possible","test","replace","badChars","&","<",">","\"","'","`","checkRevision","compilerRevision","currentRevision","runtimeVersions","compilerVersions","templateSpec","env","invokePartialWrapper","partial","result","apply","compile","container","programs","program","programWrapper","param","common","programWithDepth","noop","namespace","args","slice","prog","concat","depth","Function"],"mappings":"AAAA;AECA,YAMA,SAASA,eACLC,KAAKC,eAAiB,GAAIC,OAC1BF,KAAKG,UAAYC,IAAIC,KAAKC,SAASC,iBAAiB,YAAa,SAASC,GACtE,GAAIC,GAAaT,KAAKU,uBAAuBF,GACzCG,EAAU,GAAIC,SAAQJ,EAAMC,GAAcT,KAAKa,gBAAgBJ,GAGnE,OADAT,MAAKC,eAAea,IA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iB0D,GAExB,MAAIA,aAAkBzE,YACbyE,EAAOd,WACJc,GAAqB,IAAXA,GAOtBA,EAAS,GAAKA,EAEVc,SAASC,KAAKf,GACXA,EAAOgB,QAAQC,SAAUP,YADIV,GAR3B,GAYiC,QAAS3B,SAAQrE,GAC3D,MAAKA,IAAmB,IAAVA,EAEHyD,QAAQzD,IAA2B,IAAjBA,EAAMhB,QAC1B,GAEA,GAJA,EAjEX,GAAIuC,YAAapG,QAAQ,iBAAiB,WAEtCyL,QACFM,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAGHN,SAAW,YACXH,SAAW,UAcf5J,SAAQ4E,OAASA,MAAO,IAAIoD,UAAW2B,OAAOxL,UAAU6J,QACxDhI,SAAQgI,SAAWA,QAGnB,IAAI1B,YAAa,SAASxD,GACxB,MAAwB,kBAAVA,GAGZwD,YAAW,OACbA,WAAa,SAASxD,GACpB,MAAwB,kBAAVA,IAAiD,sBAAzBkF,SAASzK,KAAKuF,IAGxD,IAAIwD,WACJtG,SAAQsG,WAAaA,UACrB,IAAIC,SAAUrI,MAAMqI,SAAW,SAASzD,GACtC,MAAQA,IAA0B,gBAAVA,GAA+C,mBAAzBkF,SAASzK,KAAKuF,IAA8B,EAE5F9C,SAAQuG,QAAUA,QAmBlBvG,QAAQoF,iBAAmBA,iBAU3BpF,QAAQmH,QAAUA;;ATzElBpH,OAAOC,QAAU/B,QAAQ;;AHFzB8B,OAAOC,QAAU/B,QAAQ,sBAAsB","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","\"use strict\";function failAllParents(e){for(;e=sections.findParent(e);)e.status=\"fail\",e.expand()}function listenForEvents(){var e=new EventSource(\"/events\");e.addEventListener(\"beginSuite\",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId});\"queued\"===s.status&&(s.status=\"running\")}),e.addEventListener(\"beginState\",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});\"queued\"===s.status&&(s.status=\"running\")}),e.addEventListener(\"endTest\",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});t.equal?s.setAsSuccess(t):(s.setAsFailure(t),s.expand(),failAllParents(s))}),e.addEventListener(\"skipState\",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});s.setAsSkipped();var n=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});sections.markIfFinished(n)}),e.addEventListener(\"error\",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});s.setAsError({stack:t.stack}),s.expand(),failAllParents(s)}),e.addEventListener(\"endState\",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName});sections.markIfFinished(s)}),e.addEventListener(\"endSuite\",function(e){var t=JSON.parse(e.data),s=sections.findSection({suiteId:t.suiteId,stateName:t.stateName,browserId:t.browserId});sections.markIfFinished(s)}),e.addEventListener(\"end\",function(e){runButton.disabled=!1})}function run(){runButton.disabled=!0,xhr.post(\"/run\",function(e,t){e||sections.markAllAsQueued()})}function handleColorSwitch(e,t){var s=findClosest(e,\"image-box\");t.forEach(function(e){e.classList.remove(\"cswitcher__item_selected\")}),forEach.call(s.classList,function(e){/cswitcher_color_\\d+/.test(e)&&s.classList.remove(e)}),e.classList.add(\"cswitcher__item_selected\"),s.classList.add(\"cswitcher_color_\"+e.dataset.id)}function bodyClick(e){var t=e.target;t.classList.contains(\"cswitcher__item\")&&handleColorSwitch(t,filter.call(t.parentNode.childNodes,function(e){return e.nodeType===Node.ELEMENT_NODE}))}function findClosest(e,t){for(;e=e.parentNode;)if(e.classList.contains(t))return e}var SectionList=require(\"./section-list\"),xhr=require(\"./xhr\"),byId=document.getElementById.bind(document),runButton,sections,forEach=Array.prototype.forEach,filter=Array.prototype.filter,hbruntime=require(\"hbsfy/runtime\");hbruntime.registerPartial(\"cswitcher\",require(\"../views/partials/cswitcher.hbs\")),document.addEventListener(\"DOMContentLoaded\",function(){sections=new SectionList,runButton=byId(\"run\"),listenForEvents(),byId(\"expandAll\").addEventListener(\"click\",sections.expandAll.bind(sections)),byId(\"collapseAll\").addEventListener(\"click\",sections.collapseAll.bind(sections)),byId(\"expandErrors\").addEventListener(\"click\",sections.expandErrors.bind(sections)),runButton.addEventListener(\"click\",run),document.body.addEventListener(\"click\",bodyClick)});","/*jshint browser:true*/\n'use strict';\nvar Section = require('./section'),\n Index = require('../common/tests-index'),\n map = Array.prototype.map,\n every = Array.prototype.every;\n\nfunction SectionList() {\n this._sectionsIndex = new Index();\n this._sections = map.call(document.querySelectorAll('.section'), function(node) {\n var parentNode = this._findParentSectionNode(node),\n section = new Section(node, parentNode && this._sectionForNode(parentNode));\n\n this._sectionsIndex.add(section);\n return section;\n }, this);\n}\n\nSectionList.prototype = {\n constructor: SectionList,\n\n expandAll: function() {\n this._sections.forEach(function(section) {\n section.expand();\n });\n },\n\n collapseAll: function() {\n this._sections.forEach(function(section) {\n section.collapse();\n });\n },\n\n expandErrors: function() {\n this._sections.forEach(function(section) {\n section.expandIfError();\n });\n },\n\n markAllAsQueued: function() {\n this._sections.forEach(function(section) {\n section.status = 'queued';\n });\n },\n\n markIfFinished: function(section) {\n if (section.status === 'fail') {\n //already marked as fail\n return;\n }\n var nodes = section.domNode.querySelectorAll('.section');\n var allChildrenFinished = every.call(nodes, function(node) {\n return this._sectionForNode(node).isFinished();\n }, this);\n\n if (allChildrenFinished) {\n section.status = 'success';\n }\n },\n\n findSection: function(query) {\n return this._sectionsIndex.find(query);\n },\n\n findParent: function(section) {\n if (section.browserId) {\n return this.findSection({suiteId: section.suiteId, stateName: section.stateName});\n }\n\n if (section.stateName) {\n return this.findSection({suiteId: section.suiteId});\n }\n var parentSectionNode = this._findParentSectionNode(section.domNode);\n if (parentSectionNode) {\n return this._sectionForNode(parentSectionNode);\n }\n return null;\n },\n\n _findParentSectionNode: function(node) {\n while ((node = node.parentNode)) {\n if (node.classList && node.classList.contains('section')) {\n return node;\n }\n }\n return null;\n },\n\n _sectionForNode: function(domNode) {\n var query = {\n suiteId: domNode.getAttribute('data-suite-id'),\n stateName: domNode.getAttribute('data-state-name'),\n browserId: domNode.getAttribute('data-browser-id')\n };\n\n return this.findSection(query);\n }\n};\n\nmodule.exports = SectionList;\n","/*jshint browser:true*/\n'use strict';\n\nexports.post = function(url, data, callback) {\n if (!callback) {\n callback = data;\n data = null;\n }\n var xhr = new XMLHttpRequest();\n xhr.open('POST', url, true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.onload = function() {\n var data = JSON.parse(xhr.responseText);\n if (xhr.status === 200) {\n callback(null, data);\n } else {\n callback(new Error(data.error));\n }\n };\n\n if (data) {\n xhr.send(JSON.stringify(data));\n } else {\n xhr.send();\n }\n};\n","// hbsfy compiled Handlebars template\nvar HandlebarsCompiler = require('hbsfy/runtime');\nmodule.exports = HandlebarsCompiler.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"<div class=\\\"cswitcher\\\">\\n <div data-id=\\\"1\\\" class=\\\"cswitcher__item cswitcher_color_1 cswitcher__item_selected\\\"></div>\\n <div data-id=\\\"2\\\" class=\\\"cswitcher__item cswitcher_color_2\\\"></div>\\n <div data-id=\\\"3\\\" class=\\\"cswitcher__item cswitcher_color_3\\\"></div>\\n</div>\\n\";\n });\n","module.exports = require(\"handlebars/runtime\")[\"default\"];\n","'use strict';\nvar successTemplate = require('../views/partials/success-result.hbs'),\n failTemplate = require('../views/partials/fail-result.hbs'),\n errorTemplate = require('../views/partials/error-result.hbs'),\n skipTemplate = require('../views/partials/skip-result.hbs'),\n xhr = require('./xhr');\n\nvar statusList = [\n 'idle',\n 'queued',\n 'running',\n 'success',\n 'fail',\n 'skip'\n];\n\nfunction statusClass(status) {\n return 'section_status_' + status;\n}\n\nfunction getInitialStatus(sectionNode) {\n var status;\n for (var i = 0; i< statusList.length; i++) {\n status = statusList[i];\n if (sectionNode.classList.contains(statusClass(status))) {\n return status;\n }\n }\n return null;\n}\n\nfunction Section(node, parent) {\n this.suiteId = node.getAttribute('data-suite-id');\n this.stateName = node.getAttribute('data-state-name');\n this.browserId = node.getAttribute('data-browser-id');\n this.domNode = node;\n this._status = getInitialStatus(node);\n this._titleNode = node.querySelector('.section__title');\n this._bodyNode = node.querySelector('.section__body');\n this._titleNode.addEventListener('click', this.toggle.bind(this));\n this._parent = parent;\n}\n\nSection.prototype = {\n constructor: Section,\n expand:function() {\n this.domNode.classList.remove('section_collapsed');\n },\n\n collapse: function() {\n this.domNode.classList.add('section_collapsed');\n },\n\n toggle: function() {\n this.domNode.classList.toggle('section_collapsed');\n },\n\n get status() {\n return this._status;\n },\n\n set status(value) {\n if (this._status) {\n this.domNode.classList.remove(statusClass(this._status));\n }\n\n this._status = value;\n this.domNode.classList.add(statusClass(this._status));\n },\n\n expandIfError: function() {\n if (this.status === 'fail') {\n this.expand();\n } else {\n this.collapse();\n }\n },\n\n setAsFailure: function(results) {\n this.status = 'fail';\n this._bodyNode.innerHTML = failTemplate(results);\n var replaceButton = this._bodyNode.querySelector('.image-box__replace');\n replaceButton.addEventListener('click', this.updateReference.bind(this));\n },\n\n setAsSuccess: function(results) {\n var failedChild = this.domNode.querySelector('.section.' + statusClass('fail'));\n if (failedChild) {\n return;\n }\n\n this.status = 'success';\n if (results) {\n this._bodyNode.innerHTML = successTemplate(results);\n }\n\n if (this._parent && this._parent.status === 'fail') {\n this._parent.setAsSuccess();\n }\n },\n\n setAsSkipped: function() {\n this.status = 'skipped';\n this._bodyNode.innerHTML = skipTemplate();\n },\n\n setAsError: function(error) {\n this.status = 'fail';\n this._bodyNode.innerHTML = errorTemplate(error);\n },\n\n isFinished: function() {\n return this.status !== 'queued' &&\n this.status !== 'running';\n },\n\n updateReference: function() {\n var _this = this,\n postData = {\n suiteId: this.suiteId,\n stateName: this.stateName,\n browserId: this.browserId\n };\n xhr.post('/update-ref', postData, function(error, response) {\n if (!error) {\n _this.setAsSuccess(response);\n }\n });\n }\n};\n\nmodule.exports = Section;\n","'use strict';\n\nfunction TestsIndex() {\n this._index = {};\n}\n\nTestsIndex.prototype = {\n constructor: TestsIndex,\n\n add: function(item) {\n if (item.suiteId == null) {\n return;\n }\n\n var indexData = this._index[item.suiteId];\n if (!indexData) {\n indexData = this._index[item.suiteId] = {\n suite: null,\n states: {}\n };\n }\n\n if (item.stateName == null) {\n indexData.suite = item;\n return;\n }\n\n var stateData = indexData.states[item.stateName];\n if (!stateData) {\n stateData = indexData.states[item.stateName] = {\n state: null,\n browsers: {}\n };\n }\n\n if (item.browserId == null) {\n stateData.state = item;\n return;\n }\n stateData.browsers[item.browserId] = item;\n },\n\n find: function(query) {\n var indexData = this._index[query.suiteId];\n if (!indexData) {\n return null;\n }\n if (query.stateName == null) {\n return indexData.suite;\n }\n var stateData = indexData.states[query.stateName];\n if (!stateData) {\n return null;\n }\n\n if (query.browserId == null) {\n return stateData.state;\n }\n\n return stateData.browsers[query.browserId] || null;\n }\n};\n\nmodule.exports = TestsIndex;\n","// Create a simple path alias to allow browserify to resolve\n// the runtime on a supported path.\nmodule.exports = require('./dist/cjs/handlebars.runtime');\n","\"use strict\";\n/*globals Handlebars: true */\nvar base = require(\"./handlebars/base\");\n\n// Each of these augment the Handlebars object. No need to setup here.\n// (This is done to easily share code between commonjs and browse envs)\nvar SafeString = require(\"./handlebars/safe-string\")[\"default\"];\nvar Exception = require(\"./handlebars/exception\")[\"default\"];\nvar Utils = require(\"./handlebars/utils\");\nvar runtime = require(\"./handlebars/runtime\");\n\n// For compatibility and usage outside of module systems, make the Handlebars object a namespace\nvar create = function() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = SafeString;\n hb.Exception = Exception;\n hb.Utils = Utils;\n\n hb.VM = runtime;\n hb.template = function(spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n};\n\nvar Handlebars = create();\nHandlebars.create = create;\n\nexports[\"default\"] = Handlebars;","// hbsfy compiled Handlebars template\nvar HandlebarsCompiler = require('hbsfy/runtime');\nmodule.exports = HandlebarsCompiler.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); partials = this.merge(partials, Handlebars.partials); data = data || {};\n var buffer = \"\", stack1, helper, self=this, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"<div class=\\\"image-box\\\">\\n \";\n stack1 = self.invokePartial(partials.cswitcher, 'cswitcher', depth0, helpers, partials, data);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += \"\\n <div class=\\\"image-box__image\\\">\\n <img src=\\\"\";\n if (helper = helpers.referenceURL) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.referenceURL); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\" alt=\\\"Reference image\\\">\\n </div>\\n</div>\\n\";\n return buffer;\n });\n","// hbsfy compiled Handlebars template\nvar HandlebarsCompiler = require('hbsfy/runtime');\nmodule.exports = HandlebarsCompiler.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); partials = this.merge(partials, Handlebars.partials); data = data || {};\n var buffer = \"\", stack1, helper, self=this, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"<div class=\\\"image-box\\\">\\n \";\n stack1 = self.invokePartial(partials.cswitcher, 'cswitcher', depth0, helpers, partials, data);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += \"\\n <div class=\\\"image-box__image\\\">\\n <div class=\\\"image-box__title\\\">Reference</div>\\n <img src=\\\"\";\n if (helper = helpers.referenceURL) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.referenceURL); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\" alt=\\\"Reference image\\\">\\n </div>\\n <button class=\\\"button image-box__replace\\\">&#x2b05;</button>\\n <div class=\\\"image-box__image\\\">\\n <div class=\\\"image-box__title\\\">Current</div>\\n <img src=\\\"\";\n if (helper = helpers.currentURL) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.currentURL); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\" alt=\\\"Current image\\\">\\n </div>\\n <div class=\\\"image-box__image\\\">\\n <div class=\\\"image-box__title\\\">Diff</div>\\n <img src=\\\"\";\n if (helper = helpers.diffURL) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.diffURL); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\\" alt=\\\"Diff image\\\">\\n </div>\\n</div>\\n\";\n return buffer;\n });\n","// hbsfy compiled Handlebars template\nvar HandlebarsCompiler = require('hbsfy/runtime');\nmodule.exports = HandlebarsCompiler.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"<pre class=\\\"stacktrace\\\">\\n\";\n if (helper = helpers.stack) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.stack); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"\\n</pre>\\n\";\n return buffer;\n });\n","// hbsfy compiled Handlebars template\nvar HandlebarsCompiler = require('hbsfy/runtime');\nmodule.exports = HandlebarsCompiler.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"<p>Test skipped</p>\\n\";\n });\n","\"use strict\";\nvar Utils = require(\"./utils\");\nvar Exception = require(\"./exception\")[\"default\"];\n\nvar VERSION = \"1.3.0\";\nexports.VERSION = VERSION;var COMPILER_REVISION = 4;\nexports.COMPILER_REVISION = COMPILER_REVISION;\nvar REVISION_CHANGES = {\n 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it\n 2: '== 1.0.0-rc.3',\n 3: '== 1.0.0-rc.4',\n 4: '>= 1.0.0'\n};\nexports.REVISION_CHANGES = REVISION_CHANGES;\nvar isArray = Utils.isArray,\n isFunction = Utils.isFunction,\n toString = Utils.toString,\n objectType = '[object Object]';\n\nfunction HandlebarsEnvironment(helpers, partials) {\n this.helpers = helpers || {};\n this.partials = partials || {};\n\n registerDefaultHelpers(this);\n}\n\nexports.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = {\n constructor: HandlebarsEnvironment,\n\n logger: logger,\n log: log,\n\n registerHelper: function(name, fn, inverse) {\n if (toString.call(name) === objectType) {\n if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); }\n Utils.extend(this.helpers, name);\n } else {\n if (inverse) { fn.not = inverse; }\n this.helpers[name] = fn;\n }\n },\n\n registerPartial: function(name, str) {\n if (toString.call(name) === objectType) {\n Utils.extend(this.partials, name);\n } else {\n this.partials[name] = str;\n }\n }\n};\n\nfunction registerDefaultHelpers(instance) {\n instance.registerHelper('helperMissing', function(arg) {\n if(arguments.length === 2) {\n return undefined;\n } else {\n throw new Exception(\"Missing helper: '\" + arg + \"'\");\n }\n });\n\n instance.registerHelper('blockHelperMissing', function(context, options) {\n var inverse = options.inverse || function() {}, fn = options.fn;\n\n if (isFunction(context)) { context = context.call(this); }\n\n if(context === true) {\n return fn(this);\n } else if(context === false || context == null) {\n return inverse(this);\n } else if (isArray(context)) {\n if(context.length > 0) {\n return instance.helpers.each(context, options);\n } else {\n return inverse(this);\n }\n } else {\n return fn(context);\n }\n });\n\n instance.registerHelper('each', function(context, options) {\n var fn = options.fn, inverse = options.inverse;\n var i = 0, ret = \"\", data;\n\n if (isFunction(context)) { context = context.call(this); }\n\n if (options.data) {\n data = createFrame(options.data);\n }\n\n if(context && typeof context === 'object') {\n if (isArray(context)) {\n for(var j = context.length; i<j; i++) {\n if (data) {\n data.index = i;\n data.first = (i === 0);\n data.last = (i === (context.length-1));\n }\n ret = ret + fn(context[i], { data: data });\n }\n } else {\n for(var key in context) {\n if(context.hasOwnProperty(key)) {\n if(data) { \n data.key = key; \n data.index = i;\n data.first = (i === 0);\n }\n ret = ret + fn(context[key], {data: data});\n i++;\n }\n }\n }\n }\n\n if(i === 0){\n ret = inverse(this);\n }\n\n return ret;\n });\n\n instance.registerHelper('if', function(conditional, options) {\n if (isFunction(conditional)) { conditional = conditional.call(this); }\n\n // Default behavior is to render the positive path if the value is truthy and not empty.\n // The `includeZero` option may be set to treat the condtional as purely not empty based on the\n // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.\n if ((!options.hash.includeZero && !conditional) || Utils.isEmpty(conditional)) {\n return options.inverse(this);\n } else {\n return options.fn(this);\n }\n });\n\n instance.registerHelper('unless', function(conditional, options) {\n return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash});\n });\n\n instance.registerHelper('with', function(context, options) {\n if (isFunction(context)) { context = context.call(this); }\n\n if (!Utils.isEmpty(context)) return options.fn(context);\n });\n\n instance.registerHelper('log', function(context, options) {\n var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;\n instance.log(level, context);\n });\n}\n\nvar logger = {\n methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' },\n\n // State enum\n DEBUG: 0,\n INFO: 1,\n WARN: 2,\n ERROR: 3,\n level: 3,\n\n // can be overridden in the host environment\n log: function(level, obj) {\n if (logger.level <= level) {\n var method = logger.methodMap[level];\n if (typeof console !== 'undefined' && console[method]) {\n console[method].call(console, obj);\n }\n }\n }\n};\nexports.logger = logger;\nfunction log(level, obj) { logger.log(level, obj); }\n\nexports.log = log;var createFrame = function(object) {\n var obj = {};\n Utils.extend(obj, object);\n return obj;\n};\nexports.createFrame = createFrame;","\"use strict\";\n// Build out our basic SafeString type\nfunction SafeString(string) {\n this.string = string;\n}\n\nSafeString.prototype.toString = function() {\n return \"\" + this.string;\n};\n\nexports[\"default\"] = SafeString;","\"use strict\";\n\nvar errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];\n\nfunction Exception(message, node) {\n var line;\n if (node && node.firstLine) {\n line = node.firstLine;\n\n message += ' - ' + line + ':' + node.firstColumn;\n }\n\n var tmp = Error.prototype.constructor.call(this, message);\n\n // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.\n for (var idx = 0; idx < errorProps.length; idx++) {\n this[errorProps[idx]] = tmp[errorProps[idx]];\n }\n\n if (line) {\n this.lineNumber = line;\n this.column = node.firstColumn;\n }\n}\n\nException.prototype = new Error();\n\nexports[\"default\"] = Exception;","\"use strict\";\n/*jshint -W004 */\nvar SafeString = require(\"./safe-string\")[\"default\"];\n\nvar escape = {\n \"&\": \"&amp;\",\n \"<\": \"&lt;\",\n \">\": \"&gt;\",\n '\"': \"&quot;\",\n \"'\": \"&#x27;\",\n \"`\": \"&#x60;\"\n};\n\nvar badChars = /[&<>\"'`]/g;\nvar possible = /[&<>\"'`]/;\n\nfunction escapeChar(chr) {\n return escape[chr] || \"&amp;\";\n}\n\nfunction extend(obj, value) {\n for(var key in value) {\n if(Object.prototype.hasOwnProperty.call(value, key)) {\n obj[key] = value[key];\n }\n }\n}\n\nexports.extend = extend;var toString = Object.prototype.toString;\nexports.toString = toString;\n// Sourced from lodash\n// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt\nvar isFunction = function(value) {\n return typeof value === 'function';\n};\n// fallback for older versions of Chrome and Safari\nif (isFunction(/x/)) {\n isFunction = function(value) {\n return typeof value === 'function' && toString.call(value) === '[object Function]';\n };\n}\nvar isFunction;\nexports.isFunction = isFunction;\nvar isArray = Array.isArray || function(value) {\n return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false;\n};\nexports.isArray = isArray;\n\nfunction escapeExpression(string) {\n // don't escape SafeStrings, since they're already safe\n if (string instanceof SafeString) {\n return string.toString();\n } else if (!string && string !== 0) {\n return \"\";\n }\n\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = \"\" + string;\n\n if(!possible.test(string)) { return string; }\n return string.replace(badChars, escapeChar);\n}\n\nexports.escapeExpression = escapeExpression;function isEmpty(value) {\n if (!value && value !== 0) {\n return true;\n } else if (isArray(value) && value.length === 0) {\n return true;\n } else {\n return false;\n }\n}\n\nexports.isEmpty = isEmpty;","\"use strict\";\nvar Utils = require(\"./utils\");\nvar Exception = require(\"./exception\")[\"default\"];\nvar COMPILER_REVISION = require(\"./base\").COMPILER_REVISION;\nvar REVISION_CHANGES = require(\"./base\").REVISION_CHANGES;\n\nfunction checkRevision(compilerInfo) {\n var compilerRevision = compilerInfo && compilerInfo[0] || 1,\n currentRevision = COMPILER_REVISION;\n\n if (compilerRevision !== currentRevision) {\n if (compilerRevision < currentRevision) {\n var runtimeVersions = REVISION_CHANGES[currentRevision],\n compilerVersions = REVISION_CHANGES[compilerRevision];\n throw new Exception(\"Template was precompiled with an older version of Handlebars than the current runtime. \"+\n \"Please update your precompiler to a newer version (\"+runtimeVersions+\") or downgrade your runtime to an older version (\"+compilerVersions+\").\");\n } else {\n // Use the embedded version info since the runtime doesn't know about this revision yet\n throw new Exception(\"Template was precompiled with a newer version of Handlebars than the current runtime. \"+\n \"Please update your runtime to a newer version (\"+compilerInfo[1]+\").\");\n }\n }\n}\n\nexports.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial\n\nfunction template(templateSpec, env) {\n if (!env) {\n throw new Exception(\"No environment passed to template\");\n }\n\n // Note: Using env.VM references rather than local var references throughout this section to allow\n // for external users to override these as psuedo-supported APIs.\n var invokePartialWrapper = function(partial, name, context, helpers, partials, data) {\n var result = env.VM.invokePartial.apply(this, arguments);\n if (result != null) { return result; }\n\n if (env.compile) {\n var options = { helpers: helpers, partials: partials, data: data };\n partials[name] = env.compile(partial, { data: data !== undefined }, env);\n return partials[name](context, options);\n } else {\n throw new Exception(\"The partial \" + name + \" could not be compiled when running in runtime-only mode\");\n }\n };\n\n // Just add water\n var container = {\n escapeExpression: Utils.escapeExpression,\n invokePartial: invokePartialWrapper,\n programs: [],\n program: function(i, fn, data) {\n var programWrapper = this.programs[i];\n if(data) {\n programWrapper = program(i, fn, data);\n } else if (!programWrapper) {\n programWrapper = this.programs[i] = program(i, fn);\n }\n return programWrapper;\n },\n merge: function(param, common) {\n var ret = param || common;\n\n if (param && common && (param !== common)) {\n ret = {};\n Utils.extend(ret, common);\n Utils.extend(ret, param);\n }\n return ret;\n },\n programWithDepth: env.VM.programWithDepth,\n noop: env.VM.noop,\n compilerInfo: null\n };\n\n return function(context, options) {\n options = options || {};\n var namespace = options.partial ? options : env,\n helpers,\n partials;\n\n if (!options.partial) {\n helpers = options.helpers;\n partials = options.partials;\n }\n var result = templateSpec.call(\n container,\n namespace, context,\n helpers,\n partials,\n options.data);\n\n if (!options.partial) {\n env.VM.checkRevision(container.compilerInfo);\n }\n\n return result;\n };\n}\n\nexports.template = template;function programWithDepth(i, fn, data /*, $depth */) {\n var args = Array.prototype.slice.call(arguments, 3);\n\n var prog = function(context, options) {\n options = options || {};\n\n return fn.apply(this, [context, options.data || data].concat(args));\n };\n prog.program = i;\n prog.depth = args.length;\n return prog;\n}\n\nexports.programWithDepth = programWithDepth;function program(i, fn, data) {\n var prog = function(context, options) {\n options = options || {};\n\n return fn(context, options.data || data);\n };\n prog.program = i;\n prog.depth = 0;\n return prog;\n}\n\nexports.program = program;function invokePartial(partial, name, context, helpers, partials, data) {\n var options = { partial: true, helpers: helpers, partials: partials, data: data };\n\n if(partial === undefined) {\n throw new Exception(\"The partial \" + name + \" could not be found\");\n } else if(partial instanceof Function) {\n return partial(context, options);\n }\n}\n\nexports.invokePartial = invokePartial;function noop() { return \"\"; }\n\nexports.noop = noop;"]}
{
"name": "gemini-gui",
"version": "0.1.3",
"version": "0.2.0",
"description": "GUI for gemini testing utility",

@@ -19,3 +19,3 @@ "main": "lib/index.js",

"body-parser": "^1.8.1",
"chalk": "^0.5.1",
"chalk": "^1.0.0",
"coa": "^0.4.1",

@@ -59,8 +59,8 @@ "express": "^4.8.6",

"type": "git",
"url": "https://github.com/bem/gemini-gui.git"
"url": "https://github.com/gemini-testing/gemini-gui.git"
},
"bugs": {
"url": "https://github.com/bem/gemini-gui/issues"
"url": "https://github.com/gemini-testing/gemini-gui/issues"
},
"homepage": "https://github.com/bem/gemini-gui"
"homepage": "https://github.com/gemini-testing/gemini-gui"
}
# Gemini GUI
[![Build Status](https://travis-ci.org/bem/gemini-gui.svg)](https://travis-ci.org/bem/gemini-gui)
[![Build Status](https://travis-ci.org/gemini-testing/gemini-gui.svg)](https://travis-ci.org/gemini-testing/gemini-gui)
GUI for [gemini](https://github.com/bem/gemini) utility.
GUI for [gemini](https://github.com/gemini-testing/gemini) utility.

@@ -20,3 +20,3 @@ ![screenshot](assets/screenshot.png "Screenshot")

To be able to use `GUI` on a project you must have `gemini` installed
locally in this project. `GUI` will not work with `gemini` below
locally in this project. `GUI` will not work with `gemini` below
`0.8.0`.

@@ -43,2 +43,2 @@

You can also override config file options with environment variables. Use `gemini`
[documentation](https://github.com/bem/gemini#configuration) for details.
[documentation](https://github.com/gemini-testing/gemini#configuration) for details.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc