Hi,

In the new ContentTranslation extension we have a progress bar, which is
updated using the CSS width property. I wanted to test that it has the
correct value, so I used something like
progress_bar_element.style("width").should == expected_width

Surprisingly, this didn't work: It seems to return the computed value in
px, rather than the specified CSS value in %.

For now I did this like this:
on(ContentTranslationPage).progress_bar_element.attribute("style").should
match(/width: #{width};/)

(See
https://gerrit.wikimedia.org/r/#/c/107357/4/tests/browser/features/step_definitions/special_content_translation_steps.rb)

Something tells me that there should be a better way. Can anybody think of
anything?

Thanks!

--
Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
http://aharoni.wordpress.com
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬
_______________________________________________
QA mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/qa

Reply via email to