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):
captions_start = captions.location
action.drag_and_drop_by_offset(captions, 0, -15).perform()
captions_end = captions.location
self.assertEqual(
captions_end.get('y') + 15,
captions_start.get('y'),
'Closed captions did not get dragged.'
)
# We have to branch here due to unexpected behaviour of chrome.
# Chrome sets the y offset of element to 834 instead of 650
if self.browser.name == 'chrome':
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')
......
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