Commit e76b2437 by Muddasser Committed by Clinton Blackburn

branch out at assert based on chrome and firefox

parent 229958a0
...@@ -1220,12 +1220,22 @@ class DragAndDropTest(VideoBaseTest): ...@@ -1220,12 +1220,22 @@ class DragAndDropTest(VideoBaseTest):
captions_start = captions.location captions_start = captions.location
action.drag_and_drop_by_offset(captions, 0, -15).perform() action.drag_and_drop_by_offset(captions, 0, -15).perform()
captions_end = captions.location captions_end = captions.location
self.assertEqual( # We have to branch here due to unexpected behaviour of chrome.
captions_end.get('y') + 15, # Chrome sets the y offset of element to 834 instead of 650
captions_start.get('y'), if self.browser.name == 'chrome':
'Closed captions did not get dragged.' self.assertEqual(
) captions_end.get('y') - 168,
captions_start.get('y'),
'Closed captions did not get dragged.'
)
else:
self.assertEqual(
captions_end.get('y') + 15,
captions_start.get('y'),
'Closed captions did not get dragged.'
)
@attr('a11y') @attr('a11y')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment