diff --git a/README.md b/README.md index b7e1fed04..818fc5024 100644 --- a/README.md +++ b/README.md @@ -49,3 +49,10 @@ running the tests: ``` STACK=test python -m unittest discover ``` + +generating screenshots: + +``` +cd screenshots +casperjs screenshots.js --d +``` \ No newline at end of file diff --git a/screenshots/screenshots.js b/screenshots/screenshots.js index c8cd07b7c..09a817ed4 100644 --- a/screenshots/screenshots.js +++ b/screenshots/screenshots.js @@ -1,4 +1,4 @@ -var width = 993; +var width = 1024; var height = 768; var casper = require('casper').create({ @@ -12,12 +12,14 @@ var casper = require('casper').create({ var disableOlark = function() { casper.then(function() { - this.waitForText('Contact us!', function() { + this.waitForText('Chat with us!', function() { this.evaluate(function() { console.log(olark); window.olark.configure('box.start_hidden', true); window.olark('api.box.hide'); }); + }, function() { + // Do nothing, if olark never loaded we're ok with that }); }); }; @@ -27,6 +29,7 @@ var isDebug = !!options['d']; var rootUrl = isDebug ? 'http://localhost:5000/' : 'https://quay.io/'; var repo = isDebug ? 'complex' : 'r0'; +var org = isDebug ? 'buynlarge' : 'quay' var outputDir = "screenshots/"; @@ -42,11 +45,11 @@ casper.start(rootUrl + 'signin', function () { this.fill('.form-signin', { 'username': 'devtable', 'password': isDebug ? 'password': 'C>K98%y"_=54x"<', - }, true); + }, false); }); -casper.then(function() { - this.waitForText('Your Top Repositories'); +casper.thenClick('.form-signin button[type=submit]', function() { + this.waitForText('Top Repositories'); }); disableOlark(); @@ -90,4 +93,34 @@ casper.then(function() { this.capture(outputDir + 'repo-admin.png'); }); +casper.thenOpen(rootUrl + 'organizations/new/', function() { + this.waitForText('Create'); +}); + +disableOlark(); + +casper.then(function() { + this.capture(outputDir + 'org-create.png'); +}); + +casper.thenOpen(rootUrl + 'organization/' + org, function() { + this.waitForSelector('.organization-name'); +}); + +disableOlark(); + +casper.then(function() { + this.capture(outputDir + 'org-teams.png'); +}); + +casper.thenOpen(rootUrl + 'organization/' + org + '/admin', function() { + this.waitForSelector('#repository-usage-chart'); +}); + +disableOlark(); + +casper.then(function() { + this.capture(outputDir + 'org-admin.png'); +}); + casper.run(); diff --git a/static/partials/new-organization.html b/static/partials/new-organization.html index 2e2828a9b..5ca0af8ad 100644 --- a/static/partials/new-organization.html +++ b/static/partials/new-organization.html @@ -72,7 +72,7 @@ Plan Private Repositories - Price + Price