2010-10-12 4 views
1

Je souhaite utiliser l'arrière-plan du scénario: "Lister les vidéos en mémoire" et "Liens de page", mais exclusion Scénario: "Afficher un message lorsqu'il n'y a pas de vidéo". S'il vous plaît, soutenez-moi grâceUtilisation de l'arrière-plan pour un scénario

Répondre

1

créer 2 fonctions avec un arrière-plan et le scénario, l'autre sans fond

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

Merci pour votre réponse. mais nous ne pouvons pas mettre 2 Feature dans un fichier. Je ne veux pas le diviser en 2 fichiers. – khanh

+0

Nam, alors vous allez devoir supprimer le fond et faire un pas dans les deux premiers scénarios de qualification. – burtlo