@madgex/design-system 1.28.0 → 1.29.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.
Files changed (59) hide show
  1. package/__tests__/unit/src/components/accordion.spec.js +2 -2
  2. package/coverage/cobertura-coverage.xml +47 -44
  3. package/coverage/components/accordion/accordion.js.html +15 -6
  4. package/coverage/components/accordion/index.html +10 -10
  5. package/coverage/components/switch-state/index.html +1 -1
  6. package/coverage/components/switch-state/switch-state.js.html +1 -1
  7. package/coverage/components/tabs/index.html +1 -1
  8. package/coverage/components/tabs/tabs.js.html +1 -1
  9. package/coverage/index.html +10 -10
  10. package/coverage/js/common.js.html +1 -1
  11. package/coverage/js/fractal-scripts/index.html +1 -1
  12. package/coverage/js/fractal-scripts/switch-state.js.html +1 -1
  13. package/coverage/js/index-fractal.js.html +1 -1
  14. package/coverage/js/index-polyfills.js.html +1 -1
  15. package/coverage/js/index.html +1 -1
  16. package/coverage/js/index.js.html +1 -1
  17. package/coverage/js/polyfills/closest.js.html +1 -1
  18. package/coverage/js/polyfills/index.html +1 -1
  19. package/coverage/tokens/_config.js.html +1 -1
  20. package/coverage/tokens/index.html +1 -1
  21. package/cypress/.eslintrc.js +12 -0
  22. package/cypress/fixtures/example.json +5 -0
  23. package/cypress/integration/components/accordion.spec.js +48 -0
  24. package/cypress/integration/components/button.spec.js +9 -0
  25. package/cypress/integration/components/card.spec.js +9 -0
  26. package/cypress/integration/components/icons.spec.js +9 -0
  27. package/cypress/integration/components/input.spec.js +9 -0
  28. package/cypress/integration/components/pagination.spec.js +9 -0
  29. package/cypress/integration/components/section-title.spec.js +11 -0
  30. package/cypress/integration/components/switch-state.spec.js +40 -0
  31. package/cypress/integration/components/tabs.spec.js +45 -0
  32. package/cypress/integration/components/textarea.spec.js +9 -0
  33. package/cypress/plugins/index.js +17 -0
  34. package/cypress/support/commands.js +28 -0
  35. package/cypress/support/index.js +21 -0
  36. package/cypress.json +3 -0
  37. package/dist/_tokens/css/_tokens.css +3 -3
  38. package/dist/_tokens/js/_tokens-module.js +4 -4
  39. package/dist/_tokens/scss/_tokens.scss +3 -3
  40. package/dist/assets/icons.json +1 -1
  41. package/dist/assets/icons.svg +1 -1
  42. package/dist/css/index.css +1 -1
  43. package/dist/js/index.js +1 -1
  44. package/package.json +9 -2
  45. package/src/components/accordion/_template.njk +3 -3
  46. package/src/components/accordion/accordion.js +3 -0
  47. package/src/components/button/_template.njk +1 -1
  48. package/src/components/card/_template.njk +2 -2
  49. package/src/components/input/_template.njk +1 -1
  50. package/src/components/input/input.scss +0 -1
  51. package/src/components/pagination/_template.njk +1 -1
  52. package/src/components/pagination/pagination.config.js +4 -0
  53. package/src/components/section-title/_template.njk +1 -1
  54. package/src/components/switch-state/_template.njk +3 -3
  55. package/src/components/tabs/_template.njk +3 -3
  56. package/src/components/textarea/_template.njk +1 -1
  57. package/src/icons/doc-pdf.svg +10 -0
  58. package/src/icons/doc.svg +10 -0
  59. package/src/tokens/color.json +1 -1
@@ -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).toBe('this is the span');
82
+ expect(element.textContent).toContain('this is the span');
83
83
  });
84
84
  });
