【发布时间】:2020-10-31 12:43:28
【问题描述】:
功能:作为用户,我希望能够更改熊猫的周年纪念日
我们的应用有两个版本:桌面版/移动版
在桌面上,我们必须转到熊猫的详细信息页面 -> 我们单击更改周年日期按钮 -> 弹出我们可以输入新日期的位置,我们验证并完成。它给出了这种情况:
Given the user is in the detail page of a panda
and the user is logged
When the user update the anniversary date of the panda
Then the anniversary date is updated
在移动设备上,我们必须选择菜单更改周年日期 -> 输入熊猫名称的新页面 -> 我们被发送到输入新周年日期的新页面。我们验证并完成。它给出了这种情况:
Given the user is in the Change Anniversary mode
And a panda is selected
And the user is logged
When the user update the anniversary date
Then the anniversary date is updated.
如果我发现很容易为桌面编写场景,而对于移动设备,我可能无法选择不存在的熊猫。这种行为不能在桌面上存在,因为我们有一个熊猫列表,我们必须单击一个才能转到详细信息页面。取而代之的是,在移动设备上我们必须输入熊猫的名字,所以我们可能输入一个不存在的名字。我目前有这种情况,但我不喜欢它:
Given the user is in the Change Anniversary mode
And the user is logged
When the user enter a non existing panda name
Then an error message is shown
&
Given the user is in the Change Anniversary mode
And the user is logged
When the user enter an existing panda name
Then the panda is selected
我被阻止了,因为提供的新功能在两台设备上都是相同的。我是否需要使我的行为/场景在桌面和移动设备之间匹配,或者我的行为/场景根据平台而有所不同是否可以?如果我选择第二个选项我如何精确平台:在标题场景中还是在给定?我已经写过的所有其他场景呢?我希望有人已经找到了解决这个问题的方法:p
感谢您的帮助!
编辑:我添加了标题功能和我目前拥有的一些场景:)
【问题讨论】:
-
您能否在您的问题中添加一些场景,以便我们了解您的意思?我分为编写不同的场景或改写您的步骤,以便它们适用于每个平台。我们没有足够的信息来回答您的问题。
-
我添加了功能标题和我的一些场景,谢谢!