2010-10-12 64 views
1
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

創建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" 
+0

感謝您的答覆。但是我們不能將2個特徵放入文件中。我不想將它分成2個文件。 – khanh 2010-10-12 07:32:14

+0

南,那麼你將不得不刪除背景,並使其在前兩個合格的情況下的一步。 – burtlo 2010-11-12 02:33:15

相關問題