Commit 72dd8011a739356ee66d90a0bb3adcb865495464
1 parent
13e073e4
Exists in
master
and in
4 other branches
rewrite issues search test to prevent ajax requests running after test
Showing
2 changed files
with
15 additions
and
18 deletions
Show diff stats
features/project/issues/issues.feature
| ... | ... | @@ -3,7 +3,7 @@ Feature: Project Issues |
| 3 | 3 | Given I sign in as a user |
| 4 | 4 | And I own project "Shop" |
| 5 | 5 | And project "Shop" have "Release 0.4" open issue |
| 6 | - And project "Shop" have "Tweet feature" open issue | |
| 6 | + And project "Shop" have "Tweet control" open issue | |
| 7 | 7 | And project "Shop" have "Release 0.3" closed issue |
| 8 | 8 | And I visit project "Shop" issues page |
| 9 | 9 | |
| ... | ... | @@ -38,20 +38,20 @@ Feature: Project Issues |
| 38 | 38 | |
| 39 | 39 | @javascript |
| 40 | 40 | Scenario: I search issue |
| 41 | - Given I fill in issue search with "Release" | |
| 41 | + Given I fill in issue search with "Re" | |
| 42 | 42 | Then I should see "Release 0.4" in issues |
| 43 | 43 | And I should not see "Release 0.3" in issues |
| 44 | - And I should not see "Tweet feature" in issues | |
| 44 | + And I should not see "Tweet control" in issues | |
| 45 | 45 | |
| 46 | 46 | @javascript |
| 47 | 47 | Scenario: I search issue that not exist |
| 48 | - Given I fill in issue search with "Bug" | |
| 48 | + Given I fill in issue search with "Bu" | |
| 49 | 49 | Then I should not see "Release 0.4" in issues |
| 50 | 50 | And I should not see "Release 0.3" in issues |
| 51 | 51 | |
| 52 | 52 | @javascript |
| 53 | 53 | Scenario: I search all issues |
| 54 | 54 | Given I click link "All" |
| 55 | - And I fill in issue search with "0.3" | |
| 55 | + And I fill in issue search with ".3" | |
| 56 | 56 | Then I should see "Release 0.3" in issues |
| 57 | 57 | And I should not see "Release 0.4" in issues | ... | ... |
features/steps/project/project_issues.rb
| ... | ... | @@ -12,8 +12,8 @@ class ProjectIssues < Spinach::FeatureSteps |
| 12 | 12 | page.should_not have_content "Release 0.3" |
| 13 | 13 | end |
| 14 | 14 | |
| 15 | - And 'I should not see "Tweet feature" in issues' do | |
| 16 | - page.should_not have_content "Tweet feature" | |
| 15 | + And 'I should not see "Tweet control" in issues' do | |
| 16 | + page.should_not have_content "Tweet control" | |
| 17 | 17 | end |
| 18 | 18 | |
| 19 | 19 | Given 'I click link "Closed"' do |
| ... | ... | @@ -60,19 +60,16 @@ class ProjectIssues < Spinach::FeatureSteps |
| 60 | 60 | page.should have_content issue.project.name |
| 61 | 61 | end |
| 62 | 62 | |
| 63 | - Given 'I fill in issue search with "Release"' do | |
| 64 | - fill_in 'issue_search', with: "Release" | |
| 65 | - sleep 0.05 | |
| 63 | + Given 'I fill in issue search with "Re"' do | |
| 64 | + fill_in 'issue_search', with: "Re" | |
| 66 | 65 | end |
| 67 | 66 | |
| 68 | - Given 'I fill in issue search with "Bug"' do | |
| 69 | - fill_in 'issue_search', with: "Bug" | |
| 70 | - sleep 0.05 | |
| 67 | + Given 'I fill in issue search with "Bu"' do | |
| 68 | + fill_in 'issue_search', with: "Bu" | |
| 71 | 69 | end |
| 72 | 70 | |
| 73 | - And 'I fill in issue search with "0.3"' do | |
| 74 | - fill_in 'issue_search', with: "0.3" | |
| 75 | - sleep 0.05 | |
| 71 | + And 'I fill in issue search with ".3"' do | |
| 72 | + fill_in 'issue_search', with: ".3" | |
| 76 | 73 | end |
| 77 | 74 | |
| 78 | 75 | And 'I fill in issue search with "Something"' do |
| ... | ... | @@ -127,10 +124,10 @@ class ProjectIssues < Spinach::FeatureSteps |
| 127 | 124 | author: project.users.first) |
| 128 | 125 | end |
| 129 | 126 | |
| 130 | - And 'project "Shop" have "Tweet feature" open issue' do | |
| 127 | + And 'project "Shop" have "Tweet control" open issue' do | |
| 131 | 128 | project = Project.find_by_name("Shop") |
| 132 | 129 | create(:issue, |
| 133 | - title: "Tweet feature", | |
| 130 | + title: "Tweet control", | |
| 134 | 131 | project: project, |
| 135 | 132 | author: project.users.first) |
| 136 | 133 | end | ... | ... |