def test_06_success(self, base_url, selenium):
self.baseurl = base_url
self.get(selenium, base_url + '/reconcile')
src = selenium.find_element_by_id('ofx-2-OFX3')
tgt = selenium.find_element_by_id(
'trans-3').find_element_by_class_name('reconcile-drop-target')
# drag and drop
chain = ActionChains(selenium)
chain.drag_and_drop(src, tgt).perform()
# ensure that the OFX div was hidden in the OFX column
src = selenium.find_element_by_id('ofx-2-OFX3')
assert src.is_displayed() is False
# ensure that the OFX div was placed in the drop target
tgt = selenium.find_element_by_id('trans-3')
expected = txn_div(
3,
date(2017, 4, 11),
600,
'BankTwo', 2,
'2Periodic', 2,
'trans2',
drop_div=ofx_div(
date(2017, 4, 9),
600.00,
'BankTwo', 2,
'Purchase',
'OFX3',
'ofx3-trans2-st1',
trans_id=3
)
)
assert self.normalize_html(tgt.get_attribute('outerHTML')) == expected
# ensure the reconciled variable was updated
assert self.get_reconciled(selenium) == {
3: [2, 'OFX3']
}
评论列表
文章目录