2011-12-22 00:42:14 -08:00
|
|
|
Feature: Allow nesting of layouts
|
|
|
|
|
|
|
|
Scenario: A page uses an inner layout when uses an outer layout
|
|
|
|
Given the Server is running at "nested-layout-app"
|
|
|
|
When I go to "/index.html"
|
|
|
|
Then I should see "Template"
|
|
|
|
And I should see "Inner"
|
|
|
|
And I should see "Outer"
|
2011-12-22 16:38:34 -06:00
|
|
|
And I should see "Master"
|
2012-03-24 23:41:37 -07:00
|
|
|
When I go to "/another.html"
|
|
|
|
And I should see "New Article Title"
|
|
|
|
And I should see "The Article Content"
|
|
|
|
And I should see "Inner"
|
|
|
|
And I should see "Outer"
|
|
|
|
And I should see "Master"
|
2012-06-01 20:05:07 -07:00
|
|
|
|
|
|
|
Scenario: A page uses an inner layout when uses an outer layout (slim)
|
|
|
|
Given the Server is running at "nested-layout-app"
|
|
|
|
When I go to "/slim-test.html"
|
2012-03-25 01:02:46 -07:00
|
|
|
And I should see "New Article Title"
|
|
|
|
And I should see "The Article Content"
|
|
|
|
And I should see "Inner"
|
|
|
|
And I should see "Outer"
|
|
|
|
And I should see "Master"
|
2012-03-24 23:41:37 -07:00
|
|
|
|
2012-06-01 20:05:07 -07:00
|
|
|
Scenario: A page uses an inner layout when uses an outer layout (haml)
|
|
|
|
Given the Server is running at "nested-layout-app"
|
|
|
|
When I go to "/haml-test.html"
|
|
|
|
And I should see "New Article Title"
|
|
|
|
And I should see "The Article Content"
|
|
|
|
And I should see "Inner"
|
|
|
|
And I should see "Outer"
|
|
|
|
And I should see "Master"
|
2011-12-22 16:38:34 -06:00
|
|
|
|
|
|
|
Scenario: YAML Front Matter isn't clobbered with nested layouts
|
|
|
|
Given the Server is running at "nested-layout-app"
|
|
|
|
When I go to "/data-one.html"
|
|
|
|
Then I should see "Page Number One"
|
2011-12-22 21:19:49 -08:00
|
|
|
And I should see "Inner"
|
2011-12-22 16:38:34 -06:00
|
|
|
When I go to "/data-two.html"
|
|
|
|
Then I should see "Page Number Two"
|
2011-12-22 21:19:49 -08:00
|
|
|
And I should not see "Inner"
|
2011-12-22 16:38:34 -06:00
|
|
|
When I go to "/data-one.html"
|
|
|
|
Then I should see "Page Number One"
|
2011-12-22 21:19:49 -08:00
|
|
|
And I should see "Inner"
|
2011-12-22 16:38:34 -06:00
|
|
|
When I go to "/data-two.html"
|
2011-12-22 21:19:49 -08:00
|
|
|
Then I should see "Page Number Two"
|
|
|
|
And I should not see "Inner"
|