Add a build history screenshot to the landing page and fix the screenshots.js script to work on prod
This commit is contained in:
parent
638463671a
commit
702188f492
13 changed files with 48 additions and 10 deletions
|
@ -15,8 +15,9 @@ var isDebug = !!options['d'];
|
|||
|
||||
var rootUrl = isDebug ? 'http://localhost:5000/' : 'https://quay.io/';
|
||||
var repo = isDebug ? 'complex' : 'r0';
|
||||
var org = isDebug ? 'buynlarge' : 'quay'
|
||||
var orgrepo = 'orgrepo'
|
||||
var org = isDebug ? 'buynlarge' : 'devtable'
|
||||
var orgrepo = isDebug ? 'buynlarge/orgrepo' : 'quay/testconnect2';
|
||||
var buildrepo = isDebug ? 'devtable/building' : 'quay/testconnect2';
|
||||
|
||||
var outputDir = "screenshots/";
|
||||
|
||||
|
@ -32,8 +33,16 @@ casper.on("page.error", function(msg, trace) {
|
|||
});
|
||||
|
||||
casper.start(rootUrl + 'signin', function () {
|
||||
this.wait(1000);
|
||||
});
|
||||
|
||||
casper.thenClick('.accordion-toggle[data-target="#collapseSignin"]', function() {
|
||||
this.wait(1000);
|
||||
});
|
||||
|
||||
casper.then(function () {
|
||||
this.fill('.form-signin', {
|
||||
'username': 'devtable',
|
||||
'username': isDebug ? 'devtable' : 'quaydemo',
|
||||
'password': isDebug ? 'password': 'C>K98%y"_=54x"<',
|
||||
}, false);
|
||||
});
|
||||
|
@ -43,6 +52,7 @@ casper.thenClick('.form-signin button[type=submit]', function() {
|
|||
});
|
||||
|
||||
casper.then(function() {
|
||||
this.waitForSelector('.fa-lock');
|
||||
this.log('Generating user home screenshot.');
|
||||
});
|
||||
|
||||
|
@ -150,12 +160,25 @@ casper.then(function() {
|
|||
this.log('Generating oganization repository admin screenshot.');
|
||||
});
|
||||
|
||||
casper.thenOpen(rootUrl + 'repository/' + org + '/' + orgrepo + '/admin', function() {
|
||||
this.waitForText('outsideorg')
|
||||
casper.thenOpen(rootUrl + 'repository/' + orgrepo + '/admin', function() {
|
||||
this.waitForText('Robot Account')
|
||||
});
|
||||
|
||||
casper.then(function() {
|
||||
this.capture(outputDir + 'org-repo-admin.png');
|
||||
});
|
||||
|
||||
|
||||
casper.then(function() {
|
||||
this.log('Generating build history screenshot.');
|
||||
});
|
||||
|
||||
casper.thenOpen(rootUrl + 'repository/' + buildrepo + '/build', function() {
|
||||
this.waitForText('Starting');
|
||||
});
|
||||
|
||||
casper.then(function() {
|
||||
this.capture(outputDir + 'build-history.png');
|
||||
});
|
||||
|
||||
casper.run();
|
||||
|
|
Reference in a new issue