refactor js and cucumber scenario for integrations page

This commit is contained in:
Reinier Balt 2010-11-10 16:52:05 +01:00
parent d1b35090ab
commit 05b3b7cebc
5 changed files with 37 additions and 52 deletions

View file

@ -9,6 +9,12 @@ Feature: Integrate Tracks in various ways
| login | password | is_admin |
| testuser | secret | false |
And I have logged in as "testuser" with password "secret"
And I have the following contexts:
| context |
| @pc |
| @home |
| @shops |
| @boss |
Scenario: I cannot see scripts when I do not have a context
Given I have no contexts
@ -21,18 +27,20 @@ Feature: Integrate Tracks in various ways
Then I should see scripts
@selenium
Scenario: When I select a different context the example scripts should change accoordingly
Given I have the following contexts:
| context |
| @pc |
| @home |
| @shops |
| @boss |
Scenario: The scripts on the page should be prefilled with the first context
When I go to the integrations page
Then I should see a script "applescript1" for "@pc"
When I select "@home" from "applescript1-contexts"
Then I should see a script "applescript1" for "@home"
When I select "@shops" from "applescript2-contexts"
Then I should see a script "applescript2" for "@shops"
When I select "@boss" from "quicksilver-contexts"
Then I should see a script "quicksilver" for "@boss"
@selenium
Scenario Outline: When I select a different context the example scripts should change accordingly
When I go to the integrations page
When I select "<context1>" from "<context-list>"
Then I should see a script "<script>" for "<context1>"
When I select "<context2>" from "<context-list>"
Then I should see a script "<script>" for "<context2>"
Examples:
| context1 | context2 | context-list | script |
| @home | @boss | applescript1-contexts | applescript1 |
| @shops | @home | applescript2-contexts | applescript2 |
| @boss | @shops | quicksilver-contexts | quicksilver |