Cucumber 如何在特性和GUI细节中描述默认状态

Cucumber 如何在特性和GUI细节中描述默认状态,cucumber,acceptance-testing,gherkin,Cucumber,Acceptance Testing,Gherkin,我有一个按钮,可以在悬停时更改其标题。我有点不知所措,不知道如何用短语来测试默认状态下的功能 目前我正在使用 Scenario: show caption on hover Given I should not see an "Add Website" caption on the add new button When I hover over the add new button Then I should see an "Add Website" capti

我有一个按钮,可以在悬停时更改其标题。我有点不知所措,不知道如何用短语来测试默认状态下的功能

目前我正在使用

    Scenario: show caption on hover
    Given I should not see an "Add Website" caption on the add new button
    When I hover over the add new button
    Then I should see an "Add Website" caption on the add new button
但在给定的句子中断言默认状态感觉有点奇怪。我需要将其分为两种情况吗


我应该测试一下吗?如果没有,我如何测试这个GUI细节?

我将编写两个场景

Scenario: default caption when opening page
  When I open the XYZ page
  Then I should see the "My default" caption on the add new button

Scenario: change caption on hover
  Given I am on the XYZ page
  When I hover over the add new button
  Then I should see the "Add Website" caption on the add new button