@madgex/design-system 1.28.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/unit/src/components/accordion.spec.js +2 -2
- package/__tests__/unit/src/components/popover.spec.js +78 -0
- package/__tests__/unit/src/components/switch-state.spec.js +11 -11
- package/coverage/cobertura-coverage.xml +124 -46
- package/coverage/components/accordion/accordion.js.html +15 -6
- package/coverage/components/accordion/index.html +10 -10
- package/coverage/components/popover/index.html +97 -0
- package/coverage/components/popover/popover.js.html +246 -0
- package/coverage/components/switch-state/index.html +1 -1
- package/coverage/components/switch-state/switch-state.js.html +7 -7
- package/coverage/components/tabs/index.html +1 -1
- package/coverage/components/tabs/tabs.js.html +1 -1
- package/coverage/index.html +29 -16
- package/coverage/js/common.js.html +1 -1
- package/coverage/js/fractal-scripts/index.html +1 -1
- package/coverage/js/fractal-scripts/switch-state.js.html +6 -6
- package/coverage/js/index-fractal.js.html +1 -1
- package/coverage/js/index-polyfills.js.html +1 -1
- package/coverage/js/index.html +5 -5
- package/coverage/js/index.js.html +10 -4
- package/coverage/js/polyfills/closest.js.html +1 -1
- package/coverage/js/polyfills/index.html +1 -1
- package/coverage/tokens/_config.js.html +1 -1
- package/coverage/tokens/index.html +1 -1
- package/cypress/.eslintrc.js +12 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/integration/components/accordion.spec.js +48 -0
- package/cypress/integration/components/button.spec.js +9 -0
- package/cypress/integration/components/card.spec.js +9 -0
- package/cypress/integration/components/icons.spec.js +9 -0
- package/cypress/integration/components/input.spec.js +9 -0
- package/cypress/integration/components/pagination.spec.js +9 -0
- package/cypress/integration/components/section-title.spec.js +11 -0
- package/cypress/integration/components/switch-state.spec.js +40 -0
- package/cypress/integration/components/tabs.spec.js +45 -0
- package/cypress/integration/components/textarea.spec.js +9 -0
- package/cypress/plugins/index.js +17 -0
- package/cypress/support/commands.js +28 -0
- package/cypress/support/index.js +21 -0
- package/cypress.json +3 -0
- package/dist/_tokens/css/_tokens.css +9 -8
- package/dist/_tokens/js/_tokens-module.js +32 -13
- package/dist/_tokens/scss/_tokens.scss +12 -8
- package/dist/assets/icons.json +1 -1
- package/dist/assets/icons.svg +1 -1
- package/dist/css/index.css +1 -1
- package/dist/js/index.js +27 -2
- package/gulpfile.js +1 -1
- package/package.json +10 -2
- package/src/components/accordion/_template.njk +3 -3
- package/src/components/accordion/accordion.js +3 -0
- package/src/components/button/_template.njk +1 -1
- package/src/components/card/_template.njk +2 -2
- package/src/components/input/_template.njk +1 -1
- package/src/components/input/input.scss +0 -1
- package/src/components/pagination/_template.njk +1 -1
- package/src/components/pagination/pagination.config.js +4 -0
- package/src/components/popover/README.md +21 -0
- package/src/components/popover/_macro.njk +3 -0
- package/src/components/popover/_template.njk +19 -0
- package/src/components/popover/popover.config.js +30 -0
- package/src/components/popover/popover.js +59 -0
- package/src/components/popover/popover.njk +13 -0
- package/src/components/popover/popover.scss +116 -0
- package/src/components/section-title/_template.njk +1 -1
- package/src/components/switch-state/README.md +4 -4
- package/src/components/switch-state/_template.njk +4 -4
- package/src/components/switch-state/switch-state.config.js +4 -4
- package/src/components/switch-state/switch-state.js +6 -6
- package/src/components/switch-state/switch-state.njk +4 -4
- package/src/components/switch-state/switch-state.scss +2 -2
- package/src/components/tabs/_template.njk +3 -3
- package/src/components/textarea/_template.njk +1 -1
- package/src/icons/doc-pdf.svg +10 -0
- package/src/icons/doc.svg +10 -0
- package/src/js/fractal-scripts/switch-state.js +5 -5
- package/src/js/index.js +2 -0
- package/src/scss/components/__index.scss +2 -1
- package/src/tokens/color.json +10 -5
|
@@ -74,11 +74,11 @@ describe('Accordion - switchLabel', () => {
|
|
|
74
74
|
|
|
75
75
|
describe('Accordion - setAccordion', () => {
|
|
76
76
|
let element = document.createElement('div');
|
|
77
|
-
element.innerHTML = '<div class="mds-accordion__trigger"><span>this is the span</span></div>';
|
|
77
|
+
element.innerHTML = '<div class="mds-accordion__trigger"><span>this is the span</span></div><div class="mds-accordion__content">this is the content</div>';
|
|
78
78
|
beforeEach(() => {});
|
|
79
79
|
it('set accordion button', async () => {
|
|
80
80
|
expect.assertions(1);
|
|
81
81
|
accordion.setAccordion(element);
|
|
82
|
-
expect(element.textContent).
|
|
82
|
+
expect(element.textContent).toContain('this is the span');
|
|
83
83
|
});
|
|
84
84
|
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import popovers from '../../../../src/components/popover/popover';
|
|
2
|
+
|
|
3
|
+
// Avoid document.createRange not defined error
|
|
4
|
+
if (window.document) {
|
|
5
|
+
window.document.createRange = () => ({
|
|
6
|
+
setStart: () => {},
|
|
7
|
+
setEnd: () => {},
|
|
8
|
+
commonAncestorContainer: {
|
|
9
|
+
nodeName: 'BODY',
|
|
10
|
+
ownerDocument: document,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
document.body.innerHTML = `<button id="test" class="js-mds-popover-trigger">Trigger</button><div id="test-content" class="mds-popover"></div>`;
|
|
16
|
+
const trigger = document.getElementById('test');
|
|
17
|
+
const popover = document.getElementById('test-content');
|
|
18
|
+
const popoverActiveClass = 'mds-popover--active';
|
|
19
|
+
|
|
20
|
+
beforeEach(() => {
|
|
21
|
+
popovers.init();
|
|
22
|
+
popover.classList.remove(popoverActiveClass);
|
|
23
|
+
});
|
|
24
|
+
afterEach(() => {
|
|
25
|
+
document.body.innerHTML = '';
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
describe('setAriaAttr function - Set correct aria attributes on trigger and popover', () => {
|
|
31
|
+
|
|
32
|
+
it('popover is active', async () => {
|
|
33
|
+
popover.classList.add(popoverActiveClass);
|
|
34
|
+
expect.assertions(2);
|
|
35
|
+
popovers.setAriaAttr(trigger, popover, popoverActiveClass);
|
|
36
|
+
expect(trigger.getAttribute('aria-expanded')).toBe('true');
|
|
37
|
+
expect(popover.hasAttribute('aria-hidden')).toBe(false);
|
|
38
|
+
});
|
|
39
|
+
it('popover is not active', async () => {
|
|
40
|
+
expect.assertions(2);
|
|
41
|
+
popovers.setAriaAttr(trigger, popover, popoverActiveClass);
|
|
42
|
+
expect(trigger.getAttribute('aria-expanded')).toBe('false');
|
|
43
|
+
expect(popover.getAttribute('aria-hidden')).toBe('true');
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
describe('hide function', () => {
|
|
48
|
+
const targetElement = document.createElement('p');
|
|
49
|
+
const popoverInstance = {
|
|
50
|
+
popper: popover,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
it('remove active class from popover', async () => {
|
|
54
|
+
popover.classList.add(popoverActiveClass);
|
|
55
|
+
expect.assertions(1);
|
|
56
|
+
popovers.hide(trigger, popover, popoverInstance, popoverActiveClass, targetElement);
|
|
57
|
+
expect(popover.classList.contains(popoverActiveClass)).toBe(false);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
describe('display popover when clicking on trigger', () => {
|
|
62
|
+
|
|
63
|
+
it('adds active class', async () => {
|
|
64
|
+
expect.assertions(1);
|
|
65
|
+
trigger.click();
|
|
66
|
+
expect(popover.classList.contains(popoverActiveClass)).toBe(true);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
describe('hide active popover when clicking anywhere else on the page', () => {
|
|
71
|
+
|
|
72
|
+
it('removes active class', async () => {
|
|
73
|
+
expect.assertions(1);
|
|
74
|
+
trigger.click();
|
|
75
|
+
document.dispatchEvent(new Event('mousedown'));
|
|
76
|
+
expect(popover.classList.contains(popoverActiveClass)).toBe(false);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -2,20 +2,20 @@ import switchState from '../../../../src/components/switch-state/switch-state';
|
|
|
2
2
|
|
|
3
3
|
describe('Switch State', () => {
|
|
4
4
|
let element = document.createElement('div');
|
|
5
|
-
element.innerHTML = `<button class="mds-switch-state js-mds-switch-state mds-switch-state--
|
|
6
|
-
<span class="mds-switch-state--
|
|
7
|
-
<span class="mds-switch-state--
|
|
5
|
+
element.innerHTML = `<button class="mds-switch-state js-mds-switch-state mds-switch-state--default">
|
|
6
|
+
<span class="mds-switch-state--default">this is default</span>
|
|
7
|
+
<span class="mds-switch-state--inverse">this is inverse</span>
|
|
8
8
|
</button>`;
|
|
9
|
-
it('
|
|
9
|
+
it('setToinverse to be true', async () => {
|
|
10
10
|
expect.assertions(2);
|
|
11
|
-
switchState.
|
|
12
|
-
expect(element.classList.contains('mds-switch-state--
|
|
13
|
-
expect(element.classList.contains('mds-switch-state--
|
|
11
|
+
switchState.switchToinverse(element);
|
|
12
|
+
expect(element.classList.contains('mds-switch-state--inverse')).toBe(true);
|
|
13
|
+
expect(element.classList.contains('mds-switch-state--default')).toBe(false);
|
|
14
14
|
});
|
|
15
|
-
it('
|
|
15
|
+
it('setTodefault to be true', async () => {
|
|
16
16
|
expect.assertions(2);
|
|
17
|
-
switchState.
|
|
18
|
-
expect(element.classList.contains('mds-switch-state--
|
|
19
|
-
expect(element.classList.contains('mds-switch-state--
|
|
17
|
+
switchState.switchTodefault(element);
|
|
18
|
+
expect(element.classList.contains('mds-switch-state--default')).toBe(true);
|
|
19
|
+
expect(element.classList.contains('mds-switch-state--inverse')).toBe(false);
|
|
20
20
|
});
|
|
21
21
|
});
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
<?xml version="1.0" ?>
|
|
2
2
|
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
|
3
|
-
<coverage lines-valid="
|
|
3
|
+
<coverage lines-valid="227" lines-covered="85" line-rate="0.37439999999999996" branches-valid="58" branches-covered="18" branch-rate="0.3103" timestamp="1575028079796" complexity="0" version="0.1">
|
|
4
4
|
<sources>
|
|
5
5
|
<source>/var/lib/jenkins/jobs/madgex-design-system/branches/master/workspace</source>
|
|
6
6
|
</sources>
|
|
7
7
|
<packages>
|
|
8
|
-
<package name="components.accordion" line-rate="0.
|
|
8
|
+
<package name="components.accordion" line-rate="0.7429000000000001" branch-rate="0.6429">
|
|
9
9
|
<classes>
|
|
10
|
-
<class name="accordion.js" filename="src/components/accordion/accordion.js" line-rate="0.
|
|
10
|
+
<class name="accordion.js" filename="src/components/accordion/accordion.js" line-rate="0.7429000000000001" branch-rate="0.6429">
|
|
11
11
|
<methods>
|
|
12
12
|
<method name="(anonymous_0)" hits="0" signature="()V">
|
|
13
13
|
<lines>
|
|
14
|
-
<line number="
|
|
14
|
+
<line number="10" hits="0"/>
|
|
15
15
|
</lines>
|
|
16
16
|
</method>
|
|
17
17
|
<method name="(anonymous_1)" hits="0" signature="()V">
|
|
18
18
|
<lines>
|
|
19
|
-
<line number="
|
|
19
|
+
<line number="14" hits="0"/>
|
|
20
20
|
</lines>
|
|
21
21
|
</method>
|
|
22
22
|
<method name="(anonymous_2)" hits="6" signature="()V">
|
|
23
23
|
<lines>
|
|
24
|
-
<line number="
|
|
24
|
+
<line number="23" hits="6"/>
|
|
25
25
|
</lines>
|
|
26
26
|
</method>
|
|
27
27
|
<method name="(anonymous_3)" hits="1" signature="()V">
|
|
28
28
|
<lines>
|
|
29
|
-
<line number="
|
|
29
|
+
<line number="58" hits="1"/>
|
|
30
30
|
</lines>
|
|
31
31
|
</method>
|
|
32
32
|
<method name="(anonymous_4)" hits="0" signature="()V">
|
|
33
33
|
<lines>
|
|
34
|
-
<line number="
|
|
34
|
+
<line number="68" hits="0"/>
|
|
35
35
|
</lines>
|
|
36
36
|
</method>
|
|
37
37
|
<method name="(anonymous_5)" hits="2" signature="()V">
|
|
38
38
|
<lines>
|
|
39
|
-
<line number="
|
|
39
|
+
<line number="73" hits="2"/>
|
|
40
40
|
</lines>
|
|
41
41
|
</method>
|
|
42
42
|
<method name="(anonymous_6)" hits="1" signature="()V">
|
|
43
43
|
<lines>
|
|
44
|
-
<line number="
|
|
44
|
+
<line number="85" hits="1"/>
|
|
45
45
|
</lines>
|
|
46
46
|
</method>
|
|
47
47
|
<method name="(anonymous_7)" hits="0" signature="()V">
|
|
48
48
|
<lines>
|
|
49
|
-
<line number="
|
|
49
|
+
<line number="95" hits="0"/>
|
|
50
50
|
</lines>
|
|
51
51
|
</method>
|
|
52
52
|
</methods>
|
|
@@ -57,67 +57,144 @@
|
|
|
57
57
|
<line number="4" hits="1" branch="false"/>
|
|
58
58
|
<line number="5" hits="1" branch="false"/>
|
|
59
59
|
<line number="6" hits="1" branch="false"/>
|
|
60
|
-
<line number="
|
|
61
|
-
<line number="
|
|
60
|
+
<line number="7" hits="1" branch="false"/>
|
|
61
|
+
<line number="9" hits="1" branch="false"/>
|
|
62
62
|
<line number="11" hits="0" branch="false"/>
|
|
63
|
-
<line number="
|
|
63
|
+
<line number="12" hits="0" branch="false"/>
|
|
64
64
|
<line number="14" hits="0" branch="false"/>
|
|
65
|
-
<line number="15" hits="0" branch="
|
|
66
|
-
<line number="16" hits="0" branch="
|
|
67
|
-
<line number="
|
|
68
|
-
<line number="
|
|
69
|
-
<line number="
|
|
70
|
-
<line number="26" hits="
|
|
65
|
+
<line number="15" hits="0" branch="false"/>
|
|
66
|
+
<line number="16" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
67
|
+
<line number="17" hits="0" branch="false"/>
|
|
68
|
+
<line number="19" hits="0" branch="false"/>
|
|
69
|
+
<line number="24" hits="6" branch="false"/>
|
|
70
|
+
<line number="26" hits="6" branch="true" condition-coverage="100% (2/2)"/>
|
|
71
71
|
<line number="27" hits="5" branch="false"/>
|
|
72
|
-
<line number="
|
|
73
|
-
<line number="
|
|
72
|
+
<line number="28" hits="5" branch="false"/>
|
|
73
|
+
<line number="32" hits="5" branch="true" condition-coverage="100% (4/4)"/>
|
|
74
74
|
<line number="34" hits="2" branch="false"/>
|
|
75
|
-
<line number="
|
|
75
|
+
<line number="35" hits="2" branch="false"/>
|
|
76
76
|
<line number="37" hits="1" branch="false"/>
|
|
77
77
|
<line number="38" hits="1" branch="false"/>
|
|
78
78
|
<line number="39" hits="1" branch="false"/>
|
|
79
|
-
<line number="
|
|
79
|
+
<line number="40" hits="1" branch="false"/>
|
|
80
80
|
<line number="42" hits="1" branch="false"/>
|
|
81
81
|
<line number="43" hits="1" branch="false"/>
|
|
82
82
|
<line number="44" hits="1" branch="false"/>
|
|
83
|
-
<line number="
|
|
84
|
-
<line number="
|
|
85
|
-
<line number="50" hits="
|
|
86
|
-
<line number="
|
|
87
|
-
<line number="
|
|
88
|
-
<line number="
|
|
83
|
+
<line number="45" hits="1" branch="false"/>
|
|
84
|
+
<line number="47" hits="1" branch="false"/>
|
|
85
|
+
<line number="50" hits="4" branch="true" condition-coverage="100% (2/2)"/>
|
|
86
|
+
<line number="51" hits="3" branch="false"/>
|
|
87
|
+
<line number="54" hits="1" branch="false"/>
|
|
88
|
+
<line number="56" hits="1" branch="false"/>
|
|
89
89
|
<line number="59" hits="1" branch="false"/>
|
|
90
90
|
<line number="60" hits="1" branch="false"/>
|
|
91
91
|
<line number="61" hits="1" branch="false"/>
|
|
92
92
|
<line number="62" hits="1" branch="false"/>
|
|
93
93
|
<line number="63" hits="1" branch="false"/>
|
|
94
|
+
<line number="64" hits="1" branch="false"/>
|
|
94
95
|
<line number="65" hits="1" branch="false"/>
|
|
95
|
-
<line number="66" hits="
|
|
96
|
-
<line number="
|
|
97
|
-
<line number="
|
|
98
|
-
<line number="
|
|
99
|
-
<line number="73" hits="2" branch="false"/>
|
|
96
|
+
<line number="66" hits="1" branch="false"/>
|
|
97
|
+
<line number="68" hits="1" branch="false"/>
|
|
98
|
+
<line number="69" hits="0" branch="false"/>
|
|
99
|
+
<line number="70" hits="0" branch="false"/>
|
|
100
100
|
<line number="74" hits="2" branch="false"/>
|
|
101
101
|
<line number="75" hits="2" branch="false"/>
|
|
102
102
|
<line number="76" hits="2" branch="false"/>
|
|
103
103
|
<line number="77" hits="2" branch="false"/>
|
|
104
104
|
<line number="78" hits="2" branch="false"/>
|
|
105
|
+
<line number="79" hits="2" branch="false"/>
|
|
105
106
|
<line number="80" hits="2" branch="false"/>
|
|
106
|
-
<line number="
|
|
107
|
-
<line number="
|
|
107
|
+
<line number="81" hits="2" branch="false"/>
|
|
108
|
+
<line number="83" hits="2" branch="false"/>
|
|
108
109
|
<line number="86" hits="1" branch="false"/>
|
|
109
|
-
<line number="
|
|
110
|
-
<line number="
|
|
110
|
+
<line number="88" hits="1" branch="true" condition-coverage="50% (1/2)"/>
|
|
111
|
+
<line number="89" hits="1" branch="false"/>
|
|
111
112
|
<line number="90" hits="1" branch="false"/>
|
|
112
|
-
<line number="
|
|
113
|
-
<line number="
|
|
114
|
-
<line number="
|
|
115
|
-
<line number="97" hits="0" branch="
|
|
113
|
+
<line number="91" hits="1" branch="false"/>
|
|
114
|
+
<line number="93" hits="1" branch="false"/>
|
|
115
|
+
<line number="96" hits="0" branch="false"/>
|
|
116
|
+
<line number="97" hits="0" branch="false"/>
|
|
116
117
|
<line number="98" hits="0" branch="false"/>
|
|
117
|
-
<line number="
|
|
118
|
+
<line number="100" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
118
119
|
<line number="101" hits="0" branch="false"/>
|
|
119
120
|
<line number="102" hits="0" branch="false"/>
|
|
120
121
|
<line number="104" hits="0" branch="false"/>
|
|
122
|
+
<line number="105" hits="0" branch="false"/>
|
|
123
|
+
<line number="107" hits="0" branch="false"/>
|
|
124
|
+
</lines>
|
|
125
|
+
</class>
|
|
126
|
+
</classes>
|
|
127
|
+
</package>
|
|
128
|
+
<package name="components.popover" line-rate="0.9655" branch-rate="0.8181999999999999">
|
|
129
|
+
<classes>
|
|
130
|
+
<class name="popover.js" filename="src/components/popover/popover.js" line-rate="0.9655" branch-rate="0.8181999999999999">
|
|
131
|
+
<methods>
|
|
132
|
+
<method name="(anonymous_0)" hits="5" signature="()V">
|
|
133
|
+
<lines>
|
|
134
|
+
<line number="8" hits="5"/>
|
|
135
|
+
</lines>
|
|
136
|
+
</method>
|
|
137
|
+
<method name="(anonymous_1)" hits="1" signature="()V">
|
|
138
|
+
<lines>
|
|
139
|
+
<line number="11" hits="1"/>
|
|
140
|
+
</lines>
|
|
141
|
+
</method>
|
|
142
|
+
<method name="(anonymous_2)" hits="2" signature="()V">
|
|
143
|
+
<lines>
|
|
144
|
+
<line number="24" hits="2"/>
|
|
145
|
+
</lines>
|
|
146
|
+
</method>
|
|
147
|
+
<method name="(anonymous_3)" hits="1" signature="()V">
|
|
148
|
+
<lines>
|
|
149
|
+
<line number="30" hits="1"/>
|
|
150
|
+
</lines>
|
|
151
|
+
</method>
|
|
152
|
+
<method name="(anonymous_4)" hits="0" signature="()V">
|
|
153
|
+
<lines>
|
|
154
|
+
<line number="33" hits="0"/>
|
|
155
|
+
</lines>
|
|
156
|
+
</method>
|
|
157
|
+
<method name="(anonymous_5)" hits="2" signature="()V">
|
|
158
|
+
<lines>
|
|
159
|
+
<line number="38" hits="2"/>
|
|
160
|
+
</lines>
|
|
161
|
+
</method>
|
|
162
|
+
<method name="(anonymous_6)" hits="6" signature="()V">
|
|
163
|
+
<lines>
|
|
164
|
+
<line number="48" hits="6"/>
|
|
165
|
+
</lines>
|
|
166
|
+
</method>
|
|
167
|
+
</methods>
|
|
168
|
+
<lines>
|
|
169
|
+
<line number="4" hits="1" branch="false"/>
|
|
170
|
+
<line number="5" hits="1" branch="false"/>
|
|
171
|
+
<line number="7" hits="1" branch="false"/>
|
|
172
|
+
<line number="9" hits="5" branch="false"/>
|
|
173
|
+
<line number="11" hits="5" branch="false"/>
|
|
174
|
+
<line number="12" hits="1" branch="false"/>
|
|
175
|
+
<line number="13" hits="1" branch="false"/>
|
|
176
|
+
<line number="14" hits="1" branch="false"/>
|
|
177
|
+
<line number="16" hits="1" branch="true" condition-coverage="50% (1/2)"/>
|
|
178
|
+
<line number="17" hits="1" branch="false"/>
|
|
179
|
+
<line number="21" hits="1" branch="false"/>
|
|
180
|
+
<line number="22" hits="1" branch="false"/>
|
|
181
|
+
<line number="24" hits="1" branch="false"/>
|
|
182
|
+
<line number="25" hits="2" branch="false"/>
|
|
183
|
+
<line number="26" hits="2" branch="false"/>
|
|
184
|
+
<line number="27" hits="2" branch="false"/>
|
|
185
|
+
<line number="28" hits="2" branch="false"/>
|
|
186
|
+
<line number="30" hits="1" branch="false"/>
|
|
187
|
+
<line number="31" hits="1" branch="false"/>
|
|
188
|
+
<line number="33" hits="1" branch="false"/>
|
|
189
|
+
<line number="34" hits="0" branch="false"/>
|
|
190
|
+
<line number="39" hits="2" branch="true" condition-coverage="50% (1/2)"/>
|
|
191
|
+
<line number="44" hits="2" branch="false"/>
|
|
192
|
+
<line number="45" hits="2" branch="false"/>
|
|
193
|
+
<line number="49" hits="6" branch="true" condition-coverage="100% (2/2)"/>
|
|
194
|
+
<line number="50" hits="3" branch="false"/>
|
|
195
|
+
<line number="51" hits="3" branch="false"/>
|
|
196
|
+
<line number="53" hits="3" branch="false"/>
|
|
197
|
+
<line number="54" hits="3" branch="false"/>
|
|
121
198
|
</lines>
|
|
122
199
|
</class>
|
|
123
200
|
</classes>
|
|
@@ -405,14 +482,15 @@
|
|
|
405
482
|
<methods>
|
|
406
483
|
<method name="(anonymous_0)" hits="0" signature="()V">
|
|
407
484
|
<lines>
|
|
408
|
-
<line number="
|
|
485
|
+
<line number="16" hits="0"/>
|
|
409
486
|
</lines>
|
|
410
487
|
</method>
|
|
411
488
|
</methods>
|
|
412
489
|
<lines>
|
|
413
|
-
<line number="15" hits="0" branch="false"/>
|
|
414
490
|
<line number="16" hits="0" branch="false"/>
|
|
415
491
|
<line number="17" hits="0" branch="false"/>
|
|
492
|
+
<line number="18" hits="0" branch="false"/>
|
|
493
|
+
<line number="19" hits="0" branch="false"/>
|
|
416
494
|
</lines>
|
|
417
495
|
</class>
|
|
418
496
|
</classes>
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
</h1>
|
|
21
21
|
<div class='clearfix'>
|
|
22
22
|
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">
|
|
23
|
+
<span class="strong">74.29% </span>
|
|
24
24
|
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>
|
|
25
|
+
<span class='fraction'>52/70</span>
|
|
26
26
|
</div>
|
|
27
27
|
<div class='fl pad1y space-right2'>
|
|
28
28
|
<span class="strong">64.29% </span>
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
<span class='fraction'>4/8</span>
|
|
36
36
|
</div>
|
|
37
37
|
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">
|
|
38
|
+
<span class="strong">74.29% </span>
|
|
39
39
|
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>
|
|
40
|
+
<span class='fraction'>52/70</span>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
<p class="quiet">
|
|
@@ -154,7 +154,11 @@
|
|
|
154
154
|
<a name='L106'></a><a href='#L106'>106</a>
|
|
155
155
|
<a name='L107'></a><a href='#L107'>107</a>
|
|
156
156
|
<a name='L108'></a><a href='#L108'>108</a>
|
|
157
|
-
<a name='L109'></a><a href='#L109'>109</a
|
|
157
|
+
<a name='L109'></a><a href='#L109'>109</a>
|
|
158
|
+
<a name='L110'></a><a href='#L110'>110</a>
|
|
159
|
+
<a name='L111'></a><a href='#L111'>111</a>
|
|
160
|
+
<a name='L112'></a><a href='#L112'>112</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
161
|
+
<span class="cline-any cline-yes">1x</span>
|
|
158
162
|
<span class="cline-any cline-yes">1x</span>
|
|
159
163
|
<span class="cline-any cline-yes">1x</span>
|
|
160
164
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -217,6 +221,8 @@
|
|
|
217
221
|
<span class="cline-any cline-yes">1x</span>
|
|
218
222
|
<span class="cline-any cline-yes">1x</span>
|
|
219
223
|
<span class="cline-any cline-yes">1x</span>
|
|
224
|
+
<span class="cline-any cline-yes">1x</span>
|
|
225
|
+
<span class="cline-any cline-yes">1x</span>
|
|
220
226
|
<span class="cline-any cline-neutral"> </span>
|
|
221
227
|
<span class="cline-any cline-yes">1x</span>
|
|
222
228
|
<span class="cline-any cline-no"> </span>
|
|
@@ -265,6 +271,7 @@
|
|
|
265
271
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const accordionClass = 'mds-accordion';
|
|
266
272
|
const accordionTriggerClass = 'mds-accordion__trigger';
|
|
267
273
|
const accordionTriggerButtonClass = 'mds-accordion__trigger-button';
|
|
274
|
+
const accordionContentClass = 'mds-accordion__content';
|
|
268
275
|
const accordionExpandedClass = 'mds-accordion--expanded';
|
|
269
276
|
const accordionLabelInverseData = 'data-labelinverse';
|
|
270
277
|
const accordionTriggerLabelClass = 'mds-accordion__trigger-label';
|
|
@@ -321,8 +328,10 @@ const accordion = {
|
|
|
321
328
|
setAccordion: (element) => {
|
|
322
329
|
const accordionId = element.id;
|
|
323
330
|
const accordionTrigger = element.querySelector(`.${accordionTriggerClass}`);
|
|
331
|
+
const accordionContent = element.querySelector(`.${accordionContentClass}`);
|
|
324
332
|
const accordionTriggerButton = accordion.createButton(accordionId, element);
|
|
325
333
|
accordionTrigger.classList.remove('mds-display-none');
|
|
334
|
+
accordionContent.setAttribute('aria-labelledby', `accordion-trigger-${accordionId}`);
|
|
326
335
|
accordionTrigger.innerHTML = '';
|
|
327
336
|
accordionTrigger.appendChild(accordionTriggerButton);
|
|
328
337
|
|
|
@@ -376,7 +385,7 @@ export default accordion;
|
|
|
376
385
|
</div><!-- /wrapper -->
|
|
377
386
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
378
387
|
Code coverage
|
|
379
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at
|
|
388
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri Nov 29 2019 11:47:59 GMT+0000 (GMT)
|
|
380
389
|
</div>
|
|
381
390
|
</div>
|
|
382
391
|
<script src="../../prettify.js"></script>
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
</h1>
|
|
21
21
|
<div class='clearfix'>
|
|
22
22
|
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">
|
|
23
|
+
<span class="strong">74.29% </span>
|
|
24
24
|
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>
|
|
25
|
+
<span class='fraction'>52/70</span>
|
|
26
26
|
</div>
|
|
27
27
|
<div class='fl pad1y space-right2'>
|
|
28
28
|
<span class="strong">64.29% </span>
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
<span class='fraction'>4/8</span>
|
|
36
36
|
</div>
|
|
37
37
|
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">
|
|
38
|
+
<span class="strong">74.29% </span>
|
|
39
39
|
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>
|
|
40
|
+
<span class='fraction'>52/70</span>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
<p class="quiet">
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
</thead>
|
|
64
64
|
<tbody><tr>
|
|
65
65
|
<td class="file medium" data-value="accordion.js"><a href="accordion.js.html">accordion.js</a></td>
|
|
66
|
-
<td data-value="
|
|
67
|
-
<td data-value="
|
|
68
|
-
<td data-value="
|
|
66
|
+
<td data-value="74.29" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 74%;"></div><div class="cover-empty" style="width:26%;"></div></div></td>
|
|
67
|
+
<td data-value="74.29" class="pct medium">74.29%</td>
|
|
68
|
+
<td data-value="70" class="abs medium">52/70</td>
|
|
69
69
|
<td data-value="64.29" class="pct medium">64.29%</td>
|
|
70
70
|
<td data-value="14" class="abs medium">9/14</td>
|
|
71
71
|
<td data-value="50" class="pct medium">50%</td>
|
|
72
72
|
<td data-value="8" class="abs medium">4/8</td>
|
|
73
|
-
<td data-value="
|
|
74
|
-
<td data-value="
|
|
73
|
+
<td data-value="74.29" class="pct medium">74.29%</td>
|
|
74
|
+
<td data-value="70" class="abs medium">52/70</td>
|
|
75
75
|
</tr>
|
|
76
76
|
|
|
77
77
|
</tbody>
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
</div><!-- /wrapper -->
|
|
81
81
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
82
82
|
Code coverage
|
|
83
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at
|
|
83
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri Nov 29 2019 11:47:59 GMT+0000 (GMT)
|
|
84
84
|
</div>
|
|
85
85
|
</div>
|
|
86
86
|
<script src="../../prettify.js"></script>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>Code coverage report for components/popover</title>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<link rel="stylesheet" href="../../prettify.css" />
|
|
7
|
+
<link rel="stylesheet" href="../../base.css" />
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
+
<style type='text/css'>
|
|
10
|
+
.coverage-summary .sorter {
|
|
11
|
+
background-image: url(../../sort-arrow-sprite.png);
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div class='wrapper'>
|
|
17
|
+
<div class='pad1'>
|
|
18
|
+
<h1>
|
|
19
|
+
<a href="../../index.html">All files</a> components/popover
|
|
20
|
+
</h1>
|
|
21
|
+
<div class='clearfix'>
|
|
22
|
+
<div class='fl pad1y space-right2'>
|
|
23
|
+
<span class="strong">96.55% </span>
|
|
24
|
+
<span class="quiet">Statements</span>
|
|
25
|
+
<span class='fraction'>28/29</span>
|
|
26
|
+
</div>
|
|
27
|
+
<div class='fl pad1y space-right2'>
|
|
28
|
+
<span class="strong">81.82% </span>
|
|
29
|
+
<span class="quiet">Branches</span>
|
|
30
|
+
<span class='fraction'>9/11</span>
|
|
31
|
+
</div>
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">85.71% </span>
|
|
34
|
+
<span class="quiet">Functions</span>
|
|
35
|
+
<span class='fraction'>6/7</span>
|
|
36
|
+
</div>
|
|
37
|
+
<div class='fl pad1y space-right2'>
|
|
38
|
+
<span class="strong">96.55% </span>
|
|
39
|
+
<span class="quiet">Lines</span>
|
|
40
|
+
<span class='fraction'>28/29</span>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<p class="quiet">
|
|
44
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
+
</p>
|
|
46
|
+
</div>
|
|
47
|
+
<div class='status-line high'></div>
|
|
48
|
+
<div class="pad1">
|
|
49
|
+
<table class="coverage-summary">
|
|
50
|
+
<thead>
|
|
51
|
+
<tr>
|
|
52
|
+
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
53
|
+
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
54
|
+
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
55
|
+
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
56
|
+
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
57
|
+
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
58
|
+
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
59
|
+
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
60
|
+
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
61
|
+
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
62
|
+
</tr>
|
|
63
|
+
</thead>
|
|
64
|
+
<tbody><tr>
|
|
65
|
+
<td class="file high" data-value="popover.js"><a href="popover.js.html">popover.js</a></td>
|
|
66
|
+
<td data-value="96.55" class="pic high"><div class="chart"><div class="cover-fill" style="width: 96%;"></div><div class="cover-empty" style="width:4%;"></div></div></td>
|
|
67
|
+
<td data-value="96.55" class="pct high">96.55%</td>
|
|
68
|
+
<td data-value="29" class="abs high">28/29</td>
|
|
69
|
+
<td data-value="81.82" class="pct high">81.82%</td>
|
|
70
|
+
<td data-value="11" class="abs high">9/11</td>
|
|
71
|
+
<td data-value="85.71" class="pct high">85.71%</td>
|
|
72
|
+
<td data-value="7" class="abs high">6/7</td>
|
|
73
|
+
<td data-value="96.55" class="pct high">96.55%</td>
|
|
74
|
+
<td data-value="29" class="abs high">28/29</td>
|
|
75
|
+
</tr>
|
|
76
|
+
|
|
77
|
+
</tbody>
|
|
78
|
+
</table>
|
|
79
|
+
</div><div class='push'></div><!-- for sticky footer -->
|
|
80
|
+
</div><!-- /wrapper -->
|
|
81
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
82
|
+
Code coverage
|
|
83
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri Nov 29 2019 11:47:59 GMT+0000 (GMT)
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<script src="../../prettify.js"></script>
|
|
87
|
+
<script>
|
|
88
|
+
window.onload = function () {
|
|
89
|
+
if (typeof prettyPrint === 'function') {
|
|
90
|
+
prettyPrint();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
</script>
|
|
94
|
+
<script src="../../sorter.js"></script>
|
|
95
|
+
<script src="../../block-navigation.js"></script>
|
|
96
|
+
</body>
|
|
97
|
+
</html>
|