2011-12-22 09:42:14 +01: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"
|
2012-06-02 09:35:03 +02:00
|
|
|
Then I should see:
|
|
|
|
"""
|
|
|
|
Master
|
2012-06-02 23:19:45 +02:00
|
|
|
<h1>Index Title</h1>
|
2015-09-29 19:27:53 +02:00
|
|
|
Outer
|
|
|
|
Inner
|
|
|
|
Template
|
2012-06-02 09:35:03 +02:00
|
|
|
"""
|
2012-03-25 08:41:37 +02:00
|
|
|
When I go to "/another.html"
|
2012-06-02 09:35:03 +02:00
|
|
|
Then I should see:
|
|
|
|
"""
|
|
|
|
Master
|
2012-06-02 23:19:45 +02:00
|
|
|
<h1>New Article Title</h1>
|
2015-09-29 19:27:53 +02:00
|
|
|
Outer
|
|
|
|
Inner
|
|
|
|
<p>The Article Content</p>
|
2012-06-02 09:35:03 +02:00
|
|
|
"""
|
2015-09-29 19:27:53 +02:00
|
|
|
|
2012-06-02 05:05:07 +02: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"
|
2015-09-29 19:27:53 +02:00
|
|
|
Then I should see:
|
|
|
|
"""
|
|
|
|
<h1>Master</h1><p>New Article Title</p><div><h2>Outer</h2><h3>Inner</h3>
|
|
|
|
<p>The Article Content</p>
|
|
|
|
"""
|
|
|
|
|
2012-06-02 05:05:07 +02: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"
|
2012-06-02 09:35:03 +02:00
|
|
|
Then I should see:
|
|
|
|
"""
|
|
|
|
Master
|
2012-06-02 23:19:45 +02:00
|
|
|
<h1>New Article Title</h1>
|
2012-06-02 09:35:03 +02:00
|
|
|
Outer
|
|
|
|
Inner
|
2015-09-29 19:27:53 +02:00
|
|
|
|
2012-06-02 09:35:03 +02:00
|
|
|
<p>The Article Content</p>
|
|
|
|
"""
|
2011-12-22 23:38:34 +01: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-23 06:19:49 +01:00
|
|
|
And I should see "Inner"
|
2011-12-22 23:38:34 +01:00
|
|
|
When I go to "/data-two.html"
|
|
|
|
Then I should see "Page Number Two"
|
2011-12-23 06:19:49 +01:00
|
|
|
And I should not see "Inner"
|
2011-12-22 23:38:34 +01:00
|
|
|
When I go to "/data-one.html"
|
|
|
|
Then I should see "Page Number One"
|
2011-12-23 06:19:49 +01:00
|
|
|
And I should see "Inner"
|
2011-12-22 23:38:34 +01:00
|
|
|
When I go to "/data-two.html"
|
2011-12-23 06:19:49 +01:00
|
|
|
Then I should see "Page Number Two"
|
|
|
|
And I should not see "Inner"
|