Skip to content

Commit ffb489a

Browse files
author
p_doub
committed
Add footer core compontent test
1 parent 47b7bef commit ffb489a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

spec/usage/components/footer_spec.rb

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
require_relative '../../support/utils'
2+
include Utils
3+
4+
describe 'Footer Component', type: :feature, js: true do
5+
6+
it 'Example 1' do
7+
8+
class ExamplePage < Page::Cell::Page
9+
10+
def response
11+
components {
12+
# simple footer tag
13+
footer do
14+
plain 'hello world!'
15+
end
16+
17+
# advanced footer tag
18+
footer id: 'my-unique-footer', class: 'awesome-footer' do
19+
pg class: 'footer-text', text: 'hello world!'
20+
end
21+
}
22+
end
23+
24+
end
25+
26+
visit "/example"
27+
28+
static_output = page.html
29+
30+
expected_static_output = <<~HTML
31+
<footer>hello world!</footer>
32+
<footer id="my-unique-footer" class="awesome-footer">
33+
<p class="footer-text">hello world!</p>
34+
</footer>
35+
HTML
36+
37+
expect(stripped(static_output)).to include(stripped(expected_static_output))
38+
end
39+
40+
end

0 commit comments

Comments
 (0)