Commit 427bac15a573a045a59b0663e811821492c37acd
1 parent
c34269fa26
Exists in
master
Screenshots for existing web pages
Showing 2 changed files with 45 additions and 1 deletions Side-by-side Diff
Makefile
View file @
427bac1
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | SCREEN_SEQUENCE_DOTS = $(wildcard screen_sequence_diagrams/*.dot) |
5 | 5 | SCREEN_SEQUENCE_PNGS = $(patsubst screen_sequence_diagrams/%,built/%,$(patsubst %.dot,%.png,$(SCREEN_SEQUENCE_DOTS))) |
6 | 6 | |
7 | -all: built/ $(PNGS) $(PDFS) | |
7 | +all: built/ $(PNGS) $(PDFS) built/screenshots/ | |
8 | 8 | |
9 | 9 | built/: |
10 | 10 | mkdir -p built |
... | ... | @@ -32,6 +32,11 @@ |
32 | 32 | rm -f built/*.out |
33 | 33 | rm -f built/*.toc |
34 | 34 | |
35 | +built/screenshots/: .PHONY | |
36 | + mkdir -p built/screenshots | |
37 | + cd built/screenshots; casperjs --ssl-protocol=tlsv1 ../../ss_test.js | |
38 | + | |
39 | +.PHONY: | |
35 | 40 | |
36 | 41 | clean: |
37 | 42 | rm -rf built/ |
ss_test.js
View file @
427bac1
1 | +//http://docs.casperjs.org/en/latest/modules/casper.html#captureselector | |
2 | +//Run with: casperjs --ssl-protocol=tlsv1 ss_test.js | |
3 | + | |
4 | +var casper = require('casper').create({ | |
5 | + viewportSize: {width: 800, height: 600} | |
6 | +}); | |
7 | + | |
8 | +casper.start().zoom(.9).thenOpen('https://flashy.cards/app/login', function() { | |
9 | + this.captureSelector('login.png','body' ); | |
10 | +}).thenOpen('https://flashy.cards/app/requestpasswordreset', function() { | |
11 | + this.captureSelector('requestpasswordreset.png', 'body'); | |
12 | +}).thenOpen('https://flashy.cards/app/resetpassword', function() { | |
13 | + this.captureSelector('resetpassword.png', 'body'); | |
14 | +}).thenOpen('https://flashy.cards/app/addclass', function() { | |
15 | + this.captureSelector('addclass.png', 'body'); | |
16 | +}).thenOpen('https://flashy.cards/app/deck', function() { | |
17 | + this.captureSelector('deck.png', 'body'); | |
18 | +}).thenOpen('https://flashy.cards/app/feed', function() { | |
19 | + this.captureSelector('feed.png', 'body'); | |
20 | +}).thenOpen('https://flashy.cards/app/study', function() { | |
21 | + this.captureSelector('study.png', 'body'); | |
22 | +}).thenOpen('https://flashy.cards/app/flashcard', function() { | |
23 | + this.captureSelector('flashcard.png', 'body'); | |
24 | +}).thenOpen('https://flashy.cards/app/logout', function() { | |
25 | + this.captureSelector('logout.png', 'body'); | |
26 | +}).thenOpen('https://flashy.cards/app/verifyemail', function() { | |
27 | + this.captureSelector('verifyemail.png', 'body'); | |
28 | +}); | |
29 | + | |
30 | +/*casper.start().zoom(.9).thenOpen('https://flashy.cards/app/requestpasswordreset', function() { | |
31 | + this.captureSelector('requestPasswordReset.png','body' ); | |
32 | +});*/ | |
33 | + | |
34 | +/*casper.start().zoom(.9).thenOpen('https://flashy.cards/app/feed', function() { | |
35 | + this.captureSelector('feed.png','body' ); | |
36 | +});*/ | |
37 | + | |
38 | + | |
39 | +casper.run(); |