forked from shane-tomlinson/testmob
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* It looks better. * Preparing for Heroku. * Tests run. * It is now based on mobsters.
- Loading branch information
1 parent
dcb1d8d
commit 9c61c18
Showing
20 changed files
with
827 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
web: node server/start.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
$(function() { | ||
"use strict"; | ||
|
||
$("#signin").click(function(event) { | ||
event.preventDefault(); | ||
|
||
navigator.id.getVerifiedEmail(function(assertion) { | ||
$.ajax({ | ||
type: "POST", | ||
url: "/wsapi/login", | ||
data: { | ||
assertion: assertion | ||
}, | ||
success: function(resp) { | ||
window.location.reload(); | ||
}, | ||
error: function(resp) { | ||
console.log(resp); | ||
} | ||
}); | ||
}); | ||
}); | ||
|
||
$("#signout").click(function(event) { | ||
event.preventDefault(); | ||
|
||
$.ajax({ | ||
type: "POST", | ||
url: "/wsapi/logout", | ||
success: function(resp) { | ||
window.location.reload(); | ||
}, | ||
error: function(resp) { | ||
|
||
} | ||
}); | ||
}); | ||
|
||
|
||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,40 @@ | ||
$(function() { | ||
"use strict"; | ||
"use strict"; | ||
|
||
var socket; | ||
socket = io.connect('http://192.168.1.88:3000'); | ||
var socket; | ||
socket = io.connect('http://192.168.1.88:3000'); | ||
|
||
document.location.hash=""; | ||
document.location.hash=""; | ||
|
||
$("form").bind("submit", function(event) { | ||
event.preventDefault(); | ||
$("#url").val(localStorage.url || ""); | ||
|
||
var url = $("#url").val().trim(); | ||
$("form").bind("submit", function(event) { | ||
event.preventDefault(); | ||
|
||
var url = $("#url").val().trim(); | ||
if(url) { | ||
localStorage.url = url; | ||
socket.emit('request_start_test', { url: url }); | ||
}); | ||
|
||
var resultTemplate = new EJS({ url: "/templates/results.ejs" }); | ||
var result = 1; | ||
socket.on("test_start", function(data) { | ||
data.id = "runner" + data.runner_id; | ||
data.complete = false; | ||
var html = resultTemplate.render(data); | ||
$(html).appendTo("#results"); | ||
}); | ||
|
||
socket.on("test_complete", function(data) { | ||
data.id = "runner" + data.runner_id; | ||
data.complete = true; | ||
var html = resultTemplate.render(data); | ||
$("#" + data.id).replaceWith(html); | ||
result++; | ||
}); | ||
} | ||
}); | ||
|
||
var resultTemplate = new EJS({ url: "/templates/results.ejs" }); | ||
var result = 1; | ||
|
||
socket.on("test_start", function(data) { | ||
data.id = "runner" + data.runner_id; | ||
data.complete = false; | ||
data.email = data.email || ""; | ||
var html = resultTemplate.render(data); | ||
$(html).appendTo("#results"); | ||
}); | ||
|
||
socket.on("test_complete", function(data) { | ||
data.id = "runner" + data.runner_id; | ||
data.complete = true; | ||
data.email = data.email || ""; | ||
var html = resultTemplate.render(data); | ||
$("#" + data.id).replaceWith(html); | ||
result++; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
TestSwarm.Loader = (function() { | ||
"use strict"; | ||
|
||
function load(data, callback) { | ||
var testWindow = WinChan.open(data.url, "http://192.168.1.88:10002/relay", "", {}, function(err, data) { | ||
testWindow.close(); | ||
callback(err, data); | ||
}); | ||
} | ||
|
||
return { | ||
load: load | ||
}; | ||
|
||
|
||
}()); |
Oops, something went wrong.