From f5e34d3599fd4842f28f5d51f26ef9f4f8aad280 Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Mon, 17 Jun 2019 22:59:50 -0400 Subject: [PATCH] Add more e2e tests Test bill comments, poll results, outcomes, and histories. Toward #114. --- deploy/tests/front-end.sh | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/deploy/tests/front-end.sh b/deploy/tests/front-end.sh index 8cd98d22..8d4fa150 100755 --- a/deploy/tests/front-end.sh +++ b/deploy/tests/front-end.sh @@ -8,12 +8,40 @@ if [ $? -ne 0 ]; then fi # Is bill text being displayed? -curl --no-buffer --silent "http://localhost:5000/bill/2019/sb1604/fulltext" |grep -q "agricultural animal" +curl --no-buffer --silent "http://localhost:5000/bill/2019/sb1604/fulltext/" |grep -q "agricultural animal" if [ $? -ne 0 ]; then echo "ERROR: Bill text isn't being displayed" ERRORED=true fi +# Are bill comments being displayed? +curl --no-buffer --silent "http://localhost:5000/bill/2019/sb1604/" |grep -q "gruesome" +if [ $? -ne 0 ]; then + echo "ERROR: Bill comments aren't being displayed" + ERRORED=true +fi + +# Are bill poll results being displayed? +curl --no-buffer --silent "http://localhost:5000/bill/2019/sb1604/" |grep -q "55 votes" +if [ $? -ne 0 ]; then + echo "ERROR: Bill poll results aren't being displayed" + ERRORED=true +fi + +# Are bill outcomes being displayed? +curl --no-buffer --silent "http://localhost:5000/bill/2019/sb1604/" |grep -q "Bill Has Passed" +if [ $? -ne 0 ]; then + echo "ERROR: Bill outcomes aren't being displayed" + ERRORED=true +fi + +# Are bill histories being displayed? +curl --no-buffer --silent "http://localhost:5000/bill/2019/sb1604/" |grep -q "Rereferred to Finance" +if [ $? -ne 0 ]; then + echo "ERROR: Bill histories aren't being displayed" + ERRORED=true +fi + # Is basic legislator information being displayed? curl --no-buffer --silent "http://localhost:5000/legislator/lradams/" |grep -q "

Del. Les Adams" if [ $? -ne 0 ]; then