Skip to content

Commit

Permalink
Add more e2e tests
Browse files Browse the repository at this point in the history
Test bill comments, poll results, outcomes, and histories. Toward #114.
  • Loading branch information
waldoj committed Jun 18, 2019
1 parent 3f1f760 commit f5e34d3
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion deploy/tests/front-end.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<h1>Del. Les Adams"
if [ $? -ne 0 ]; then
Expand Down

0 comments on commit f5e34d3

Please sign in to comment.