forked from AgileVentures/shf-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2bf19ed
commit 560b1ca
Showing
5 changed files
with
20 additions
and
8 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 |
---|---|---|
|
@@ -99,4 +99,5 @@ end | |
|
||
group :test do | ||
gem 'poltergeist' | ||
gem 'selenium-webdriver' | ||
end |
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 |
---|---|---|
|
@@ -42,30 +42,29 @@ Feature: Admin sets or enters the reason they are waiting for info from a user | |
And I am logged in as "[email protected]" | ||
|
||
|
||
@javascript | ||
@selenium | ||
Scenario: Admin selects 'need more documentation' as the reason SHF is waiting_for_applicant | ||
Given I am on "AnnaWaiting" application page | ||
When I set "member_app_waiting_reasons" to "need doc" | ||
And I am on the list applications page | ||
And I am on "AnnaWaiting" application page | ||
Then "member_app_waiting_reasons" should have "need doc" selected | ||
And I should not see t("admin_only.member_app_waiting_reasons.other_custom_reason") | ||
|
||
@javascript | ||
@selenium | ||
Scenario: Admin selects 'waiting for payment' as the reason SHF is waiting_for_applicant | ||
Given I am on "AnnaWaiting" application page | ||
When I set "member_app_waiting_reasons" to "waiting for payment" | ||
And I am on the list applications page | ||
And I am on "AnnaWaiting" application page | ||
And "member_app_waiting_reasons" should have "waiting for payment" selected | ||
And I should not see t("admin_only.member_app_waiting_reasons.other_custom_reason") | ||
|
||
|
||
@javascript | ||
@selenium | ||
Scenario: Admin selects 'other' and enters text as the reason SHF is waiting_for_applicant | ||
Given I am on "AnnaWaiting" application page | ||
When I set "member_app_waiting_reasons" to t("admin_only.member_app_waiting_reasons.other_custom_reason") | ||
And I fill in "custom_reason_text" with "This is my reason" | ||
And I press enter in "custom_reason_text" | ||
And I am on the list applications page | ||
And I am on "AnnaWaiting" application page | ||
#And item t("admin_only.member_app_waiting_reasons.other_custom_reason") should be visible | ||
|
@@ -74,23 +73,24 @@ Feature: Admin sets or enters the reason they are waiting for info from a user | |
And "member_app_waiting_reasons" should have t("admin_only.member_app_waiting_reasons.other_custom_reason") selected | ||
|
||
|
||
@javascript | ||
@selenium | ||
Scenario: Admin selects 'other' and fills in custom text but then changes reason to something else | ||
Given I am on "AnnaWaiting" application page | ||
When I set "member_app_waiting_reasons" to t("admin_only.member_app_waiting_reasons.other_custom_reason") | ||
And I fill in "custom_reason_text" with "This is my reason" | ||
And I press enter in "custom_reason_text" | ||
And I set "member_app_waiting_reasons" to "waiting for payment" | ||
And I am on the list applications page | ||
And I am on "AnnaWaiting" application page | ||
And "member_app_waiting_reasons" should have "waiting for payment" selected | ||
And I should not see t("admin_only.member_app_waiting_reasons.other_custom_reason") | ||
|
||
|
||
@javascript | ||
Scenario: When selected reason is not 'custom other,' the custom text is saved as blank (empty string) | ||
Given I am on "AnnaWaiting" application page | ||
When I set "member_app_waiting_reasons" to t("admin_only.member_app_waiting_reasons.other_custom_reason") | ||
And I fill in "custom_reason_text" with "This is my reason" | ||
And I press enter in "custom_reason_text" | ||
And I set "member_app_waiting_reasons" to "need doc" | ||
# change back so the custom reason field shows. it should be blank | ||
And I set "member_app_waiting_reasons" to t("admin_only.member_app_waiting_reasons.other_custom_reason") | ||
|
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