File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ require_relative '../../support/utils'
2
+ include Utils
3
+
4
+ describe 'Icon 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
+ # using the icon tag as italic styling
13
+ icon text : 'I am italic text'
14
+
15
+ # Fontawesome icon tag without options[:text]
16
+ icon class : 'fab fa-500px'
17
+
18
+ # MDL icon without options[:text]
19
+ icon class : 'material-icons' do
20
+ plain 'accessibility'
21
+ end
22
+
23
+ # MDL icon with options[:text] (recommended)
24
+ icon class : 'material-icons' , text : 'check_circle'
25
+ }
26
+ end
27
+
28
+ end
29
+
30
+ visit "/example"
31
+
32
+ static_output = page . html
33
+
34
+ expected_static_output = <<~HTML
35
+ < i > I am italic text</ i >
36
+ < i class ="fab fa-500px "> </ i >
37
+ < i class ="material-icons ">
38
+ accessibility
39
+ </ i >
40
+ < i class ="material-icons ">
41
+ check_circle
42
+ </ i >
43
+ HTML
44
+
45
+ expect ( stripped ( static_output ) ) . to include ( stripped ( expected_static_output ) )
46
+ end
47
+
48
+ end
You can’t perform that action at this time.
0 commit comments