Update the tour for access tokens and diffs.

This commit is contained in:
yackob03 2013-10-20 01:09:24 -04:00
parent 04ec593d8a
commit c90602e48d
6 changed files with 37 additions and 18 deletions

View file

@ -1,7 +1,10 @@
var width = 993;
var height = 768;
var casper = require('casper').create({
viewportSize: {
width: 993,
height: 768
width: width,
height: height
},
verbose: true,
logLevel: "debug"
@ -15,8 +18,6 @@ var repo = isDebug ? 'complex' : 'r0';
var outputDir = "screenshots/";
casper.start(rootUrl);
casper.on("remote.message", function(msg, trace) {
this.echo("Message: " + msg, "DEBUG");
});
@ -25,12 +26,8 @@ casper.on("page.error", function(msg, trace) {
this.echo("Page error: " + msg, "ERROR");
});
casper.then(function() {
this.capture(outputDir + 'landing.png');
});
casper.thenOpen(rootUrl + 'signin', function () {
this.fill('form', {
casper.start(rootUrl + 'signin', function () {
this.fill('.form-signin', {
'username': 'devtable',
'password': isDebug ? 'password': 'C>K98%y"_=54x"<',
}, true);
@ -44,7 +41,7 @@ casper.then(function() {
this.capture(outputDir + 'user-home.png');
});
casper.thenOpen(rootUrl + 'repository/devtable/' + repo, function() {
casper.thenOpen(rootUrl + 'repository/devtable/' + repo + '?tag=v2.0', function() {
// Wait for the tree to initialize.
this.waitForSelector('.image-tree', function() {
// Wait for the tree's animation to finish.
@ -56,6 +53,17 @@ casper.then(function() {
this.capture(outputDir + 'repo-view.png');
});
casper.thenClick('#current-image dd a', function() {
this.waitForSelector('.result-count', function() {
this.capture(outputDir + 'repo-changes.png', {
top: 0,
left: 0,
width: width,
height: height
});
});
})
casper.thenOpen(rootUrl + 'repository/devtable/' + repo + '/admin', function() {
this.waitForSelector('.repo-access-state');
});