@epa-wg/custom-element-dist 0.0.23 → 0.0.25
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/.storybook/main.ts +21 -21
- package/.vscode/settings.json +24 -0
- package/README.md +4 -4
- package/coverage/coverage-final.json +7 -5
- package/coverage/index.html +26 -26
- package/coverage/src/custom-element/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js.html +439 -379
- package/coverage/src/custom-element/http-request.js.html +12 -12
- package/coverage/src/custom-element/index.html +23 -23
- package/coverage/src/custom-element/local-storage.js.html +1 -1
- package/coverage/src/custom-element/location-element.js/coverage.svg +1 -1
- package/coverage/src/custom-element/location-element.js.html +116 -47
- package/coverage/src/index.html +1 -1
- package/coverage/src/mocks/handlers.ts.html +1 -1
- package/coverage/src/mocks/index.html +1 -1
- package/coverage/src/stories/attributes.test.stories.ts.html +1 -1
- package/coverage/src/stories/coverage.svg +1 -1
- package/coverage/src/stories/css.test.stories.ts.html +1 -1
- package/coverage/src/stories/dom-merge.test.stories.ts/coverage.svg +1 -1
- package/coverage/src/stories/dom-merge.test.stories.ts.html +238 -10
- package/coverage/src/stories/external-template.test.stories.ts.html +1 -1
- package/coverage/src/stories/form.test.stories.ts.html +1 -1
- package/coverage/src/stories/http-request.stories.ts.html +1 -1
- package/coverage/src/stories/index.html +46 -16
- package/coverage/src/stories/local-storage.test.stories.ts.html +1 -1
- package/coverage/src/stories/location-element.test.stories.ts.html +1 -1
- package/coverage/src/stories/set-url.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/set-url.test.stories.ts.html +427 -0
- package/coverage/src/stories/slice-events.test.stories.ts.html +1 -1
- package/coverage/src/stories/slots.test.stories.ts.html +1 -1
- package/coverage/src/stories/testStoryBook.ts.html +12 -12
- package/coverage/src/stories/version-select.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/version-select.test.stories.ts.html +313 -0
- package/coverage/src/sum.ts.html +1 -1
- package/dist/{custom-element-BISbI4SU.js → custom-element-DAe7uvIt.js} +187 -173
- package/dist/custom-element-DZvvhscI.cjs +53 -0
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +23 -22
- package/dist/location-element-DRB7hCwA.cjs +1 -0
- package/dist/location-element-FJlONi2n.js +65 -0
- package/package.json +2 -2
- package/src/custom-element/custom-element.js +25 -5
- package/src/custom-element/demo/form.html +2 -3
- package/src/custom-element/demo/location-element.html +17 -4
- package/src/custom-element/demo/s.xml +31 -6
- package/src/custom-element/demo/s.xslt +59 -22
- package/src/custom-element/demo/set-url.html +141 -0
- package/src/custom-element/ide/customData-dce.json +56 -0
- package/src/custom-element/ide/web-types-dce.json +153 -110
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/custom-element/index.html +1 -0
- package/src/custom-element/location-element.js +25 -2
- package/src/custom-element.test.ts +26 -26
- package/src/stories/dom-merge.test.stories.ts +76 -0
- package/src/stories/set-url.test.stories.ts +114 -0
- package/src/stories/version-select.test.stories.ts +76 -0
- package/storybook-static/assets/{Color-PRSJMWNM-BD_Ds9NW.js → Color-PRSJMWNM-CRSv4C7i.js} +1 -1
- package/storybook-static/assets/{Configure-70I_VApa.js → Configure-D0qG3gR9.js} +1 -1
- package/storybook-static/assets/{DocsRenderer-K4EAMTCU-9dn0-HCP.js → DocsRenderer-K4EAMTCU-CG_P5zRZ.js} +2 -2
- package/storybook-static/assets/{WithTooltip-KJL26V4Q-C6g5GOU9.js → WithTooltip-KJL26V4Q-CUqUi5E8.js} +1 -1
- package/storybook-static/assets/{attributes.test.stories-BEOraI4E.js → attributes.test.stories-W34tZdUt.js} +1 -1
- package/storybook-static/assets/{css.test.stories-D9WaxrEv.js → css.test.stories-BZFYx1TQ.js} +1 -1
- package/storybook-static/assets/{custom-element-BV8-hRQS.js → custom-element-DpIq8E2p.js} +79 -79
- package/storybook-static/assets/dom-merge.test.stories-S-7U5N3h.js +258 -0
- package/storybook-static/assets/{external-template.test.stories-Bpr_wxBo.js → external-template.test.stories-QIO3lAFz.js} +1 -1
- package/storybook-static/assets/{form.test.stories-3tURbEdv.js → form.test.stories-ClYhj9F1.js} +1 -1
- package/storybook-static/assets/{formatter-2WMMO6ZP-6IvBq34u.js → formatter-2WMMO6ZP-C-UiBIma.js} +1 -1
- package/storybook-static/assets/http-request-DNq59pnj.js +1 -0
- package/storybook-static/assets/{http-request.stories-8K_qSs8C.js → http-request.stories-DCqY5s2i.js} +9 -9
- package/storybook-static/assets/iframe-CURpvmVV.js +2 -0
- package/storybook-static/assets/{index-DhXZyjEd.js → index-CKw1EbdP.js} +1 -1
- package/storybook-static/assets/{index-B3oZkK3F.js → index-DYpTqTNu.js} +1 -1
- package/storybook-static/assets/{index-C30JwJMK.js → index-DsWii_Ep.js} +5 -5
- package/storybook-static/assets/{local-storage.test.stories-CtisAQBB.js → local-storage.test.stories-BqgYwqr-.js} +1 -1
- package/storybook-static/assets/location-element-hKpcXCdn.js +1 -0
- package/storybook-static/assets/{location-element.test.stories-5O_t_m4Y.js → location-element.test.stories-DvH1TWK4.js} +9 -9
- package/storybook-static/assets/{preview-D0eCfQft.js → preview-DjDbQHPa.js} +2 -2
- package/storybook-static/assets/set-url.test.stories-GlJOh31I.js +81 -0
- package/storybook-static/assets/{slice-events.test.stories-BSXCLIA5.js → slice-events.test.stories-VoNjuPCX.js} +1 -1
- package/storybook-static/assets/{slots.test.stories-B1vqfHmN.js → slots.test.stories-Da2j9YuO.js} +1 -1
- package/storybook-static/assets/{syntaxhighlighter-BP7B2CQK-DpPBKyTO.js → syntaxhighlighter-BP7B2CQK-CDpEe51g.js} +1 -1
- package/storybook-static/assets/version-select.test.stories-DLwf-TPB.js +60 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/.idea/.gitignore +0 -8
- package/dist/custom-element-N-sWiqGK.cjs +0 -53
- package/dist/location-element-2m0gWq_d.cjs +0 -1
- package/dist/location-element-nA_wsqBt.js +0 -49
- package/storybook-static/assets/dom-merge.test.stories-BhbNeum_.js +0 -137
- package/storybook-static/assets/iframe-zdt9kuj6.js +0 -2
- package/yarn.lock +0 -10242
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for src/stories/set-url.test.stories.ts</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/stories</a> set-url.test.stories.ts</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">33.33% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>12/36</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>3/3</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">28.57% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>2/7</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">32.35% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>11/34</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
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.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
+
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
+
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
+
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
+
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
+
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
+
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
+
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
+
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
+
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
+
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
+
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
+
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
+
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
+
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
+
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
+
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
+
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
|
+
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
|
+
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
+
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
+
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
+
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
+
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
+
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
+
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
|
+
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
|
+
<a name='L67'></a><a href='#L67'>67</a>
|
|
133
|
+
<a name='L68'></a><a href='#L68'>68</a>
|
|
134
|
+
<a name='L69'></a><a href='#L69'>69</a>
|
|
135
|
+
<a name='L70'></a><a href='#L70'>70</a>
|
|
136
|
+
<a name='L71'></a><a href='#L71'>71</a>
|
|
137
|
+
<a name='L72'></a><a href='#L72'>72</a>
|
|
138
|
+
<a name='L73'></a><a href='#L73'>73</a>
|
|
139
|
+
<a name='L74'></a><a href='#L74'>74</a>
|
|
140
|
+
<a name='L75'></a><a href='#L75'>75</a>
|
|
141
|
+
<a name='L76'></a><a href='#L76'>76</a>
|
|
142
|
+
<a name='L77'></a><a href='#L77'>77</a>
|
|
143
|
+
<a name='L78'></a><a href='#L78'>78</a>
|
|
144
|
+
<a name='L79'></a><a href='#L79'>79</a>
|
|
145
|
+
<a name='L80'></a><a href='#L80'>80</a>
|
|
146
|
+
<a name='L81'></a><a href='#L81'>81</a>
|
|
147
|
+
<a name='L82'></a><a href='#L82'>82</a>
|
|
148
|
+
<a name='L83'></a><a href='#L83'>83</a>
|
|
149
|
+
<a name='L84'></a><a href='#L84'>84</a>
|
|
150
|
+
<a name='L85'></a><a href='#L85'>85</a>
|
|
151
|
+
<a name='L86'></a><a href='#L86'>86</a>
|
|
152
|
+
<a name='L87'></a><a href='#L87'>87</a>
|
|
153
|
+
<a name='L88'></a><a href='#L88'>88</a>
|
|
154
|
+
<a name='L89'></a><a href='#L89'>89</a>
|
|
155
|
+
<a name='L90'></a><a href='#L90'>90</a>
|
|
156
|
+
<a name='L91'></a><a href='#L91'>91</a>
|
|
157
|
+
<a name='L92'></a><a href='#L92'>92</a>
|
|
158
|
+
<a name='L93'></a><a href='#L93'>93</a>
|
|
159
|
+
<a name='L94'></a><a href='#L94'>94</a>
|
|
160
|
+
<a name='L95'></a><a href='#L95'>95</a>
|
|
161
|
+
<a name='L96'></a><a href='#L96'>96</a>
|
|
162
|
+
<a name='L97'></a><a href='#L97'>97</a>
|
|
163
|
+
<a name='L98'></a><a href='#L98'>98</a>
|
|
164
|
+
<a name='L99'></a><a href='#L99'>99</a>
|
|
165
|
+
<a name='L100'></a><a href='#L100'>100</a>
|
|
166
|
+
<a name='L101'></a><a href='#L101'>101</a>
|
|
167
|
+
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
|
+
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
|
+
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
|
+
<a name='L105'></a><a href='#L105'>105</a>
|
|
171
|
+
<a name='L106'></a><a href='#L106'>106</a>
|
|
172
|
+
<a name='L107'></a><a href='#L107'>107</a>
|
|
173
|
+
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
|
+
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
|
+
<a name='L110'></a><a href='#L110'>110</a>
|
|
176
|
+
<a name='L111'></a><a href='#L111'>111</a>
|
|
177
|
+
<a name='L112'></a><a href='#L112'>112</a>
|
|
178
|
+
<a name='L113'></a><a href='#L113'>113</a>
|
|
179
|
+
<a name='L114'></a><a href='#L114'>114</a>
|
|
180
|
+
<a name='L115'></a><a href='#L115'>115</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
181
|
+
<span class="cline-any cline-neutral"> </span>
|
|
182
|
+
<span class="cline-any cline-neutral"> </span>
|
|
183
|
+
<span class="cline-any cline-neutral"> </span>
|
|
184
|
+
<span class="cline-any cline-neutral"> </span>
|
|
185
|
+
<span class="cline-any cline-neutral"> </span>
|
|
186
|
+
<span class="cline-any cline-neutral"> </span>
|
|
187
|
+
<span class="cline-any cline-neutral"> </span>
|
|
188
|
+
<span class="cline-any cline-neutral"> </span>
|
|
189
|
+
<span class="cline-any cline-neutral"> </span>
|
|
190
|
+
<span class="cline-any cline-yes">1x</span>
|
|
191
|
+
<span class="cline-any cline-neutral"> </span>
|
|
192
|
+
<span class="cline-any cline-neutral"> </span>
|
|
193
|
+
<span class="cline-any cline-neutral"> </span>
|
|
194
|
+
<span class="cline-any cline-neutral"> </span>
|
|
195
|
+
<span class="cline-any cline-neutral"> </span>
|
|
196
|
+
<span class="cline-any cline-neutral"> </span>
|
|
197
|
+
<span class="cline-any cline-neutral"> </span>
|
|
198
|
+
<span class="cline-any cline-neutral"> </span>
|
|
199
|
+
<span class="cline-any cline-neutral"> </span>
|
|
200
|
+
<span class="cline-any cline-no"> </span>
|
|
201
|
+
<span class="cline-any cline-neutral"> </span>
|
|
202
|
+
<span class="cline-any cline-neutral"> </span>
|
|
203
|
+
<span class="cline-any cline-neutral"> </span>
|
|
204
|
+
<span class="cline-any cline-yes">2x</span>
|
|
205
|
+
<span class="cline-any cline-yes">2x</span>
|
|
206
|
+
<span class="cline-any cline-neutral"> </span>
|
|
207
|
+
<span class="cline-any cline-neutral"> </span>
|
|
208
|
+
<span class="cline-any cline-neutral"> </span>
|
|
209
|
+
<span class="cline-any cline-neutral"> </span>
|
|
210
|
+
<span class="cline-any cline-neutral"> </span>
|
|
211
|
+
<span class="cline-any cline-neutral"> </span>
|
|
212
|
+
<span class="cline-any cline-neutral"> </span>
|
|
213
|
+
<span class="cline-any cline-neutral"> </span>
|
|
214
|
+
<span class="cline-any cline-neutral"> </span>
|
|
215
|
+
<span class="cline-any cline-neutral"> </span>
|
|
216
|
+
<span class="cline-any cline-neutral"> </span>
|
|
217
|
+
<span class="cline-any cline-neutral"> </span>
|
|
218
|
+
<span class="cline-any cline-neutral"> </span>
|
|
219
|
+
<span class="cline-any cline-neutral"> </span>
|
|
220
|
+
<span class="cline-any cline-neutral"> </span>
|
|
221
|
+
<span class="cline-any cline-yes">1x</span>
|
|
222
|
+
<span class="cline-any cline-neutral"> </span>
|
|
223
|
+
<span class="cline-any cline-neutral"> </span>
|
|
224
|
+
<span class="cline-any cline-neutral"> </span>
|
|
225
|
+
<span class="cline-any cline-neutral"> </span>
|
|
226
|
+
<span class="cline-any cline-neutral"> </span>
|
|
227
|
+
<span class="cline-any cline-neutral"> </span>
|
|
228
|
+
<span class="cline-any cline-neutral"> </span>
|
|
229
|
+
<span class="cline-any cline-yes">1x</span>
|
|
230
|
+
<span class="cline-any cline-neutral"> </span>
|
|
231
|
+
<span class="cline-any cline-neutral"> </span>
|
|
232
|
+
<span class="cline-any cline-neutral"> </span>
|
|
233
|
+
<span class="cline-any cline-neutral"> </span>
|
|
234
|
+
<span class="cline-any cline-neutral"> </span>
|
|
235
|
+
<span class="cline-any cline-neutral"> </span>
|
|
236
|
+
<span class="cline-any cline-neutral"> </span>
|
|
237
|
+
<span class="cline-any cline-no"> </span>
|
|
238
|
+
<span class="cline-any cline-no"> </span>
|
|
239
|
+
<span class="cline-any cline-no"> </span>
|
|
240
|
+
<span class="cline-any cline-no"> </span>
|
|
241
|
+
<span class="cline-any cline-no"> </span>
|
|
242
|
+
<span class="cline-any cline-no"> </span>
|
|
243
|
+
<span class="cline-any cline-no"> </span>
|
|
244
|
+
<span class="cline-any cline-no"> </span>
|
|
245
|
+
<span class="cline-any cline-neutral"> </span>
|
|
246
|
+
<span class="cline-any cline-neutral"> </span>
|
|
247
|
+
<span class="cline-any cline-neutral"> </span>
|
|
248
|
+
<span class="cline-any cline-yes">1x</span>
|
|
249
|
+
<span class="cline-any cline-neutral"> </span>
|
|
250
|
+
<span class="cline-any cline-neutral"> </span>
|
|
251
|
+
<span class="cline-any cline-neutral"> </span>
|
|
252
|
+
<span class="cline-any cline-neutral"> </span>
|
|
253
|
+
<span class="cline-any cline-neutral"> </span>
|
|
254
|
+
<span class="cline-any cline-neutral"> </span>
|
|
255
|
+
<span class="cline-any cline-neutral"> </span>
|
|
256
|
+
<span class="cline-any cline-neutral"> </span>
|
|
257
|
+
<span class="cline-any cline-neutral"> </span>
|
|
258
|
+
<span class="cline-any cline-neutral"> </span>
|
|
259
|
+
<span class="cline-any cline-neutral"> </span>
|
|
260
|
+
<span class="cline-any cline-neutral"> </span>
|
|
261
|
+
<span class="cline-any cline-neutral"> </span>
|
|
262
|
+
<span class="cline-any cline-neutral"> </span>
|
|
263
|
+
<span class="cline-any cline-no"> </span>
|
|
264
|
+
<span class="cline-any cline-no"> </span>
|
|
265
|
+
<span class="cline-any cline-no"> </span>
|
|
266
|
+
<span class="cline-any cline-neutral"> </span>
|
|
267
|
+
<span class="cline-any cline-neutral"> </span>
|
|
268
|
+
<span class="cline-any cline-no"> </span>
|
|
269
|
+
<span class="cline-any cline-no"> </span>
|
|
270
|
+
<span class="cline-any cline-no"> </span>
|
|
271
|
+
<span class="cline-any cline-no"> </span>
|
|
272
|
+
<span class="cline-any cline-no"> </span>
|
|
273
|
+
<span class="cline-any cline-neutral"> </span>
|
|
274
|
+
<span class="cline-any cline-neutral"> </span>
|
|
275
|
+
<span class="cline-any cline-no"> </span>
|
|
276
|
+
<span class="cline-any cline-no"> </span>
|
|
277
|
+
<span class="cline-any cline-no"> </span>
|
|
278
|
+
<span class="cline-any cline-no"> </span>
|
|
279
|
+
<span class="cline-any cline-no"> </span>
|
|
280
|
+
<span class="cline-any cline-no"> </span>
|
|
281
|
+
<span class="cline-any cline-neutral"> </span>
|
|
282
|
+
<span class="cline-any cline-neutral"> </span>
|
|
283
|
+
<span class="cline-any cline-neutral"> </span>
|
|
284
|
+
<span class="cline-any cline-neutral"> </span>
|
|
285
|
+
<span class="cline-any cline-neutral"> </span>
|
|
286
|
+
<span class="cline-any cline-neutral"> </span>
|
|
287
|
+
<span class="cline-any cline-yes">1x</span>
|
|
288
|
+
<span class="cline-any cline-neutral"> </span>
|
|
289
|
+
<span class="cline-any cline-yes">1x</span>
|
|
290
|
+
<span class="cline-any cline-yes">1x</span>
|
|
291
|
+
<span class="cline-any cline-yes">1x</span>
|
|
292
|
+
<span class="cline-any cline-yes">1x</span>
|
|
293
|
+
<span class="cline-any cline-neutral"> </span>
|
|
294
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">// noinspection DuplicatedCode
|
|
295
|
+
|
|
296
|
+
import type {StoryObj} from '@storybook/web-components';
|
|
297
|
+
import {expect, getByTestId, userEvent, within} from '@storybook/test';
|
|
298
|
+
|
|
299
|
+
import '../custom-element/custom-element.js';
|
|
300
|
+
import '../custom-element/location-element.js';
|
|
301
|
+
|
|
302
|
+
type TProps = { title: string; slice: string; href: string; live: string; body: string };
|
|
303
|
+
const defs: TProps =
|
|
304
|
+
{
|
|
305
|
+
title: ''
|
|
306
|
+
, slice: 'url-slice'
|
|
307
|
+
, href: ''
|
|
308
|
+
, live: ''
|
|
309
|
+
, body: ``
|
|
310
|
+
};
|
|
311
|
+
type Story = StoryObj<TProps>;
|
|
312
|
+
|
|
313
|
+
function <span class="fstat-no" title="function not covered" >sleep(m</span>s: number) {
|
|
314
|
+
<span class="cstat-no" title="statement not covered" > return new Promise(<span class="fstat-no" title="function not covered" >(r</span>esolve) => <span class="cstat-no" title="statement not covered" >setTimeout(resolve, ms))</span>;</span>
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
function render(args: TProps) {
|
|
318
|
+
const {title, body} = {...defs, ...args};
|
|
319
|
+
return `
|
|
320
|
+
<fieldset>
|
|
321
|
+
<legend>${title}</legend>
|
|
322
|
+
|
|
323
|
+
<custom-element>
|
|
324
|
+
<template><!-- wrapping into template to prevent images loading within DCE declaration -->
|
|
325
|
+
|
|
326
|
+
${body}
|
|
327
|
+
|
|
328
|
+
</template>
|
|
329
|
+
</custom-element>
|
|
330
|
+
</fieldset>
|
|
331
|
+
`;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const meta =
|
|
335
|
+
{
|
|
336
|
+
title: 'location-element set URL'
|
|
337
|
+
, render
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
export default meta;
|
|
341
|
+
|
|
342
|
+
export const DynamicSrc: Story =
|
|
343
|
+
{
|
|
344
|
+
args: {
|
|
345
|
+
title: '1. Set the page URL by location.hash', body: `
|
|
346
|
+
<button value="#dce1" slice="set-button" slice-event="click">#dce1</button>
|
|
347
|
+
<button value="#dce2" slice="set-button" slice-event="click">#dce2</button>
|
|
348
|
+
<location-element method="location.href" src="{//set-button/@value}"></location-element>`
|
|
349
|
+
}
|
|
350
|
+
, play: <span class="fstat-no" title="function not covered" >async ({</span>canvasElement}) => {
|
|
351
|
+
const canvas = <span class="cstat-no" title="statement not covered" >within(canvasElement);</span>
|
|
352
|
+
<span class="cstat-no" title="statement not covered" > await canvas.findByText(DynamicSrc.args!.title as string);</span>
|
|
353
|
+
<span class="cstat-no" title="statement not covered" > await userEvent.click(canvas.getByText('#dce1'));</span>
|
|
354
|
+
<span class="cstat-no" title="statement not covered" > await sleep(1);</span>
|
|
355
|
+
<span class="cstat-no" title="statement not covered" > await expect(window.location.hash).toEqual('#dce1')</span>
|
|
356
|
+
<span class="cstat-no" title="statement not covered" > await userEvent.click(canvas.getByText('#dce2'));</span>
|
|
357
|
+
<span class="cstat-no" title="statement not covered" > await sleep(1);</span>
|
|
358
|
+
<span class="cstat-no" title="statement not covered" > await expect(window.location.hash).toEqual('#dce2')</span>
|
|
359
|
+
},
|
|
360
|
+
};
|
|
361
|
+
export const DynamicMethod: Story =
|
|
362
|
+
{
|
|
363
|
+
args: {
|
|
364
|
+
title: '2. Set the page URL by method', body: `
|
|
365
|
+
<style>
|
|
366
|
+
button{ display: block; width: 100%; }
|
|
367
|
+
</style>
|
|
368
|
+
<button value="location.href" slice="set-button" slice-event="click"> location.href </button>
|
|
369
|
+
<button value="location.hash" slice="set-button" slice-event="click"> location.hash </button>
|
|
370
|
+
<button value="location.assign" slice="set-button" slice-event="click"> location.assign </button>
|
|
371
|
+
<button value="location.replace" slice="set-button" slice-event="click"> location.replace </button>
|
|
372
|
+
<button value="history.pushState" slice="set-button" slice-event="click"> history.pushState </button>
|
|
373
|
+
<button value="history.replaceState" slice="set-button" slice-event="click"> history.replaceState </button>
|
|
374
|
+
<location-element method="{//set-button/@value}" ></location-element>`
|
|
375
|
+
}
|
|
376
|
+
, play: <span class="fstat-no" title="function not covered" >async ({</span>canvasElement}) => {
|
|
377
|
+
const canvas = <span class="cstat-no" title="statement not covered" >within(canvasElement);</span>
|
|
378
|
+
const le = <span class="cstat-no" title="statement not covered" >canvasElement.querySelector('location-element');</span>
|
|
379
|
+
<span class="cstat-no" title="statement not covered" > await canvas.findByText(DynamicMethod.args!.title as string);</span>
|
|
380
|
+
|
|
381
|
+
async function <span class="fstat-no" title="function not covered" >testHash(h</span>ash, text) {
|
|
382
|
+
<span class="cstat-no" title="statement not covered" > le.setAttribute('method', ''); // to prevent immediate URL change</span>
|
|
383
|
+
<span class="cstat-no" title="statement not covered" > le.setAttribute('src', hash);</span>
|
|
384
|
+
<span class="cstat-no" title="statement not covered" > await userEvent.click(canvas.getByText(text));</span>
|
|
385
|
+
<span class="cstat-no" title="statement not covered" > await sleep(1);</span>
|
|
386
|
+
<span class="cstat-no" title="statement not covered" > await expect(window.location.hash).toEqual(hash)</span>
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
<span class="cstat-no" title="statement not covered" > await testHash('#byHash', 'location.hash');</span>
|
|
390
|
+
<span class="cstat-no" title="statement not covered" > await testHash('#byhref', 'location.href');</span>
|
|
391
|
+
<span class="cstat-no" title="statement not covered" > await testHash('#byassign', 'location.assign');</span>
|
|
392
|
+
<span class="cstat-no" title="statement not covered" > await testHash('#byreplace', 'location.replace');</span>
|
|
393
|
+
<span class="cstat-no" title="statement not covered" > await testHash('#by.history.pushState', 'history.pushState');</span>
|
|
394
|
+
<span class="cstat-no" title="statement not covered" > await testHash('#by.history.replaceState', 'history.replaceState');</span>
|
|
395
|
+
|
|
396
|
+
},
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
/* istanbul ignore else -- @preserve */
|
|
401
|
+
if ('test' === import.meta.env.MODE &&
|
|
402
|
+
!import.meta.url.includes('skiptest')) {
|
|
403
|
+
const mod = await import('./set-url.test.stories.ts?skiptest');
|
|
404
|
+
const {testStoryBook} = await import('./testStoryBook')
|
|
405
|
+
const {describe} = await import('vitest')
|
|
406
|
+
describe(meta.title, () => testStoryBook(mod, meta));
|
|
407
|
+
}
|
|
408
|
+
</pre></td></tr></table></pre>
|
|
409
|
+
|
|
410
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
411
|
+
</div><!-- /wrapper -->
|
|
412
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
413
|
+
Code coverage generated by
|
|
414
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
415
|
+
at 2024-08-06T07:29:06.502Z
|
|
416
|
+
</div>
|
|
417
|
+
<script src="../../prettify.js"></script>
|
|
418
|
+
<script>
|
|
419
|
+
window.onload = function () {
|
|
420
|
+
prettyPrint();
|
|
421
|
+
};
|
|
422
|
+
</script>
|
|
423
|
+
<script src="../../sorter.js"></script>
|
|
424
|
+
<script src="../../block-navigation.js"></script>
|
|
425
|
+
</body>
|
|
426
|
+
</html>
|
|
427
|
+
|
|
@@ -670,7 +670,7 @@ if( 'test' === import.meta.env.MODE &&
|
|
|
670
670
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
671
671
|
Code coverage generated by
|
|
672
672
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
673
|
-
at 2024-
|
|
673
|
+
at 2024-08-06T07:29:06.502Z
|
|
674
674
|
</div>
|
|
675
675
|
<script src="../../prettify.js"></script>
|
|
676
676
|
<script>
|
|
@@ -721,7 +721,7 @@ if( 'test' === import.meta.env.MODE &&
|
|
|
721
721
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
722
722
|
Code coverage generated by
|
|
723
723
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
724
|
-
at 2024-
|
|
724
|
+
at 2024-08-06T07:29:06.502Z
|
|
725
725
|
</div>
|
|
726
726
|
<script src="../../prettify.js"></script>
|
|
727
727
|
<script>
|
|
@@ -96,28 +96,28 @@
|
|
|
96
96
|
<span class="cline-any cline-neutral"> </span>
|
|
97
97
|
<span class="cline-any cline-neutral"> </span>
|
|
98
98
|
<span class="cline-any cline-neutral"> </span>
|
|
99
|
-
<span class="cline-any cline-yes">
|
|
100
|
-
<span class="cline-any cline-yes">
|
|
99
|
+
<span class="cline-any cline-yes">50x</span>
|
|
100
|
+
<span class="cline-any cline-yes">50x</span>
|
|
101
101
|
<span class="cline-any cline-neutral"> </span>
|
|
102
|
-
<span class="cline-any cline-yes">
|
|
103
|
-
<span class="cline-any cline-yes">
|
|
102
|
+
<span class="cline-any cline-yes">50x</span>
|
|
103
|
+
<span class="cline-any cline-yes">50x</span>
|
|
104
104
|
<span class="cline-any cline-neutral"> </span>
|
|
105
105
|
<span class="cline-any cline-neutral"> </span>
|
|
106
106
|
<span class="cline-any cline-neutral"> </span>
|
|
107
107
|
<span class="cline-any cline-neutral"> </span>
|
|
108
108
|
<span class="cline-any cline-neutral"> </span>
|
|
109
|
-
<span class="cline-any cline-yes">
|
|
109
|
+
<span class="cline-any cline-yes">11x</span>
|
|
110
110
|
<span class="cline-any cline-neutral"> </span>
|
|
111
111
|
<span class="cline-any cline-neutral"> </span>
|
|
112
|
-
<span class="cline-any cline-yes">
|
|
112
|
+
<span class="cline-any cline-yes">11x</span>
|
|
113
113
|
<span class="cline-any cline-neutral"> </span>
|
|
114
|
-
<span class="cline-any cline-yes">
|
|
115
|
-
<span class="cline-any cline-yes">
|
|
116
|
-
<span class="cline-any cline-yes">
|
|
117
|
-
<span class="cline-any cline-yes">
|
|
114
|
+
<span class="cline-any cline-yes">61x</span>
|
|
115
|
+
<span class="cline-any cline-yes">61x</span>
|
|
116
|
+
<span class="cline-any cline-yes">11x</span>
|
|
117
|
+
<span class="cline-any cline-yes">50x</span>
|
|
118
118
|
<span class="cline-any cline-neutral"> </span>
|
|
119
119
|
<span class="cline-any cline-neutral"> </span>
|
|
120
|
-
<span class="cline-any cline-yes">
|
|
120
|
+
<span class="cline-any cline-yes">11x</span>
|
|
121
121
|
<span class="cline-any cline-neutral"> </span>
|
|
122
122
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import type {StoryObj, Meta} from '@storybook/web-components';
|
|
123
123
|
import {it} from 'vitest';
|
|
@@ -154,7 +154,7 @@ export async function testStoryBook<TProps>( mod: Record<string, StoryO
|
|
|
154
154
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
155
155
|
Code coverage generated by
|
|
156
156
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
157
|
-
at 2024-
|
|
157
|
+
at 2024-08-06T07:29:06.502Z
|
|
158
158
|
</div>
|
|
159
159
|
<script src="../../prettify.js"></script>
|
|
160
160
|
<script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg viewBox="0 0 140 32" height="20px" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<style>
|
|
3
|
+
.heavy { font: bold 16px sans-serif; fill:white; }
|
|
4
|
+
.percent { font: bold 16px monotype; fill: white; }
|
|
5
|
+
</style>
|
|
6
|
+
<rect width="140" height="32" fill="#473" rx="4"/>
|
|
7
|
+
<rect width="88" height="32" fill="#534" rx="4"/>
|
|
8
|
+
<text x="8" y="21" class="heavy">coverage</text>
|
|
9
|
+
<text x="94" y="22" class="percent">33.33%</text>
|
|
10
|
+
</svg>
|