@@ -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="194" lines-covered="54" line-rate="0.2784" branches-valid="47" branches-covered="9" branch-rate="0.19149999999999998" timestamp="1573569109115" complexity="0" version="0.1">
3
+ <coverage lines-valid="197" lines-covered="57" line-rate="0.2893" branches-valid="47" branches-covered="9" branch-rate="0.19149999999999998" timestamp="1574357266726" 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.7313" branch-rate="0.6429">
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.7313" branch-rate="0.6429">
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="9" hits="0"/>
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="13" hits="0"/>
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="22" hits="6"/>
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="57" hits="1"/>
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="65" hits="0"/>
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="70" hits="2"/>
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="82" hits="1"/>
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="92" hits="0"/>
49
+ <line number="95" hits="0"/>
50
50
  </lines>
51
51
  </method>
52
52
  </methods>
@@ -57,67 +57,70 @@
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="8" hits="1" branch="false"/>
61
- <line number="10" hits="0" branch="false"/>
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="13" hits="0" branch="false"/>
63
+ <line number="12" hits="0" branch="false"/>
64
64
  <line number="14" hits="0" branch="false"/>
65
- <line number="15" hits="0" branch="true" condition-coverage="0% (0/2)"/>
66
- <line number="16" hits="0" branch="false"/>
67
- <line number="18" hits="0" branch="false"/>
68
- <line number="23" hits="6" branch="false"/>
69
- <line number="25" hits="6" branch="true" condition-coverage="100% (2/2)"/>
70
- <line number="26" hits="5" branch="false"/>
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="31" hits="5" branch="true" condition-coverage="100% (4/4)"/>
73
- <line number="33" hits="2" branch="false"/>
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="36" hits="1" branch="false"/>
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="41" hits="1" branch="false"/>
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="46" hits="1" branch="false"/>
84
- <line number="49" hits="4" branch="true" condition-coverage="100% (2/2)"/>
85
- <line number="50" hits="3" branch="false"/>
86
- <line number="53" hits="1" branch="false"/>
87
- <line number="55" hits="1" branch="false"/>
88
- <line number="58" hits="1" branch="false"/>
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="0" branch="false"/>
96
- <line number="67" hits="0" branch="false"/>
97
- <line number="71" hits="2" branch="false"/>
98
- <line number="72" hits="2" branch="false"/>
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="83" hits="1" branch="false"/>
107
- <line number="85" hits="1" branch="true" condition-coverage="50% (1/2)"/>
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="87" hits="1" branch="false"/>
110
- <line number="88" hits="1" branch="false"/>
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="93" hits="0" branch="false"/>
113
- <line number="94" hits="0" branch="false"/>
114
- <line number="95" hits="0" branch="false"/>
115
- <line number="97" hits="0" branch="true" condition-coverage="0% (0/2)"/>
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="99" hits="0" branch="false"/>
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"/>
121
124
  </lines>
122
125
  </class>
123
126
  </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">73.13% </span>
23
+ <span class="strong">74.29% </span>
24
24
  <span class="quiet">Statements</span>
25
- <span class='fraction'>49/67</span>
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">73.13% </span>
38
+ <span class="strong">74.29% </span>
39
39
  <span class="quiet">Lines</span>
40
- <span class='fraction'>49/67</span>
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></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
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">&nbsp;</span>
221
227
  <span class="cline-any cline-yes">1x</span>
222
228
  <span class="cline-any cline-no">&nbsp;</span>
