Skip to content

Commit

Permalink
issue #22 - updates for failing and timing out acceptance tests on Tr…
Browse files Browse the repository at this point in the history
…avis
  • Loading branch information
jantman committed Mar 28, 2017
1 parent b6438ef commit a11b917
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion biweeklybudget/flaskapp/static/js/budgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function modalDivHandleType() {
function modalDivForm() {
var frm = '<form role="form">';
// name
frm += '<div class="form-group"><label>Name</label><input class="form-control" id="budget_frm_name" name="name"></div>';
frm += '<div class="form-group"><label>Name</label><input class="form-control" id="budget_frm_name" name="name"></div>\n';
// type
frm += '<div class="form-group"><label>Type </label> <label class="radio-inline"><input type="radio" name="budget_frm_type" id="budget_frm_type_periodic" value="periodic" onchange="modalDivHandleType()" checked>Periodic</label><label class="radio-inline"><input type="radio" name="budget_frm_type" id="budget_frm_type_standing" value="standing" onchange="modalDivHandleType()">Standing</label></div>';
// description
Expand Down Expand Up @@ -83,8 +83,10 @@ function modalDivFillAndShow(msg) {
$('#modalLabel').text('Edit Budget ' + msg['id']);
$('#budget_frm_name').val(msg['name']);
if(msg['is_periodic'] === true) {
$('#budget_frm_type_standing').prop('checked', false);
$('#budget_frm_type_periodic').prop('checked', true);
} else {
$('#budget_frm_type_periodic').prop('checked', false);
$('#budget_frm_type_standing').prop('checked', true);
}
modalDivHandleType();
Expand Down
4 changes: 4 additions & 0 deletions biweeklybudget/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ def selenium(selenium):
"""
selenium.set_window_size(1200, 800)
selenium.implicitly_wait(2)
# from http://stackoverflow.com/a/13853684/211734
selenium.set_script_timeout(60)
# from http://stackoverflow.com/a/17536547/211734
selenium.set_page_load_timeout(60)
return selenium
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ markers =
integration: tests that connect to an actual database
acceptance: tests that use the real Flask app over HTTP
sensitive_url = example\.com
# timeout tests after 2 minutes
timeout = 360
# use signal method to try to keep test session running
timeout_method = signal
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ deps =
mock
freezegun
pytest-blockage
pytest-timeout

passenv=CI TRAVIS* CONTINUOUS_INTEGRATION AWS* NO_REFRESH_DB DB_CONNSTRING
setenv =
Expand Down Expand Up @@ -97,6 +98,7 @@ deps =
freezegun
pytest-flask
pytest-selenium
pytest-timeout
passenv = {[testenv]passenv}
setenv = {[testenv]setenv}
basepython = python2.7
Expand Down

0 comments on commit a11b917

Please sign in to comment.