This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: Updated tests to use Background and better Given/When/Then/And…
… values.
- Loading branch information
Sam Minnee
committed
Jul 29, 2010
1 parent
f13d912
commit dc0a0a9
Showing
9 changed files
with
50 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
Feature: Salad self-tests for ajax | ||
|
||
Scenario: Perform ajax testing | ||
Background: | ||
Given I visit tests/form-fields.html | ||
And I click "ajax3" | ||
|
||
Scenario: Perform ajax testing | ||
When I click "ajax3" | ||
And I click the "ID_AjaxButton1" button | ||
Then I see "This was retrieved via AJAX." | ||
|
||
Given I click the "ajax3" button | ||
When I click the "ajax3" button | ||
Then I don't see "This was retrieved via AJAX." | ||
|
||
Given I click the "Short delay" button | ||
When I click the "Short delay" button | ||
Then I see "This was retrieved via AJAX." | ||
|
||
Given I click the "Clear field" button | ||
When I click the "Clear field" button | ||
Then I don't see "This was retrieved via AJAX." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
Feature: Salad self-tests for form fields | ||
|
||
Scenario: Identify, and select checkboxes | ||
Background: | ||
Given I visit tests/form-fields.html | ||
And I click the "ID_CheckboxA" checkbox | ||
|
||
Scenario: Identify, and select checkboxes | ||
When I click the "ID_CheckboxA" checkbox | ||
Then the checkbox "Item one" is checked | ||
And I click the "Item one" checkbox | ||
|
||
When I click the "Item one" checkbox | ||
Then the checkbox "Item 1" is not checked | ||
And the checkbox "Item 2" is not checked | ||
And the checkbox "CheckboxC" is not checked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Feature: Salad self-tests for pages | ||
|
||
Scenario: Visit URLs and make sure we got there | ||
Given I visit tests/form-fields.html | ||
When I visit tests/form-fields.html | ||
Then I am sent to tests/form-fields.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
Feature: Check that popup confirmation is handled correctly | ||
I want to be able to check that the system responds correctly to popup confirmation windows | ||
|
||
Scenario: The user cancels popup windows for one button | ||
Background: | ||
Given I visit tests/form-fields.html | ||
And I cancel popups | ||
And I click the "Confirm one" button | ||
|
||
Scenario: The user cancels popup windows for one button | ||
Given I cancel popups | ||
When I click the "Confirm one" button | ||
Then I see "No was clicked for PopupButton1" | ||
|
||
Scenario: The user accepts popup windows for the other button | ||
Given I confirm popups | ||
And I click the "ID_PopupButton2" button | ||
When I click the "ID_PopupButton2" button | ||
Then I see "Yes was clicked for PopupButton2" | ||
|
||
Scenario: The user enters text for prompts | ||
Given I put "Test" in the popup | ||
When I put "Test" in the popup | ||
And I click the "Enter text" button | ||
Then I see "You entered: Test" | ||
|
||
Given I cancel popups | ||
And I click the "ID_PopupButton3" button | ||
When I click the "ID_PopupButton3" button | ||
Then I see "PopupButton3 was cancelled" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
Feature: Salad self-tests for form fields | ||
|
||
Scenario: Identify, and select radio buttons | ||
Background: | ||
Given I visit tests/form-fields.html | ||
And I click the "ID_RadioA" radio button | ||
|
||
Scenario: Identify, and select radio buttons | ||
When I click the "ID_RadioA" radio button | ||
Then "Option 1" is selected | ||
And I click the "two" radio button | ||
|
||
When I click the "two" radio button | ||
Then "ID_RadioB" is selected | ||
And I click the "Different option" radio button | ||
|
||
When I click the "Different option" radio button | ||
Then "radiogroup2" is selected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
Feature: Salad self-tests for popup windows. | ||
|
||
Scenario: Test basic links | ||
Background: | ||
Given I visit tests/form-fields.html | ||
And I click the "SilverStripe.org" link | ||
|
||
Scenario: Test basic links | ||
When I click the "SilverStripe.org" link | ||
Then I am at http://silverstripe.org | ||
And I see "A CMS for website editors" | ||
|
||
Scenario: Test links with the target "_blank" | ||
Given I visit tests/form-fields.html | ||
And I click the "New Window" link | ||
When I click the "New Window" link | ||
And I look in the window "New Window Test" | ||
And I am at tests/new-window.html | ||
Then I am at tests/new-window.html | ||
And I see "This is a new window." | ||
|
||
Scenario: Test links which use window.open | ||
Given I visit tests/form-fields.html | ||
And I click the "Google" link | ||
When I click the "Google" link | ||
And I look in the window "Google" | ||
Then I am at http://www.google.co.nz | ||
|