Используется фон для некоторых сценариев - PullRequest
1 голос
/ 12 октября 2010
    Feature: list video in stored

      Background:
       Given I have the following videos
          | title                              | format   |
          | Running Central Park in the Fall   | BluRay   |
          | Running Glacier Park in the Spring | Download |
          | Running Balboa Park in the Winter  | DVD      |

    Scenario: list videos in stored   
      When I am on the "video" page
      Then I should see "Running Central Park in the Fall"
      Then I should see "Running Glacier Park in the Spring"
      Then I should see "Running Balboa Park in the Winter"

   Scenario: Page links
     When I view all videos from page "1"
     Then I should not see "Cycling Utah in the Spring"
     Then I should not see "Touring Utah in the Spring"
     Then I should see "Previous"
     Then I should see "1"
     Then I should see "2"
     Then I should see "Next"

   Scenario: Show a message when there is no video
     When I am on the "video" page
     Then I should see "No videos"

Я хочу использовать фон для сценария: «список видео в сохраненных» и «ссылки на страницы», но сценарий исключения: «показывать сообщение, когда нет видео».Пожалуйста, поддержите меня.спасибо

1 Ответ

1 голос
/ 12 октября 2010

создать 2 объекта, один с фоном и сценарием, другой без фона

    Feature: list video in stored

      Background:
       Given I have the following videos
          | title                              | format   |
          | Running Central Park in the Fall   | BluRay   |
          | Running Glacier Park in the Spring | Download |
          | Running Balboa Park in the Winter  | DVD      |

    Scenario: list videos in stored   
      When I am on the "video" page
      Then I should see "Running Central Park in the Fall"
      Then I should see "Running Glacier Park in the Spring"
      Then I should see "Running Balboa Park in the Winter"

   Scenario: Page links
     When I view all videos from page "1"
     Then I should not see "Cycling Utah in the Spring"
     Then I should not see "Touring Utah in the Spring"
     Then I should see "Previous"
     Then I should see "1"
     Then I should see "2"
     Then I should see "Next"

Feature: list video in stored without video
   Scenario: Show a message when there is no video
     When I am on the "video" page
     Then I should see "No videos"
...