From 09bc6df503cbcb0a222a2888294a2294d897d1bb Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Thu, 9 Oct 2014 14:12:32 +0000 Subject: [PATCH] generate screenshots of Koha widget in production / marketing, MKWS-276 --- test/widgets/Makefile | 33 +++++++++++++++++++++++++++++++++ test/widgets/url.txt | 5 +++++ 2 files changed, 38 insertions(+) create mode 100644 test/widgets/Makefile create mode 100644 test/widgets/images/.gitkeep create mode 100644 test/widgets/url.txt diff --git a/test/widgets/Makefile b/test/widgets/Makefile new file mode 100644 index 0000000..1e4d41d --- /dev/null +++ b/test/widgets/Makefile @@ -0,0 +1,33 @@ +# Copyright (c) 2013-2014 Index Data ApS. http://indexdata.com + +PHANTOMJS_TIMEOUT=18 +PHANTOMJS= ../node_modules/phantomjs/bin/phantomjs +IMAGES= ./images +SCREENSHOT_WIDTH_HEIGHT= 1200 1000 +PERL_SCRIPTS= ../bin/bomb.pl +PROG= ../phantom/screenshot.js +MD5= $(shell which md5 md5sum) +TIMEOUT=5 + +PHANTOMJS_URL= http://cph.koha.indexdata.com/cgi-bin/koha/opac-search.pl?q=sushi +PHANTOMJS_URL= http://www.indexdata.com/ + +all: check + +clean: + rm -f mkws-error.png mkws-error.html + rm -f images/*.png + +distclean: clean + +test: check + +screenshot: + file=$$(echo "${PHANTOMJS_URL}" | ${MD5} | perl -npe 's,\s.*,,'); \ + ${PHANTOMJS} ${PROG} ${PHANTOMJS_URL} ${IMAGES}/$$file.png ${SCREENSHOT_WIDTH_HEIGHT} ${TIMEOUT} + +help: + @echo "make [ all | clean | distclean ]" + @echo " [ screenshots ]" + @echo "" + diff --git a/test/widgets/images/.gitkeep b/test/widgets/images/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/test/widgets/url.txt b/test/widgets/url.txt new file mode 100644 index 0000000..c9695ae --- /dev/null +++ b/test/widgets/url.txt @@ -0,0 +1,5 @@ +http://cph.koha.indexdata.com/cgi-bin/koha/opac-search.pl?q=sushi +http://demo.koha.indexdata.com/cgi-bin/koha/opac-search.pl?q=sushi +http://demo.koha.indexdata.com/cgi-bin/koha/opac-search.pl?q=sushi2 +http://boston.koha.indexdata.com/cgi-bin/koha/opac-search.pl?q=sushi + -- 1.7.10.4