Update the screenshots to generate some action shots of the org.

This commit is contained in:
yackob03 2013-11-07 22:46:11 -05:00
parent d524559bce
commit 931ba5f9b9
3 changed files with 46 additions and 6 deletions

View file

@ -49,3 +49,10 @@ running the tests:
``` ```
STACK=test python -m unittest discover STACK=test python -m unittest discover
``` ```
generating screenshots:
```
cd screenshots
casperjs screenshots.js --d
```

View file

@ -1,4 +1,4 @@
var width = 993; var width = 1024;
var height = 768; var height = 768;
var casper = require('casper').create({ var casper = require('casper').create({
@ -12,12 +12,14 @@ var casper = require('casper').create({
var disableOlark = function() { var disableOlark = function() {
casper.then(function() { casper.then(function() {
this.waitForText('Contact us!', function() { this.waitForText('Chat with us!', function() {
this.evaluate(function() { this.evaluate(function() {
console.log(olark); console.log(olark);
window.olark.configure('box.start_hidden', true); window.olark.configure('box.start_hidden', true);
window.olark('api.box.hide'); 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 rootUrl = isDebug ? 'http://localhost:5000/' : 'https://quay.io/';
var repo = isDebug ? 'complex' : 'r0'; var repo = isDebug ? 'complex' : 'r0';
var org = isDebug ? 'buynlarge' : 'quay'
var outputDir = "screenshots/"; var outputDir = "screenshots/";
@ -42,11 +45,11 @@ casper.start(rootUrl + 'signin', function () {
this.fill('.form-signin', { this.fill('.form-signin', {
'username': 'devtable', 'username': 'devtable',
'password': isDebug ? 'password': 'C>K98%y"_=54x"<', 'password': isDebug ? 'password': 'C>K98%y"_=54x"<',
}, true); }, false);
}); });
casper.then(function() { casper.thenClick('.form-signin button[type=submit]', function() {
this.waitForText('Your Top Repositories'); this.waitForText('Top Repositories');
}); });
disableOlark(); disableOlark();
@ -90,4 +93,34 @@ casper.then(function() {
this.capture(outputDir + 'repo-admin.png'); 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(); casper.run();

View file

@ -72,7 +72,7 @@
<thead> <thead>
<th>Plan</th> <th>Plan</th>
<th>Private Repositories</th> <th>Private Repositories</th>
<th style="min-width: 64px">Price</th> <th style="min-width: 70px">Price</th>
<th></th> <th></th>
</thead> </thead>