使用 cucumber-jvm(或任何其他 BDD 工具),如何管理过去和现在文本的使用?
例如:
Given that I have logged in as "admin"
And I have navigated to the "editor" page
When I drag an "image component" to my page
Then I see it appear
这很好,但是在进一步的功能中,这成为了前兆:
Background:
Given that I have logged in as "admin"
And I am editing a page
And I have added an "image component" to my page
...
所以这些动作实际上是相同的,但是使用了两组域语言。如何管理这个?