We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8716b07 commit 8ea6f91Copy full SHA for 8ea6f91
spec/usage/components/span_spec.rb
@@ -0,0 +1,38 @@
1
+require_relative "../../support/utils"
2
+include Utils
3
+
4
+describe 'Span 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 span
13
+ span do
14
+ plain 'I am simple'
15
+ end
16
17
+ # enhanced span
18
+ span id: 'my-id', class: 'my-class' do
19
+ plain 'I am enhanced'
20
21
+ }
22
23
24
25
26
+ visit '/example'
27
28
+ static_output = page.html
29
30
+ expected_static_output = <<~HTML
31
+ <span>I am simple</span>
32
+ <span id="my-id" class="my-class">I am enhanced</span>
33
+ HTML
34
35
+ expect(stripped(static_output)).to include(stripped(expected_static_output))
36
37
38
+end
0 commit comments