Skip to content

Commit bb72315

Browse files
add test for absolute core component
1 parent 493c175 commit bb72315

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
require_relative '../../support/utils'
2+
include Utils
3+
4+
describe 'Absolute 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+
absolute top: 50, left: 50, right: 50, bottom: 100, z: 3 do
13+
plain 'I am absolute content'
14+
end
15+
}
16+
end
17+
18+
end
19+
20+
visit '/example'
21+
22+
static_output = page.html
23+
24+
expected_static_output = <<~HTML
25+
<div style="position: absolute; top: 50px; left: 50px; right: 50px; bottom: 100px; z-index: 3;">I am absolute content</div>
26+
HTML
27+
28+
expect(stripped(static_output)).to include(stripped(expected_static_output))
29+
end
30+
31+
end

0 commit comments

Comments
 (0)