Confirm nested frontmatter doesn't work
This commit is contained in:
parent
598d72480f
commit
c5aabbbe4f
10 changed files with 70 additions and 30 deletions
|
@ -5,37 +5,37 @@ Feature: Allow nesting of layouts
|
||||||
When I go to "/index.html"
|
When I go to "/index.html"
|
||||||
Then I should see:
|
Then I should see:
|
||||||
"""
|
"""
|
||||||
Master
|
Master Erb
|
||||||
<h1>Index Title</h1>
|
<h1>Index Title</h1>
|
||||||
Outer
|
I am Outer
|
||||||
Inner
|
I am Inner
|
||||||
Template
|
Template
|
||||||
|
|
||||||
"""
|
"""
|
||||||
When I go to "/another.html"
|
When I go to "/another.html"
|
||||||
Then I should see:
|
Then I should see:
|
||||||
"""
|
"""
|
||||||
Master
|
Master Erb
|
||||||
<h1>New Article Title</h1>
|
<h1>New Article Title</h1>
|
||||||
Outer
|
I am Outer
|
||||||
Inner
|
I am Inner
|
||||||
<p>The Article Content</p>
|
<p>The Article Content</p>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Scenario: A page uses an inner layout when uses an outer layout (slim)
|
Scenario: A page uses an inner layout when uses an outer layout (slim)
|
||||||
Given the Server is running at "nested-layout-app"
|
Given the Server is running at "nested-layout-app"
|
||||||
When I go to "/slim-test.html"
|
When I go to "/slim-test.html"
|
||||||
Then I should see "<h1>Master</h1><p>New Article Title</p><div><h2>Outer</h2><h3>Inner</h3><p>The Article Content</p>"
|
Then I should see "<h1>Master Slim</h1><p>New Article Title</p><div><h2>I am Outer</h2><h3>I am Inner</h3><p>The Article Content</p>"
|
||||||
|
|
||||||
Scenario: A page uses an inner layout when uses an outer layout (haml)
|
Scenario: A page uses an inner layout when uses an outer layout (haml)
|
||||||
Given the Server is running at "nested-layout-app"
|
Given the Server is running at "nested-layout-app"
|
||||||
When I go to "/haml-test.html"
|
When I go to "/haml-test.html"
|
||||||
Then I should see:
|
Then I should see:
|
||||||
"""
|
"""
|
||||||
Master
|
Master Haml
|
||||||
<h1>New Article Title</h1>
|
<h1>New Article Title</h1>
|
||||||
Outer
|
I am Outer
|
||||||
Inner
|
I am Inner
|
||||||
<p>The Article Content</p>
|
<p>The Article Content</p>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -43,13 +43,16 @@ Feature: Allow nesting of layouts
|
||||||
Given the Server is running at "nested-layout-app"
|
Given the Server is running at "nested-layout-app"
|
||||||
When I go to "/data-one.html"
|
When I go to "/data-one.html"
|
||||||
Then I should see "Page Number One"
|
Then I should see "Page Number One"
|
||||||
And I should see "Inner"
|
And I should see "Page #1"
|
||||||
|
And I should see "I am Inner"
|
||||||
|
And I should see "I am Outer"
|
||||||
|
And I should see "Master Erb"
|
||||||
When I go to "/data-two.html"
|
When I go to "/data-two.html"
|
||||||
Then I should see "Page Number Two"
|
Then I should see "Page Number Two"
|
||||||
And I should not see "Inner"
|
And I should not see "I am Inner"
|
||||||
When I go to "/data-one.html"
|
When I go to "/data-one.html"
|
||||||
Then I should see "Page Number One"
|
Then I should see "Page Number One"
|
||||||
And I should see "Inner"
|
And I should see "I am Inner"
|
||||||
When I go to "/data-two.html"
|
When I go to "/data-two.html"
|
||||||
Then I should see "Page Number Two"
|
Then I should see "Page Number Two"
|
||||||
And I should not see "Inner"
|
And I should not see "I am Inner"
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
|
---
|
||||||
|
inner: true
|
||||||
|
---
|
||||||
<% wrap_layout :outer do %>
|
<% wrap_layout :outer do %>
|
||||||
Inner
|
I am Inner
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,3 +1,7 @@
|
||||||
|
---
|
||||||
|
inner_haml: true
|
||||||
|
---
|
||||||
|
|
||||||
= wrap_layout :outer_haml do
|
= wrap_layout :outer_haml do
|
||||||
Inner
|
I am Inner
|
||||||
= yield
|
= yield
|
|
@ -1,3 +1,7 @@
|
||||||
|
---
|
||||||
|
inner_slim: true
|
||||||
|
---
|
||||||
|
|
||||||
= wrap_layout :outer_slim do
|
= wrap_layout :outer_slim do
|
||||||
h3 Inner
|
h3 I am Inner
|
||||||
== yield
|
== yield
|
|
@ -1,3 +1,9 @@
|
||||||
Master
|
---
|
||||||
|
master: true
|
||||||
|
---
|
||||||
|
|
||||||
|
Master Erb
|
||||||
<h1><%= current_page.data.title %></h1>
|
<h1><%= current_page.data.title %></h1>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
|
||||||
|
Using Inner: <%= current_page.data.inner ? 'true' : 'false' %>
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
Master
|
---
|
||||||
|
master_haml: true
|
||||||
|
---
|
||||||
|
|
||||||
|
Master Haml
|
||||||
%h1= current_page.data.title
|
%h1= current_page.data.title
|
||||||
= yield
|
= yield
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
h1 Master
|
---
|
||||||
|
master_slim: true
|
||||||
|
---
|
||||||
|
|
||||||
|
h1 Master Slim
|
||||||
p== current_page.data.title
|
p== current_page.data.title
|
||||||
div== yield
|
div== yield
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
|
---
|
||||||
|
outer: true
|
||||||
|
---
|
||||||
|
|
||||||
<% wrap_layout :master do %>
|
<% wrap_layout :master do %>
|
||||||
Outer
|
I am Outer
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,3 +1,7 @@
|
||||||
|
---
|
||||||
|
outer_haml: true
|
||||||
|
---
|
||||||
|
|
||||||
= wrap_layout :master_haml do
|
= wrap_layout :master_haml do
|
||||||
Outer
|
I am Outer
|
||||||
= yield
|
= yield
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
---
|
||||||
|
outer_slim: true
|
||||||
|
---
|
||||||
|
|
||||||
= wrap_layout :master_slim do
|
= wrap_layout :master_slim do
|
||||||
h2 Outer
|
h2 I am Outer
|
||||||
== yield
|
== yield
|
||||||
|
|
Loading…
Add table
Reference in a new issue