Skip to content

Commit

Permalink
issue #142 - fix some acceptance tests broken in last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jantman committed Nov 2, 2017
1 parent c62c4df commit aff74ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions biweeklybudget/tests/acceptance/flaskapp/views/test_budgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,22 +426,23 @@ def test_31_populate_direct_url_modal(self, base_url, selenium):
self.assert_modal_displayed(modal, title, body)
assert title.text == 'Edit Budget 1'
assert selenium.find_element_by_id('budget_frm_name').get_attribute(
'value') == 'Periodic1'
'value') == 'EditedPeriodic1'
assert selenium.find_element_by_id(
'budget_frm_type_periodic').is_selected()
assert selenium.find_element_by_id(
'budget_frm_type_standing').is_selected() is False
assert selenium.find_element_by_id(
'budget_frm_description').get_attribute('value') == 'P1desc'
'budget_frm_description').get_attribute('value') == 'EditedP1desc'
assert selenium.find_element_by_id(
'budget_frm_starting_balance').get_attribute('value') == '100'
'budget_frm_starting_balance').get_attribute('value') == '2345.67'
assert selenium.find_element_by_id(
'budget_frm_starting_balance_group').is_displayed()
assert selenium.find_element_by_id(
'budget_frm_current_balance').get_attribute('value') == ''
assert selenium.find_element_by_id(
'budget_frm_current_balance_group').is_displayed() is False
assert selenium.find_element_by_id('budget_frm_active').is_selected()
assert selenium.find_element_by_id(
'budget_frm_active').is_selected() is False
assert selenium.find_element_by_id(
'budget_frm_income').is_selected() is False

Expand Down Expand Up @@ -536,7 +537,7 @@ def test_51_add_income_modal(self, base_url, selenium):
# test that updated budget was removed from the page
stable = selenium.find_element_by_id('table-periodic-budgets')
selems = self.tbody2elemlist(stable)
assert selems[1][1].get_attribute(
assert selems[-1][1].get_attribute(
'innerHTML') == '<a href="javascript:budgetModal(9, null)">' \
'NewIncome (9)</a> <em class="text-success">' \
'(income)</em>'
Expand Down
6 changes: 3 additions & 3 deletions biweeklybudget/tests/acceptance/flaskapp/views/test_ofx.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ def test_0_get_page(self, base_url, selenium):
self.baseurl = base_url
self.get(selenium, base_url + '/ofx')

def test_heading(self, selenium):
def test_1_heading(self, selenium):
heading = selenium.find_element_by_class_name('navbar-brand')
assert heading.text == 'OFX Transactions - BiweeklyBudget'

def test_nav_menu(self, selenium):
def test_2_nav_menu(self, selenium):
ul = selenium.find_element_by_id('side-menu')
assert ul is not None
assert 'nav' in ul.get_attribute('class')
assert ul.tag_name == 'ul'

def test_notifications(self, selenium):
def test_3_notifications(self, selenium):
div = selenium.find_element_by_id('notifications-row')
assert div is not None
assert div.get_attribute('class') == 'row'
Expand Down

0 comments on commit aff74ee

Please sign in to comment.