@@ -265,6 +271,7 @@
265
271
  <span class="cline-any cline-neutral">&nbsp;</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) =&gt; {
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
  &nbsp;
@@ -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 Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
388
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 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">73.13% </span>
23
+ <span class="strong">74.29% </span>
24
24
  <span class="quiet">Statements</span>
25
- <span class='fraction'>49/67</span>
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">73.13% </span>
38
+ <span class="strong">74.29% </span>
39
39
  <span class="quiet">Lines</span>
40
- <span class='fraction'>49/67</span>
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="73.13" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 73%;"></div><div class="cover-empty" style="width:27%;"></div></div></td>
67
- <td data-value="73.13" class="pct medium">73.13%</td>
68
- <td data-value="67" class="abs medium">49/67</td>
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="73.13" class="pct medium">73.13%</td>
74
- <td data-value="67" class="abs medium">49/67</td>
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 Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
83
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
84
84
  </div>
85
85
  </div>
86
86
  <script src="../../prettify.js"></script>
@@ -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 Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
83
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
84
84
  </div>
85
85
  </div>
86
86
  <script src="../../prettify.js"></script>
@@ -88,7 +88,7 @@ export default switchState;
88
88
  </div><!-- /wrapper -->
89
89
  <div class='footer quiet pad2 space-top1 center small'>
90
90
  Code coverage
91
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
91
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
92
92
  </div>
93
93
  </div>
94
94
  <script src="../../prettify.js"></script>
@@ -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 Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
83
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
84
84
  </div>
85
85
  </div>
86
86
  <script src="../../prettify.js"></script>
@@ -499,7 +499,7 @@ export default tabs;
499
499
  </div><!-- /wrapper -->
500
500
  <div class='footer quiet pad2 space-top1 center small'>
501
501
  Code coverage
502
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
502
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
503
503
  </div>
504
504
  </div>
505
505
  <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">27.69% </span>
23
+ <span class="strong">28.79% </span>
24
24
  <span class="quiet">Statements</span>
25
- <span class='fraction'>54/195</span>
25
+ <span class='fraction'>57/198</span>
26
26
  </div>
27
27
  <div class='fl pad1y space-right2'>
28
28
  <span class="strong">19.15% </span>
@@ -35,9 +35,9 @@
35
35
  <span class='fraction'>6/41</span>
36
36
  </div>
37
37
  <div class='fl pad1y space-right2'>
38
- <span class="strong">27.84% </span>
38
+ <span class="strong">28.93% </span>
39
39
  <span class="quiet">Lines</span>
40
- <span class='fraction'>54/194</span>
40
+ <span class='fraction'>57/197</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="components/accordion"><a href="components/accordion/index.html">components/accordion</a></td>
66
- <td data-value="73.13" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 73%;"></div><div class="cover-empty" style="width:27%;"></div></div></td>
67
- <td data-value="73.13" class="pct medium">73.13%</td>
68
- <td data-value="67" class="abs medium">49/67</td>
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="73.13" class="pct medium">73.13%</td>
74
- <td data-value="67" class="abs medium">49/67</td>
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
  <tr>
@@ -158,7 +158,7 @@
158
158
  </div><!-- /wrapper -->
159
159
  <div class='footer quiet pad2 space-top1 center small'>
160
160
  Code coverage
161
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
161
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
162
162
  </div>
163
163
  </div>
164
164
  <script src="prettify.js"></script>
@@ -88,7 +88,7 @@
88
88
  </div><!-- /wrapper -->
89
89
  <div class='footer quiet pad2 space-top1 center small'>
90
90
  Code coverage
91
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
91
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
92
92
  </div>
93
93
  </div>
94
94
  <script src="../prettify.js"></script>
@@ -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 Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
83
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
84
84
  </div>
85
85
  </div>
86
86
  <script src="../../prettify.js"></script>
@@ -124,7 +124,7 @@ export default switchStateScript;
124
124
  </div><!-- /wrapper -->
125
125
  <div class='footer quiet pad2 space-top1 center small'>
126
126
  Code coverage
127
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
127
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
128
128
  </div>
129
129
  </div>
130
130
  <script src="../../prettify.js"></script>
@@ -67,7 +67,7 @@
67
67
  </div><!-- /wrapper -->
68
68
  <div class='footer quiet pad2 space-top1 center small'>
69
69
  Code coverage
70
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
70
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
71
71
  </div>
72
72
  </div>
73
73
  <script src="../prettify.js"></script>
@@ -58,7 +58,7 @@ import './polyfills/closest';
58
58
  </div><!-- /wrapper -->
59
59
  <div class='footer quiet pad2 space-top1 center small'>
60
60
  Code coverage
61
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
61
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
62
62
  </div>
63
63
  </div>
64
64
  <script src="../prettify.js"></script>
@@ -119,7 +119,7 @@
119
119
  </div><!-- /wrapper -->
120
120
  <div class='footer quiet pad2 space-top1 center small'>
121
121
  Code coverage
122
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
122
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
123
123
  </div>
124
124
  </div>
125
125
  <script src="../prettify.js"></script>
@@ -106,7 +106,7 @@ import accordion from '../components/accordion/accordion';
106
106
  </div><!-- /wrapper -->
107
107
  <div class='footer quiet pad2 space-top1 center small'>
108
108
  Code coverage
109
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
109
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
110
110
  </div>
111
111
  </div>
112
112
  <script src="../prettify.js"></script>
@@ -100,7 +100,7 @@
100
100
  </div><!-- /wrapper -->
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage
103
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
103
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
104
104
  </div>
105
105
  </div>
106
106
  <script src="../../prettify.js"></script>
@@ -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 Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
83
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
84
84
  </div>
85
85
  </div>
86
86
  <script src="../../prettify.js"></script>
@@ -541,7 +541,7 @@ const config = <span class="cstat-no" title="statement not covered" >{</span>
541
541
  </div><!-- /wrapper -->
542
542
  <div class='footer quiet pad2 space-top1 center small'>
543
543
  Code coverage
544
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
544
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
545
545
  </div>
546
546
  </div>
547
547
  <script src="../prettify.js"></script>
@@ -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 Tue Nov 12 2019 14:31:49 GMT+0000 (GMT)
83
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Nov 21 2019 17:27:46 GMT+0000 (GMT)
84
84
  </div>
85
85
  </div>
86
86
  <script src="../prettify.js"></script>
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ plugins: ['cypress'],
3
+ env: {
4
+ "cypress/globals": true
5
+ },
6
+ rules: {
7
+ "import/no-extraneous-dependencies": 0,
8
+ // Cypress uses a .then mechanism to unwrap information, which is not really a promise
9
+ "promise/always-return": 0,
10
+ "promise/catch-or-return": 0
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "Using fixtures to represent data",
3
+ "email": "hello@cypress.io",
4
+ "body": "Fixtures are a great way to mock data for responses to routes"
5
+ }
@@ -0,0 +1,48 @@
1
+ // / <reference types="Cypress" />
2
+
3
+ context('Accordion', () => {
4
+ beforeEach(() => {
5
+ cy.visitComponent('accordion');
6
+ });
7
+
8
+ it('has no detectable a11y violations on load', () => {
9
+ cy.checkA11y('[data-test="accordion"]');
10
+ });
11
+
12
+ it('is closed by default', () => {
13
+ cy.get('[data-test="accordion-content"]').should('be.hidden');
14
+ });
15
+
16
+ it('becomes visible on click', () => {
17
+ cy.get('[data-test="accordion-trigger"]')
18
+ .not('.mds-display-none')
19
+ .click({ multiple: true });
20
+ cy.get('[data-test="accordion-content"]').should('be.visible');
21
+ });
22
+
23
+ it('has no detectable a11y violations after opening', () => {
24
+ cy.get('[data-test="accordion-trigger"]')
25
+ .not('.mds-display-none')
26
+ .click({ multiple: true });
27
+ cy.checkA11y('[data-test="accordion"]');
28
+ });
29
+
30
+ it('has the correct labelledby attributes', () => {
31
+ cy.get('[data-test="accordion-trigger"]')
32
+ .not('.mds-display-none')
33
+ .click({ multiple: true });
34
+ cy.get('[data-test="accordion-content"]').each((content) => {
35
+ const triggerId = content.attr('aria-labelledby');
36
+ if (triggerId) {
37
+ cy.get(`#${triggerId}`).should('exist');
38
+ }
39
+ });
40
+ });
41
+
42
+ it('has the correct controls attribute', () => {
43
+ cy.get('[data-test="accordion-trigger"] button').each((content) => {
44
+ const controlId = content.attr('aria-controls');
45
+ cy.get(`#${controlId}`).should('exist');
46
+ });
47
+ });
48
+ });
@@ -0,0 +1,9 @@
1
+ context('Button', () => {
2
+ beforeEach(() => {
3
+ cy.visitComponent('button');
4
+ });
5
+
6
+ it('has no detectable a11y violations on load', () => {
7
+ cy.checkA11y('[data-test="button"]');
8
+ });
9
+ });