对于布局测试,我想知道最好的方法
基于链接Regression Testing for Styling and Layout of Web Apps,他们已经推荐了浏览器截图
我想知道你们中是否有人在你们的项目中使用过谷歌布局检测工具- http://code.google.com/p/fighting-layout-bugs/
请分享您对使用自动化验证布局问题的想法
谢谢,湿婆
发布于 2011-03-20 17:06:31
这是一个模糊而宽泛的问题,但我会尝试回答它:
是的,我用过这个。我的想法由Michael Tamm和Co.更好地表达了。我有几个视频,当我在大约五周前实现Fighting-Layout-Bugs时,它们对我很有帮助:
http://www.infoq.com/presentations/Fighting-Layout-Bugs
http://www.testingtv.com/2010/01/18/fighting-layout-bugs/
发布于 2015-06-23 20:48:00
您可以使用Galen框架来实现这一点,请参阅此处的介绍:http://holisticon.github.io/presentations/jsunconf_galen/#/
基本上,您可以在DSL中定义您的规格:
@ Overall layout | *
--------------------------
content
visible
navbar
visible
content
below: navbar 370 to 410 px
@ navigation hidden on mobile | mobile
--------------------------
navbar-item-*
absent
@ navigation shown on desktop | desktop
--------------------------
navbar-item-*
visible
@ Content should fit to screen size | mobile
--------------------------
content
width: 100% of screen/width
@ Content should fit to screen size | desktop
--------------------------
content
width: 80 to 90% of screen/width
您可以在这里找到更多示例代码:https://github.com/hypery2k/galen_samples
https://stackoverflow.com/questions/5367490
复制相似问题