From 2172cc73e34191709e063816b578eb8ed01d427f Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 13 May 2015 13:30:22 -0400 Subject: [PATCH] Update screenshot generation --- screenshots/screenshots.js | 110 +++++++----------- .../repo-view/repo-panel-builds.css | 4 + 2 files changed, 48 insertions(+), 66 deletions(-) diff --git a/screenshots/screenshots.js b/screenshots/screenshots.js index d7a94c3d4..db45087bd 100644 --- a/screenshots/screenshots.js +++ b/screenshots/screenshots.js @@ -48,12 +48,12 @@ casper.then(function () { }); casper.thenClick('.form-signin button[type=submit]', function() { - this.waitForText('Top Repositories'); + this.waitForText('Repositories'); }); casper.then(function() { - this.waitForSelector('.fa-lock'); - this.log('Generating user home screenshot.'); + this.waitForSelector('.repo-list'); + this.log('Generating repositories screenshot.'); }); casper.then(function() { @@ -65,84 +65,74 @@ casper.then(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. - this.wait(4000); - }); + this.wait(1000); }); casper.then(function() { this.capture(outputDir + 'repo-view.png'); }); - -casper.thenClick('a[data-image="c3d710edbd3b"]', function() { - this.waitForText('And 3048 more...', function() { - this.capture(outputDir + 'image-view.png'); - }); +casper.then(function() { + this.log('Generating repository tags screenshot.'); }); -casper.thenClick('.image-link', 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 + '?tab=tags&tag=v2.0', function() { + this.wait(1000); +}); + +casper.then(function() { + this.capture(outputDir + 'repo-tags.png'); +}); + +casper.then(function() { + this.log('Generating repository tree screenshot.'); +}); + +casper.thenOpen(rootUrl + 'repository/devtable/' + repo + '?tab=changes&tag=v2.0,prod,staging', function() { + this.wait(5000); +}); + +casper.then(function() { + this.capture(outputDir + 'repo-tree.png'); }); casper.then(function() { - this.log('Generating repository admin screenshot.'); + this.log('Generating repository settings screenshot.'); }); -casper.thenOpen(rootUrl + 'repository/devtable/' + repo + '/admin', function() { - this.waitForSelector('.repo-access-state'); +casper.thenOpen(rootUrl + 'repository/devtable/' + repo + '?tab=settings', function() { + this.wait(1000); }); casper.then(function() { - this.capture(outputDir + 'repo-admin.png'); + this.capture(outputDir + 'repo-settings.png'); }); casper.then(function() { - this.log('Generating organization repo list screenshot.'); -}); - -casper.thenOpen(rootUrl + 'repository/?namespace=' + org, function() { - this.waitForText('Repositories'); -}); - -casper.then(function() { - this.capture(outputDir + 'org-repo-list.png'); -}); - -casper.then(function() { - this.log('Generating organization teams screenshot.'); + this.log('Generating organization view screenshot.'); }); casper.thenOpen(rootUrl + 'organization/' + org, function() { this.waitForSelector('.organization-name'); }); +casper.then(function() { + this.capture(outputDir + 'org-view.png'); +}); + +casper.then(function() { + this.log('Generating organization teams screenshot.'); +}); + +casper.thenOpen(rootUrl + 'organization/' + org + '?tab=teams', function() { + this.waitForText('Owners'); +}); + casper.then(function() { this.capture(outputDir + 'org-teams.png'); }); -casper.then(function() { - this.log('Generating organization admin screenshot.'); -}); - -casper.thenOpen(rootUrl + 'organization/' + org + '/admin', function() { - this.waitForSelector('#repository-usage-chart'); -}); - -casper.then(function() { - this.capture(outputDir + 'org-admin.png'); -}); - casper.then(function() { this.log('Generating organization logs screenshot.'); }); @@ -160,25 +150,13 @@ casper.thenClick('a[data-target="#logs"]', function() { }); }); -casper.then(function() { - this.log('Generating oganization repository admin screenshot.'); -}); - -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.thenOpen(rootUrl + 'repository/' + buildrepo + '?tab=builds', function() { + this.wait(1000); + this.waitForText('Triggered By'); }); casper.then(function() { diff --git a/static/css/directives/repo-view/repo-panel-builds.css b/static/css/directives/repo-view/repo-panel-builds.css index 3281cf272..ec4c9dd3c 100644 --- a/static/css/directives/repo-view/repo-panel-builds.css +++ b/static/css/directives/repo-view/repo-panel-builds.css @@ -10,3 +10,7 @@ margin-right: 6px; vertical-align: middle; } + +.repo-panel-builds .heading-controls { + white-space: nowrap; +} \ No newline at end of file