mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 01:26:18 -05:00
fix smoke test
This commit is contained in:
parent
dd3d8d85d3
commit
45b1f9c0d3
1 changed files with 11 additions and 15 deletions
|
@ -27,7 +27,7 @@ page.onInitialized = function() {
|
||||||
|
|
||||||
page.onConsoleMessage = function(msg) {
|
page.onConsoleMessage = function(msg) {
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
}
|
};
|
||||||
|
|
||||||
page.waitFor = function(desc, fn, cb) {
|
page.waitFor = function(desc, fn, cb) {
|
||||||
var start = +new Date();
|
var start = +new Date();
|
||||||
|
@ -63,9 +63,9 @@ function test(desc, fn) {
|
||||||
actions.push({ test: fn, desc: desc });
|
actions.push({ test: fn, desc: desc });
|
||||||
};
|
};
|
||||||
|
|
||||||
function wait(delay) {
|
// function wait(delay) {
|
||||||
actions.push({ wait: delay });
|
// actions.push({ wait: delay });
|
||||||
}
|
// }
|
||||||
|
|
||||||
function exec(desc, fn) {
|
function exec(desc, fn) {
|
||||||
actions.push({ exec: fn, desc: desc });
|
actions.push({ exec: fn, desc: desc });
|
||||||
|
@ -75,13 +75,13 @@ function execAsync(desc, delay, fn) {
|
||||||
actions.push({ execAsync: fn, delay: delay, desc: desc });
|
actions.push({ execAsync: fn, delay: delay, desc: desc });
|
||||||
};
|
};
|
||||||
|
|
||||||
function upload(input, path) {
|
// function upload(input, path) {
|
||||||
actions.push({ upload: path, input: input });
|
// actions.push({ upload: path, input: input });
|
||||||
};
|
// };
|
||||||
|
|
||||||
function screenshot(filename) {
|
// function screenshot(filename) {
|
||||||
actions.push({ screenshot: filename });
|
// actions.push({ screenshot: filename });
|
||||||
}
|
// }
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
var allPassed = true;
|
var allPassed = true;
|
||||||
|
@ -143,11 +143,7 @@ var runTests = function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
execAsync("navigate to 1st topic", 500, function() {
|
execAsync("navigate to 1st topic", 500, function() {
|
||||||
if ($(".main-link > a:first").length > 0) {
|
$(".main-link a.title:first").click();
|
||||||
$(".main-link > a:first").click(); // topic list page
|
|
||||||
} else {
|
|
||||||
$(".featured-topic a.title:first").click(); // categories page
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("at least one post body", function() {
|
test("at least one post body", function() {
|
||||||
|
|
Loading…
Reference in a new issue