wally 0.0.33 → 0.0.34
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -3
- data/Rakefile +4 -0
- data/features/counts.feature +10 -3
- data/features/feature_page.feature +17 -9
- data/features/list_tags.feature +5 -5
- data/features/notifications.feature +1 -1
- data/features/progress_bar.feature +25 -0
- data/features/{home_page.feature → project_home.feature} +3 -16
- data/features/projects.feature +12 -0
- data/features/push_features.feature +4 -4
- data/features/scenario_page.feature +4 -27
- data/features/search_features.feature +7 -7
- data/features/step_definitions/feature_page_steps.rb +15 -0
- data/features/step_definitions/notifications_steps.rb +1 -1
- data/features/step_definitions/project_home_steps.rb +10 -0
- data/features/step_definitions/projects_steps.rb +11 -0
- data/features/step_definitions/push_features_steps.rb +10 -6
- data/features/step_definitions/scenario_page_steps.rb +15 -0
- data/features/step_definitions/search_features_steps.rb +1 -1
- data/features/step_definitions/steps.rb +15 -3
- data/features/step_definitions/welcome_page.rb +19 -0
- data/features/support/env.rb +28 -6
- data/features/welcome_page.feature +30 -0
- data/lib/wally.rb +0 -3
- data/lib/wally/application.rb +39 -22
- data/lib/wally/counts_tags.rb +3 -3
- data/lib/wally/feature.rb +1 -1
- data/lib/wally/project.rb +8 -0
- data/lib/wally/public/scripts/projects.js +6 -0
- data/lib/wally/public/skin.css +7 -0
- data/lib/wally/search_features.rb +1 -1
- data/lib/wally/version.rb +1 -1
- data/lib/wally/views/feature_link.haml +1 -1
- data/lib/wally/views/layout.haml +32 -21
- data/lib/wally/views/{index.haml → project.haml} +0 -0
- data/lib/wally/views/search.haml +3 -3
- data/spec/spec_helper.rb +24 -0
- data/spec/wally/counts_tags_spec.rb +10 -22
- data/spec/wally/feature_spec.rb +12 -15
- data/spec/wally/project_spec.rb +18 -0
- data/spec/wally/search_features_spec.rb +18 -25
- data/wally.gemspec +1 -0
- metadata +58 -29
- data/features/step_definitions/browse_features_steps.rb +0 -47
data/README.md
CHANGED
@@ -19,12 +19,14 @@ Many of the ideas have been borrowed from Matt Wynne's Relish product, but we;
|
|
19
19
|
* Include a project progress bar (based on tags)
|
20
20
|
|
21
21
|
### Installation
|
22
|
-
* Install [mongodb](http://www.mongodb.org/display/DOCS/Quickstart "mongodb") and ensure it is running
|
23
|
-
* gem install wally
|
22
|
+
* Install [mongodb](http://www.mongodb.org/display/DOCS/Quickstart "mongodb") and ensure it is running (e.g. '~ $ ./mongodb-xxxxx-xxxx-x.x.x/bin/mongod')
|
23
|
+
* gem install wally
|
24
|
+
|
25
|
+
### Usage
|
24
26
|
* wally server
|
25
27
|
* http://localhost:4567/
|
26
28
|
* create a '.wally' file and enter any authentication text you like
|
27
|
-
* wally push http://localhost:4567/
|
29
|
+
* wally push http://localhost:4567/projects/project-name feature-dir
|
28
30
|
|
29
31
|
|
30
32
|
## Wally?
|
data/Rakefile
CHANGED
data/features/counts.feature
CHANGED
@@ -3,16 +3,23 @@ Feature: Counts
|
|
3
3
|
As a stakeholder
|
4
4
|
I want a visual indication of the number of tags, scenarios and features
|
5
5
|
|
6
|
-
|
6
|
+
Background:
|
7
7
|
Given a feature file named "sample.feature" with the contents:
|
8
8
|
"""
|
9
9
|
@tag1
|
10
10
|
Feature: Tag Feature
|
11
|
+
|
11
12
|
@tag2 @multiple
|
12
13
|
Scenario: Tag Foo 1
|
14
|
+
|
13
15
|
@tag3 @multiple
|
14
16
|
Scenario: Tag Bar 2
|
15
17
|
"""
|
16
|
-
|
18
|
+
|
19
|
+
Scenario: Features
|
20
|
+
When I visit the project page
|
17
21
|
Then I should see "Features (1)"
|
18
|
-
|
22
|
+
|
23
|
+
Scenario: Tags
|
24
|
+
When I visit the project page
|
25
|
+
Then I should see "Tags (5)"
|
@@ -1,10 +1,9 @@
|
|
1
1
|
Feature: Feature Page
|
2
2
|
In order to view a feature and its intent
|
3
3
|
As a stakeholder
|
4
|
-
I want a page that displays the feature's name,
|
5
|
-
free-form narrative and scenario titles
|
4
|
+
I want a page that displays the feature's name, free-form narrative and scenario titles
|
6
5
|
|
7
|
-
Scenario:
|
6
|
+
Scenario: Content
|
8
7
|
Given a feature file named "sample.feature" with the contents:
|
9
8
|
"""
|
10
9
|
Feature: Sample Feature
|
@@ -15,7 +14,16 @@ Feature: Feature Page
|
|
15
14
|
When I visit the sample feature page
|
16
15
|
Then I should see the feature free-form narrative
|
17
16
|
|
18
|
-
|
17
|
+
Scenario: Tags
|
18
|
+
Given a feature file named "sample.feature" with the contents:
|
19
|
+
"""
|
20
|
+
@sample_tag
|
21
|
+
Feature: Sample Feature
|
22
|
+
"""
|
23
|
+
When I visit the sample feature page
|
24
|
+
Then I should see "sample_tag"
|
25
|
+
|
26
|
+
Scenario: Scenario Links
|
19
27
|
Given a feature file named "sample.feature" with the contents:
|
20
28
|
"""
|
21
29
|
Feature: Sample Feature
|
@@ -35,7 +43,7 @@ Feature: Feature Page
|
|
35
43
|
"""
|
36
44
|
When I visit the sample feature page
|
37
45
|
Then I should see Scenario headers as links
|
38
|
-
|
46
|
+
|
39
47
|
Scenario: Sort Scenario Links in Alphabetical Order
|
40
48
|
Given a feature file named "sample.feature" with the contents:
|
41
49
|
"""
|
@@ -44,18 +52,18 @@ Feature: Feature Page
|
|
44
52
|
Scenario: C
|
45
53
|
Scenario: I
|
46
54
|
Scenario: N
|
47
|
-
|
55
|
+
"""
|
48
56
|
When I visit the sample feature page
|
49
|
-
|
57
|
+
Then the scenario links are sorted
|
50
58
|
|
51
|
-
Scenario:
|
59
|
+
Scenario: Scenario Tags
|
52
60
|
Given a feature file named "sample.feature" with the contents:
|
53
61
|
"""
|
54
62
|
Feature: Sample Feature
|
55
63
|
|
56
64
|
@tag1 @tag2
|
57
65
|
Scenario: Sample Aidy
|
58
|
-
|
66
|
+
"""
|
59
67
|
When I visit the sample feature page
|
60
68
|
Then I should see "tag1"
|
61
69
|
And I should see "tag2"
|
data/features/list_tags.feature
CHANGED
@@ -13,8 +13,8 @@ Feature: List Tags
|
|
13
13
|
@tag3 @multiple
|
14
14
|
Scenario: Tag Scenario 2
|
15
15
|
"""
|
16
|
-
When I visit the
|
17
|
-
Then I should see a link to "@tag1 (1)" with the url "/search?q=@tag1"
|
18
|
-
And I should see a link to "@tag2 (1)" with the url "/search?q=@tag2"
|
19
|
-
And I should see a link to "@tag3 (1)" with the url "/search?q=@tag3"
|
20
|
-
And I should see a link to "@multiple (2)" with the url "/search?q=@multiple"
|
16
|
+
When I visit the project page
|
17
|
+
Then I should see a link to "@tag1 (1)" with the url "/projects/project/search?q=@tag1"
|
18
|
+
And I should see a link to "@tag2 (1)" with the url "/projects/project/search?q=@tag2"
|
19
|
+
And I should see a link to "@tag3 (1)" with the url "/projects/project/search?q=@tag3"
|
20
|
+
And I should see a link to "@multiple (2)" with the url "/projects/project/search?q=@multiple"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Feature: Progress Bar
|
2
|
+
In order to see the state of the project
|
3
|
+
As a stakeholder
|
4
|
+
I want a visual representation of counted tags
|
5
|
+
|
6
|
+
Scenario: Progress Bar
|
7
|
+
Given a feature file on the project "project_name" with the contents:
|
8
|
+
"""
|
9
|
+
Feature: Mixed
|
10
|
+
|
11
|
+
@wip
|
12
|
+
Scenario: WiP
|
13
|
+
|
14
|
+
@notstarted
|
15
|
+
Scenario: Not Started
|
16
|
+
"""
|
17
|
+
When I visit the project page for "project_name"
|
18
|
+
And I select "Progress"
|
19
|
+
Then I should see "This project has 2 scenarios"
|
20
|
+
And I should see "@wip (50%)"
|
21
|
+
And I should see "@notstarted (50%)"
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
@@ -1,9 +1,8 @@
|
|
1
|
-
Feature: Home Page
|
1
|
+
Feature: Project Home Page
|
2
2
|
In order to simply view a project's complete story set
|
3
3
|
As a stakeholder
|
4
|
-
I want a home page that displays all features
|
4
|
+
I want a home page that displays all features
|
5
5
|
|
6
|
-
|
7
6
|
Scenario: Links to features in alphabetical order
|
8
7
|
Given a feature file named "kate_moss.feature" with the contents:
|
9
8
|
"""
|
@@ -21,18 +20,6 @@ Feature: Home Page
|
|
21
20
|
"""
|
22
21
|
Feature: Elle Macpherson
|
23
22
|
"""
|
24
|
-
When I visit the
|
23
|
+
When I visit the project page
|
25
24
|
Then I should see a link to my sample features
|
26
25
|
And the features are ordered alphabetically
|
27
|
-
|
28
|
-
Scenario: Display feature tags
|
29
|
-
Given a feature file named "sample.feature" with the contents:
|
30
|
-
"""
|
31
|
-
@sample_tag
|
32
|
-
Feature: Sample Feature
|
33
|
-
"""
|
34
|
-
When I visit the sample feature page
|
35
|
-
Then I should see "sample_tag"
|
36
|
-
|
37
|
-
|
38
|
-
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: Projects
|
2
|
+
In order to allow multiple projects
|
3
|
+
As a user
|
4
|
+
I want to be able to switch between projects
|
5
|
+
|
6
|
+
Scenario: Single project
|
7
|
+
Given a feature file on the project "project_name" with the contents:
|
8
|
+
"""
|
9
|
+
Feature: Projects
|
10
|
+
"""
|
11
|
+
And I visit the project page for "project_name"
|
12
|
+
Then I should see a link to the feature "Projects"
|
@@ -5,16 +5,16 @@ Feature: Push Features To Server
|
|
5
5
|
|
6
6
|
Scenario: Push features without authentication
|
7
7
|
Given I don't have a .wally authorisation file
|
8
|
-
When I put data to /features with the authentication code
|
8
|
+
When I put data to /my_project_name/features with the authentication code
|
9
9
|
Then I should get a 403 http status
|
10
10
|
|
11
11
|
Scenario: Push features with authentication
|
12
12
|
Given I have a .wally authentication file
|
13
|
-
When I put data to /features with the authentication code
|
13
|
+
When I put data to /my_project_name/features with the authentication code
|
14
14
|
Then I should get a 201 http status
|
15
15
|
|
16
16
|
Scenario: Pushed features show up on home page
|
17
17
|
Given I have a .wally authentication file
|
18
|
-
When I put data to /features with the authentication code
|
19
|
-
And I visit
|
18
|
+
When I put data to /my_project_name/features with the authentication code
|
19
|
+
And I visit "my_project_name" page
|
20
20
|
Then I should see the uploaded feature
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Feature: Scenario Page
|
2
2
|
In order to view a scenario's intent
|
3
|
-
As a stakeholder
|
3
|
+
As a stakeholder
|
4
4
|
I want a page that displays each scenario and its steps
|
5
5
|
|
6
|
-
Scenario:
|
6
|
+
Scenario: Content
|
7
7
|
Given a feature file named "sample.feature" with the contents:
|
8
8
|
"""
|
9
9
|
Feature: Sample Feature
|
@@ -20,8 +20,7 @@ Feature: Scenario Page
|
|
20
20
|
And I should see "tag1"
|
21
21
|
And I should see "tag2"
|
22
22
|
|
23
|
-
|
24
|
-
Scenario: View Scenario Background
|
23
|
+
Scenario: Background
|
25
24
|
Given a feature file named "sample.feature" with the contents:
|
26
25
|
"""
|
27
26
|
Feature: Sample Feature
|
@@ -35,7 +34,7 @@ Feature: Scenario Page
|
|
35
34
|
And click on a scenario header link
|
36
35
|
Then the background is visible
|
37
36
|
|
38
|
-
Scenario:
|
37
|
+
Scenario: Tags
|
39
38
|
Given a feature file named "sample.feature" with the contents:
|
40
39
|
"""
|
41
40
|
Feature: Sample Feature
|
@@ -49,25 +48,3 @@ Feature: Scenario Page
|
|
49
48
|
When I visit the sample feature page
|
50
49
|
And click on a scenario header link
|
51
50
|
Then I should see "work_in_progress"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
@@ -15,9 +15,9 @@ Feature: Search features
|
|
15
15
|
|
16
16
|
Examples:
|
17
17
|
| query | feature name | url |
|
18
|
-
| Sample | Sample Feature |/features/sample-feature |
|
19
|
-
| sAmPlE | Sample Feature |/features/sample-feature |
|
20
|
-
| @QA | Sample Feature |/features/sample-feature |
|
18
|
+
| Sample | Sample Feature |/projects/project/features/sample-feature |
|
19
|
+
| sAmPlE | Sample Feature |/projects/project/features/sample-feature |
|
20
|
+
| @QA | Sample Feature |/projects/project/features/sample-feature |
|
21
21
|
|
22
22
|
Scenario: Search feature narrative
|
23
23
|
Given a feature file named "sample.feature" with the contents:
|
@@ -29,7 +29,7 @@ Feature: Search features
|
|
29
29
|
"""
|
30
30
|
And I am on the search page
|
31
31
|
When I search for "donkey"
|
32
|
-
Then I should see a search result link to "Sample Feature" with the url "/features/sample-feature"
|
32
|
+
Then I should see a search result link to "Sample Feature" with the url "/projects/project/features/sample-feature"
|
33
33
|
|
34
34
|
Scenario: Search scenario name
|
35
35
|
Given a feature file named "sample.feature" with the contents:
|
@@ -39,7 +39,7 @@ Feature: Search features
|
|
39
39
|
"""
|
40
40
|
And I am on the search page
|
41
41
|
When I search for "Sample Scenario"
|
42
|
-
Then I should see a search result link to "Sample Scenario" with the url "/features/sample-feature/scenario/sample-scenario"
|
42
|
+
Then I should see a search result link to "Sample Scenario" with the url "/projects/project/features/sample-feature/scenario/sample-scenario"
|
43
43
|
|
44
44
|
Scenario: Search scenario steps
|
45
45
|
Given a feature file named "sample.feature" with the contents:
|
@@ -50,7 +50,7 @@ Feature: Search features
|
|
50
50
|
"""
|
51
51
|
And I am on the search page
|
52
52
|
When I search for "I do something"
|
53
|
-
Then I should see a search result link to "Sample Scenario" with the url "/features/sample-feature/scenario/sample-scenario"
|
53
|
+
Then I should see a search result link to "Sample Scenario" with the url "/projects/project/features/sample-feature/scenario/sample-scenario"
|
54
54
|
|
55
55
|
Scenario: Search suggests other searches
|
56
56
|
Given a feature file named "sample.feature" with the contents:
|
@@ -60,7 +60,7 @@ Feature: Search features
|
|
60
60
|
And I am on the search page
|
61
61
|
When I search for "btman"
|
62
62
|
Then I should see "Did you mean"
|
63
|
-
And I should see a search result link to "Batman" with the url "/search?q=Batman"
|
63
|
+
And I should see a search result link to "Batman" with the url "/projects/project/search?q=Batman"
|
64
64
|
|
65
65
|
Scenario: Search displays tags
|
66
66
|
Given a feature file named "sample.feature" with the contents:
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Then /^I should see the feature free\-form narrative$/ do
|
2
|
+
page.should have_content "In order to get some value"
|
3
|
+
page.should have_content "As a person"
|
4
|
+
page.should have_content "I want to create value"
|
5
|
+
end
|
6
|
+
|
7
|
+
Then /^I should see Scenario headers as links$/ do
|
8
|
+
page.body.should have_content "Scenarios"
|
9
|
+
page.should have_link "Sample Aidy", :href => "/projects/project/features/sample-feature/scenario/sample-aidy"
|
10
|
+
page.should have_link "Sample Andrew", :href => "/projects/project/features/sample-feature/scenario/sample-andrew"
|
11
|
+
end
|
12
|
+
|
13
|
+
Then /^the scenario links are sorted$/ do
|
14
|
+
page.body.should =~ /C.*I.*N.*V/m
|
15
|
+
end
|
@@ -3,7 +3,7 @@ Given /^a feature file with (\d+) @wip tags$/ do |wip_tag_count|
|
|
3
3
|
1.upto(wip_tag_count.to_i) do |number|
|
4
4
|
contents += "@wip\nScenario: Scenario #{number}\n"
|
5
5
|
end
|
6
|
-
create_feature("sample1.feature", contents)
|
6
|
+
create_feature("project", "sample1.feature", contents)
|
7
7
|
end
|
8
8
|
|
9
9
|
Then /^I should see a notification that says "([^"]*)"$/ do |text|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Then /^I should see a link to my sample features$/ do
|
2
|
+
page.should have_link "Kate Moss", :href => "/project/features/kate-moss"
|
3
|
+
page.should have_link "Katie Price", :href => "/project/features/katie-price"
|
4
|
+
page.should have_link "Jessica-Jane Clement", :href => "/project/features/jessica-jane-clement"
|
5
|
+
page.should have_link "Elle Macpherson", :href => "/project/features/elle-macpherson"
|
6
|
+
end
|
7
|
+
|
8
|
+
Then /^the features are ordered alphabetically$/ do
|
9
|
+
page.body.should =~ /Elle Macpherson.*Jessica-Jane Clement.*Kate Moss.*Katie Price/m
|
10
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Given /^a feature file on the project "([^"]*)" with the contents:$/ do |project, contents|
|
2
|
+
create_feature(project, "feature1.feature", contents)
|
3
|
+
end
|
4
|
+
|
5
|
+
Given /^I visit the project page for "([^"]*)"$/ do |project|
|
6
|
+
visit "/projects/#{project}"
|
7
|
+
end
|
8
|
+
|
9
|
+
Then /^I should see a link to the feature "([^"]*)"$/ do |feature|
|
10
|
+
page.should have_link feature
|
11
|
+
end
|
@@ -12,12 +12,6 @@ Given /^I have a \.wally authentication file$/ do
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
When /^I put data to \/features with the authentication code$/ do
|
16
|
-
gherkin = Wally::ParsesFeatures.new.parse("Feature: Feature Name")
|
17
|
-
data = [{:path => "feature-name.feature", :gherkin => gherkin}].to_json
|
18
|
-
page.driver.put "/features?authentication_code=#{@authentication_code}", data
|
19
|
-
end
|
20
|
-
|
21
15
|
Then /^I should get a (\d+) http status$/ do |status|
|
22
16
|
page.driver.status_code.should eql status.to_i
|
23
17
|
end
|
@@ -25,3 +19,13 @@ end
|
|
25
19
|
Then /^I should see the uploaded feature$/ do
|
26
20
|
page.body.should have_content "Feature Name"
|
27
21
|
end
|
22
|
+
|
23
|
+
When /^I put data to \/my_project_name\/features with the authentication code$/ do
|
24
|
+
gherkin = Wally::ParsesFeatures.new.parse("Feature: Feature Name")
|
25
|
+
data = [{:path => "feature-name.feature", :gherkin => gherkin}].to_json
|
26
|
+
page.driver.put "/projects/my_project_name/features?authentication_code=#{@authentication_code}", data
|
27
|
+
end
|
28
|
+
|
29
|
+
When /^I visit "([^"]*)" page$/ do |project_name|
|
30
|
+
visit "/projects/#{project_name}"
|
31
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
When /^click on a scenario header link$/ do
|
2
|
+
page.click_link "Sample Aidy"
|
3
|
+
end
|
4
|
+
|
5
|
+
Then /^a page appears with the scenario content$/ do
|
6
|
+
page.body.should have_content "Sample Aidy"
|
7
|
+
page.body.should have_content "Given my name is \"Aidy\""
|
8
|
+
page.body.should have_content "When I drink alcohol"
|
9
|
+
page.body.should have_content "Then I go nuts"
|
10
|
+
end
|
11
|
+
|
12
|
+
Then /^the background is visible$/ do
|
13
|
+
page.body.should have_content "Background:"
|
14
|
+
page.body.should have_content "Given some things"
|
15
|
+
end
|
@@ -1,10 +1,18 @@
|
|
1
1
|
Given /^a feature file named "([^"]*)" with the contents:$/ do |filename, contents|
|
2
2
|
@contents = contents
|
3
|
-
create_feature(filename, @contents)
|
3
|
+
create_feature("project", filename, @contents)
|
4
4
|
end
|
5
5
|
|
6
|
-
When /^I visit the
|
7
|
-
visit "/"
|
6
|
+
When /^I visit the project page$/ do
|
7
|
+
visit "/projects/project"
|
8
|
+
end
|
9
|
+
|
10
|
+
When /^I visit the sample feature page$/ do
|
11
|
+
visit "/projects/project/features/sample-feature"
|
12
|
+
end
|
13
|
+
|
14
|
+
When /^I select "([^"]*)"$/ do |text|
|
15
|
+
click_link text
|
8
16
|
end
|
9
17
|
|
10
18
|
Then /^I should see a link to "([^"]*)" with the url "([^"]*)"$/ do |text, url|
|
@@ -14,3 +22,7 @@ end
|
|
14
22
|
Then /^I should see "([^"]*)"$/ do |text|
|
15
23
|
page.should have_content(text)
|
16
24
|
end
|
25
|
+
|
26
|
+
Then /^the total tag count is displayed$/ do
|
27
|
+
save_and_open_page
|
28
|
+
end
|