我可以为 FitNesse 测试表单元格添加颜色吗?

发布于 2024-07-15 05:55:48 字数 86 浏览 3 评论 0原文

我希望能够向 FitNesse 表格单元格(有时是整行)添加彩色背景,以增强其可读性。 如果运行测试页时这些颜色被覆盖,我很高兴。 有没有办法做到这一点?

I would like to be able to add coloured backgrounds to FitNesse table cells (sometimes entire rows) to enhance their readability. I'm happy if these colours are overwritten when a test page is run. Is there a way to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羁拥 2024-07-22 05:55:48

小部件将自定义样式应用到任何fitnesse 单元格

您可以使用!style_(text)

。 其中 (text) 是您定义的某个 css 类的名称。 您可以在 格式化健身 wiki 页面查看各种选项http://www.fitnesse.org" rel="nofollow noreferrer">fitnesse.org

编辑:看起来样式小部件仅适用于格式化文本,而不是固定表中的文本。 例如:

!|Store Data Dictionary Table|VALUE_SET_VALUE|
|!style_strike(ValueSetID)|Code|Label|
|MCODESET|1|RESPONSE1|
|MCODESET|2|RESPONSE2|
|MCODESET|3|RESPONSE3|
|MCODESET|4|RESPONSE4|

不将ValueSetId的样式设置为strike class。 但删除 ! 从表格本身,这样确实有效:

|Store Data Dictionary Table|VALUE_SET_VALUE|
|!style_strike(ValueSetID)|Code|Label|
|MCODESET|1|RESPONSE1|
|MCODESET|2|RESPONSE2|
|MCODESET|3|RESPONSE3|
|MCODESET|4|RESPONSE4|

您也可以尝试直接应用样式,如下所示:

!|Store Data Dictionary Table|VALUE_SET_VALUE|
|!-<span class="strike">ValueSetID</span>-!|Code|Label|
|MCODESET|1|RESPONSE1|
|MCODESET|2|RESPONSE2|
|MCODESET|3|RESPONSE3|
|MCODESET|4|RESPONSE4|

这使用输出 HTML 标签的小部件。 我尝试将其应用到行,但它不起作用:(您可能必须标记每个单独的元素。

You can apply custom styles to any fitnesse cell by using the

!style_(text)

widgit. Where (text) is the name of some css class you have defined. You can see the various options for formatting the fitnesse wiki pages at fitnesse.org

EDIT : It looks as though the style widgit is only useful for formatting text not in a fixture table. For example:

!|Store Data Dictionary Table|VALUE_SET_VALUE|
|!style_strike(ValueSetID)|Code|Label|
|MCODESET|1|RESPONSE1|
|MCODESET|2|RESPONSE2|
|MCODESET|3|RESPONSE3|
|MCODESET|4|RESPONSE4|

does not set the style of ValueSetId to the strike class. But removing the ! from the table itself like so does work:

|Store Data Dictionary Table|VALUE_SET_VALUE|
|!style_strike(ValueSetID)|Code|Label|
|MCODESET|1|RESPONSE1|
|MCODESET|2|RESPONSE2|
|MCODESET|3|RESPONSE3|
|MCODESET|4|RESPONSE4|

You could also try applying the style directly like so:

!|Store Data Dictionary Table|VALUE_SET_VALUE|
|!-<span class="strike">ValueSetID</span>-!|Code|Label|
|MCODESET|1|RESPONSE1|
|MCODESET|2|RESPONSE2|
|MCODESET|3|RESPONSE3|
|MCODESET|4|RESPONSE4|

This uses the widgit that outputs the HTML tags. I tried applying it to the row but it did not work though :( You might have to tag each individual element.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文