偏好面板优化与表格按钮实现
1. 偏好面板的改进
1.1 让行删除更便捷
在之前的操作中,删除选中行时总会出现一些奇怪的现象,比如删除选中行后,总是第一行被选中,这并非我们想要删除的下一行。在当前版本中,情况变得更奇怪,删除选中行后会出现多个选中行。
为了解决这些问题,我们需要编写测试来规范行删除的行为:
context "removing a row"
should "remove the currently selected row from the table"
should "remove the currently selected row from the preferences"
should "do nothing if no row is selected"
should "remove multiple preferences if multiple rows selected"
should_eventually "select the next row, if there is one"
should_eventually "even select the next row if given a selected range"
should_eventually "even select next row if given a disjoint set"
should_eventually "select the last table row, if there is no next row"
should_eventually "even
超级会员免费看
订阅专栏 解锁全文
56

被折叠的 条评论
为什么被折叠?



