2011-12-23 15:04:38 -05:00
|
|
|
Feature: Step through sitemap as a tree
|
|
|
|
|
|
|
|
Scenario: Root
|
|
|
|
Given the Server is running at "traversal-app"
|
|
|
|
When I go to "/index.html"
|
2012-03-08 00:21:49 -05:00
|
|
|
Then I should see "Path: index.html"
|
2011-12-23 15:04:38 -05:00
|
|
|
Then I should not see "Parent: index.html"
|
|
|
|
Then I should see "Child: sub/index.html"
|
|
|
|
Then I should see "Child: root.html"
|
|
|
|
Then I should not see "Child: proxied.html"
|
|
|
|
|
|
|
|
Scenario: Directories have children and a parent
|
|
|
|
Given the Server is running at "traversal-app"
|
|
|
|
When I go to "/sub/index.html"
|
2012-03-08 00:21:49 -05:00
|
|
|
Then I should see "Path: sub/index.html"
|
2011-12-23 15:04:38 -05:00
|
|
|
Then I should see "Parent: index.html"
|
|
|
|
Then I should see "Child: sub/fake.html"
|
|
|
|
Then I should see "Child: sub/fake2.html"
|
|
|
|
Then I should see "Child: sub/sibling.html"
|
|
|
|
Then I should see "Child: sub/sibling2.html"
|
|
|
|
Then I should see "Child: sub/sub2/index.html"
|
|
|
|
Then I should see "Sibling: root.html"
|
2012-03-08 00:21:49 -05:00
|
|
|
|
|
|
|
Scenario: Directory accessed without index.html
|
|
|
|
Given the Server is running at "traversal-app"
|
|
|
|
When I go to "/sub/"
|
|
|
|
Then I should see "Path: sub/index.html"
|
|
|
|
Then I should see "Parent: index.html"
|
|
|
|
Then I should see "Child: sub/fake.html"
|
|
|
|
Then I should see "Child: sub/fake2.html"
|
|
|
|
Then I should see "Child: sub/sibling.html"
|
|
|
|
Then I should see "Child: sub/sibling2.html"
|
|
|
|
Then I should see "Child: sub/sub2/index.html"
|
|
|
|
Then I should see "Sibling: root.html"
|
|
|
|
|
|
|
|
Scenario: Page has siblings, parent, and source file
|
2011-12-23 15:04:38 -05:00
|
|
|
Given the Server is running at "traversal-app"
|
2012-05-24 19:14:17 -04:00
|
|
|
When I go to "/sub/sibling.html"
|
2012-03-08 00:21:49 -05:00
|
|
|
Then I should see "Parent: sub/index.html"
|
2011-12-23 15:04:38 -05:00
|
|
|
Then I should see "Sibling: sub/fake.html"
|
|
|
|
Then I should see "Sibling: sub/fake2.html"
|
|
|
|
Then I should see "Sibling: sub/sibling2.html"
|
|
|
|
Then I should see "Sibling: sub/sub2/index.html"
|
2012-03-08 00:21:49 -05:00
|
|
|
Then I should see "Source: source/sub/sibling.html.erb"
|
2011-12-23 15:04:38 -05:00
|
|
|
|
2012-03-08 00:21:49 -05:00
|
|
|
Scenario: Proxied page has siblings, parent, and source file
|
2011-12-23 15:04:38 -05:00
|
|
|
Given the Server is running at "traversal-app"
|
2012-05-24 19:14:17 -04:00
|
|
|
When I go to "/sub/fake.html"
|
2012-03-08 00:21:49 -05:00
|
|
|
Then I should see "Path: sub/fake.html"
|
|
|
|
Then I should see "Parent: sub/index.html"
|
2011-12-23 15:04:38 -05:00
|
|
|
Then I should see "Sibling: sub/fake2.html"
|
|
|
|
Then I should see "Sibling: sub/sibling.html"
|
|
|
|
Then I should see "Sibling: sub/sibling2.html"
|
|
|
|
Then I should see "Sibling: sub/sub2/index.html"
|
2011-12-25 02:02:50 -05:00
|
|
|
Then I should see "Source: source/proxied.html.erb"
|
|
|
|
|
|
|
|
Scenario: Child pages have data
|
|
|
|
Given the Server is running at "traversal-app"
|
2012-05-24 19:14:17 -04:00
|
|
|
When I go to "/directory-indexed.html"
|
2011-12-25 02:02:50 -05:00
|
|
|
Then I should see "Title of Sibling One"
|
|
|
|
Then I should see "Title of Sibling Two"
|
|
|
|
|
2012-05-24 19:14:17 -04:00
|
|
|
Scenario: When directory_index extension is inactive, child pages are found in named directory
|
2011-12-25 02:02:50 -05:00
|
|
|
Given the Server is running at "traversal-app"
|
2012-05-24 19:14:17 -04:00
|
|
|
When I go to "/directory-indexed.html"
|
2012-03-08 00:21:49 -05:00
|
|
|
Then I should see "Path: directory-indexed.html"
|
2011-12-25 02:02:50 -05:00
|
|
|
Then I should see "Parent: index.html"
|
|
|
|
Then I should see "Child: directory-indexed/fake.html"
|
|
|
|
Then I should see "Child: directory-indexed/fake2.html"
|
|
|
|
Then I should see "Child: directory-indexed/sibling.html"
|
|
|
|
Then I should see "Child: directory-indexed/sibling2.html"
|
|
|
|
Then I should see "Child: directory-indexed/sub2/index.html"
|
|
|
|
Then I should see "Sibling: root.html"
|
2014-05-01 16:53:59 -04:00
|
|
|
|
|
|
|
Scenario: Child pages can see their parent and siblings too in named directory
|
|
|
|
Given the Server is running at "traversal-app"
|
|
|
|
When I go to "/directory-indexed/sibling.html"
|
|
|
|
Then I should see "Path: directory-indexed/sibling.html"
|
|
|
|
Then I should see "Parent: directory-indexed.html"
|
|
|
|
Then I should see "Sibling: directory-indexed/fake.html"
|
|
|
|
Then I should see "Sibling: directory-indexed/fake2.html"
|
|
|
|
Then I should see "Sibling: directory-indexed/sibling2.html"
|
|
|
|
Then I should see "Sibling: directory-indexed/sub2/index.html"
|