1 | require './setup'
|
2 |
|
3 | describe 'Wrapping', ->
|
4 | it 'bare h2', ->
|
5 | @load "## hello", bare: true
|
6 |
|
7 | expect(@$).have.selectors [
|
8 | ".sg-section > h2#hello"
|
9 | ".sg-section > h2#hello.sg"
|
10 | ".sg-section.sg-section-hello"
|
11 | ".sg-section:root"
|
12 | ]
|
13 |
|
14 | it 'bare h3', ->
|
15 | @load "### hello", bare: true
|
16 |
|
17 | expect(@$).have.selectors [
|
18 | ".sg-block > h3#hello"
|
19 | ".sg-block > h3#hello.sg"
|
20 | ".sg-block.sg-section-hello"
|
21 | ".sg-block:root"
|
22 | ]
|
23 |
|
24 | it 'mixed case wrapping', ->
|
25 | @load '''
|
26 | ### button
|
27 |
|
28 | @example
|
29 | button
|
30 |
|
31 | ## Forms
|
32 | ### input
|
33 |
|
34 | @example
|
35 | input
|
36 | ''', bare: true
|
37 |
|
38 | expect(@$).have.selectors [
|
39 | ".sg-block.sg-section-button > .sg-text > h3#button"
|
40 | ".sg-block.sg-section-button > .sg-example"
|
41 | ".sg-section.sg-section-forms"
|
42 | ".sg-section.sg-section-forms > h2#forms"
|
43 | ".sg-section.sg-section-forms > .sg-block.sg-section-input"
|
44 | ".sg-section.sg-section-forms > .sg-block.sg-section-input > .sg-text > h3#input"
|
45 | ]
|