nodeskini 1.0.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/README.md +31 -0
- package/client/archive/bundle.js +11528 -0
- package/client/archive/golem.html +60 -0
- package/client/archive/golemClient.js +595 -0
- package/client/archive/golembundle.js +11634 -0
- package/client/archive/sequencer.html +43 -0
- package/client/archive/sequenceurClient.js +815 -0
- package/client/archive/stylegolem.css +158 -0
- package/client/archive/stylesequenceur.css +204 -0
- package/client/clientListe/Sortable-master/.circleci/config.yml +33 -0
- package/client/clientListe/Sortable-master/.editorconfig +15 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/bug-report.md +73 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/custom-template.md +48 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/feature-request.md +41 -0
- package/client/clientListe/Sortable-master/.jshintrc +25 -0
- package/client/clientListe/Sortable-master/.testcaferc.json +7 -0
- package/client/clientListe/Sortable-master/CONTRIBUTING.md +26 -0
- package/client/clientListe/Sortable-master/LICENSE +21 -0
- package/client/clientListe/Sortable-master/README.md +813 -0
- package/client/clientListe/Sortable-master/Sortable.js +3709 -0
- package/client/clientListe/Sortable-master/Sortable.min.js +2 -0
- package/client/clientListe/Sortable-master/Sortable.min.old.js +2 -0
- package/client/clientListe/Sortable-master/Sortable.min.old.old.js +2 -0
- package/client/clientListe/Sortable-master/babel.config.js +27 -0
- package/client/clientListe/Sortable-master/bower.json +30 -0
- package/client/clientListe/Sortable-master/entry/entry-complete.js +8 -0
- package/client/clientListe/Sortable-master/entry/entry-core.js +19 -0
- package/client/clientListe/Sortable-master/entry/entry-defaults.js +19 -0
- package/client/clientListe/Sortable-master/index.html +460 -0
- package/client/clientListe/Sortable-master/modular/sortable.complete.esm.js +3701 -0
- package/client/clientListe/Sortable-master/modular/sortable.core.esm.js +3698 -0
- package/client/clientListe/Sortable-master/modular/sortable.esm.js +3699 -0
- package/client/clientListe/Sortable-master/package-lock.json +5704 -0
- package/client/clientListe/Sortable-master/package.json +56 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/AutoScroll.js +270 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/README.md +80 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/MultiDrag.js +617 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/README.md +96 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/OnSpill.js +79 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/README.md +60 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/README.md +178 -0
- package/client/clientListe/Sortable-master/plugins/Swap/README.md +55 -0
- package/client/clientListe/Sortable-master/plugins/Swap/Swap.js +90 -0
- package/client/clientListe/Sortable-master/plugins/Swap/index.js +1 -0
- package/client/clientListe/Sortable-master/scripts/banner.js +8 -0
- package/client/clientListe/Sortable-master/scripts/build.js +17 -0
- package/client/clientListe/Sortable-master/scripts/esm-build.js +28 -0
- package/client/clientListe/Sortable-master/scripts/minify.js +11 -0
- package/client/clientListe/Sortable-master/scripts/test-compat.js +30 -0
- package/client/clientListe/Sortable-master/scripts/test.js +21 -0
- package/client/clientListe/Sortable-master/scripts/umd-build.js +15 -0
- package/client/clientListe/Sortable-master/src/Animation.js +175 -0
- package/client/clientListe/Sortable-master/src/BrowserInfo.js +12 -0
- package/client/clientListe/Sortable-master/src/EventDispatcher.js +57 -0
- package/client/clientListe/Sortable-master/src/PluginManager.js +87 -0
- package/client/clientListe/Sortable-master/src/Sortable.js +1971 -0
- package/client/clientListe/Sortable-master/src/utils.js +556 -0
- package/client/clientListe/Sortable-master/st/app.js +224 -0
- package/client/clientListe/Sortable-master/st/iframe/frame.html +32 -0
- package/client/clientListe/Sortable-master/st/iframe/index.html +49 -0
- package/client/clientListe/Sortable-master/st/logo.png +0 -0
- package/client/clientListe/Sortable-master/st/og-image.png +0 -0
- package/client/clientListe/Sortable-master/st/prettify/prettify.css +1 -0
- package/client/clientListe/Sortable-master/st/prettify/prettify.js +46 -0
- package/client/clientListe/Sortable-master/st/prettify/run_prettify.js +64 -0
- package/client/clientListe/Sortable-master/st/saucelabs.svg +1 -0
- package/client/clientListe/Sortable-master/st/theme.css +254 -0
- package/client/clientListe/Sortable-master/tests/Sortable.compat.test.js +39 -0
- package/client/clientListe/Sortable-master/tests/Sortable.test.js +386 -0
- package/client/clientListe/Sortable-master/tests/dual-list.html +34 -0
- package/client/clientListe/Sortable-master/tests/empty-list.html +30 -0
- package/client/clientListe/Sortable-master/tests/filter.html +27 -0
- package/client/clientListe/Sortable-master/tests/handles.html +27 -0
- package/client/clientListe/Sortable-master/tests/nested.html +67 -0
- package/client/clientListe/Sortable-master/tests/single-list.html +25 -0
- package/client/clientListe/Sortable-master/tests/style.css +18 -0
- package/client/clientListe/clientListe.html +148 -0
- package/client/clientListe/clientListe.js +1508 -0
- package/client/clientListe/clientListebundle.js +13164 -0
- package/client/clientListe/images/poubelle.png +0 -0
- package/client/clientListe/images/start.png +0 -0
- package/client/clientListe/images/stop.png +0 -0
- package/client/clientListe/images/submit.png +0 -0
- package/client/clientListe/sortable-theme-bootstrap.css +90 -0
- package/client/configurateur/configReact.js +273 -0
- package/client/configurateur/configReactbundle.js +295 -0
- package/client/configurateur/configurateur.css +95 -0
- package/client/configurateur/configurateur.html +48 -0
- package/client/configurateur/lib/jexcel.css +755 -0
- package/client/configurateur/lib/jexcel.js +14970 -0
- package/client/configurateur/lib/jsuites.css +2801 -0
- package/client/configurateur/lib/jsuites.js +11822 -0
- package/client/configurateur/lib/react-dom.production.min.js +239 -0
- package/client/configurateur/lib/react.production.min.js +32 -0
- package/client/configurateur/src/configReact.js +247 -0
- package/client/controleur/clientcontroleur.js +536 -0
- package/client/controleur/clientcontroleur.test.js +282 -0
- package/client/controleur/controleur.html +51 -0
- package/client/controleur/controleurbundle.js +565 -0
- package/client/controleur/stylecontroleur.css +236 -0
- package/client/controleurHH/controleurHH.html +71 -0
- package/client/controleurHH/controleurHH.js +252 -0
- package/client/controleurHH/styles/index.css +320 -0
- package/client/controleurHH/styles/material.css +11552 -0
- package/client/parametrage/paramReact.js +473 -0
- package/client/parametrage/paramReactbundle.js +500 -0
- package/client/parametrage/parametrage.css +111 -0
- package/client/parametrage/parametrage.html +163 -0
- package/client/parametrage/src/paramReact.js +459 -0
- package/client/score/hash.js +83 -0
- package/client/score/p5.min.js +3 -0
- package/client/score/parto1.js +1171 -0
- package/client/score/parto1bundle.js +1181 -0
- package/client/score/processing.min.js +431 -0
- package/client/score/score.html +15 -0
- package/client/score/score.js +34 -0
- package/client/simulateurListe/simulateurFork.js +750 -0
- package/client/simulateurListe/simulateurFork.mjs +681 -0
- package/client/simulateurListe/simulateurForkSansReorg.js +569 -0
- package/client/simulateurListe/simulateurListe.js +628 -0
- package/myReact/archive/Nodeemitvaluedlocal1.hh.js +52 -0
- package/myReact/archive/abort-parNode.js +79 -0
- package/myReact/archive/abroNode.js +169 -0
- package/myReact/archive/abroNode2.js +80 -0
- package/myReact/archive/atom.compile.hh.js +51 -0
- package/myReact/archive/await-countNode.js +67 -0
- package/myReact/archive/await-nowvalNode.js +44 -0
- package/myReact/archive/callHH.js +96 -0
- package/myReact/archive/emit-if2.hh.compiled.js +113 -0
- package/myReact/archive/every1Node.js +35 -0
- package/myReact/archive/if-runNode.js +74 -0
- package/myReact/archive/if1Node.js +43 -0
- package/myReact/archive/makeawait.js +0 -0
- package/myReact/archive/myReact.old.js +684 -0
- package/myReact/archive/orchestration.js +281 -0
- package/myReact/archive/orchestration1.js +132 -0
- package/myReact/archive/orchestration1.xml +465 -0
- package/myReact/archive/orchestration2.js +161 -0
- package/myReact/archive/orchestrationHH.mano.js +280 -0
- package/myReact/archive/orchestrationHHTest.js +428 -0
- package/myReact/archive/orchestrationHHTest.xml +234 -0
- package/myReact/archive/orchestrationHHTestRun.js +104 -0
- package/myReact/archive/orchestrationHHTestRun.xml +34 -0
- package/myReact/archive/orchestrationTest0.js +178 -0
- package/myReact/archive/orchestrationTest1.js +181 -0
- package/myReact/archive/orchestrationTest2.js +281 -0
- package/myReact/archive/run3pointsNode.js +59 -0
- package/myReact/archive/runNode.js +123 -0
- package/myReact/archive/runNode2.js +91 -0
- package/myReact/archive/testAwait1.js +141 -0
- package/myReact/archive/testAwait1.xml +86 -0
- package/myReact/archive/testEvery1.js +122 -0
- package/myReact/archive/testEvery1.xml +79 -0
- package/myReact/archive/testHH1.js +135 -0
- package/myReact/archive/testHH1.xml +86 -0
- package/myReact/archive/testHH1revu.js +104 -0
- package/myReact/archive/testHH2.js +122 -0
- package/myReact/archive/testHH2.xml +79 -0
- package/myReact/archive/testHH3.js +130 -0
- package/myReact/archive/testHH3.xml +86 -0
- package/myReact/archive/testHHabort.js +121 -0
- package/myReact/archive/testHHabort.xml +83 -0
- package/myReact/archive/testMakeawait.js +202 -0
- package/myReact/archive/testRun1.js +168 -0
- package/myReact/archive/testRun1.xml +142 -0
- package/myReact/archive/titi.js +28 -0
- package/myReact/archive/titi.xml +110 -0
- package/myReact/archive/toto.js +73 -0
- package/myReact/archive/toto.xml +198 -0
- package/myReact/archive/trap-await-parallelNode.js +123 -0
- package/myReact/inutiles/hiver2022.xml +804 -0
- package/myReact/inutiles/hopeNode.xml +459 -0
- package/myReact/inutiles/mars2022.xml +871 -0
- package/myReact/inutiles/mystique1.xml +318 -0
- package/myReact/inutiles/mystiqueOSC.xml +277 -0
- package/myReact/inutiles/opus5Node.xml +1271 -0
- package/myReact/inutiles/opus5NodeLinux.xml +1241 -0
- package/myReact/inutiles/orchestrationHH.xml +541 -0
- package/myReact/inutiles/orchestrationHH2.xml +547 -0
- package/myReact/inutiles/testHH.xml +95 -0
- package/myReact/inutiles/trouveLaPercuTenor.xml +349 -0
- package/myReact/myReact.js +744 -0
- package/myReact/myReact.min.js +1 -0
- package/myReact/orchestrationHH.js +311 -0
- package/myReact/orchestrationHH.mjs +436 -0
- package/myReact/orchestrationHH.mjs.map +1 -0
- package/package.json +46 -0
- package/serveur/OSCandMidi.mjs +361 -0
- package/serveur/computeScore.mjs +415 -0
- package/serveur/controleDAW.mjs +1149 -0
- package/serveur/defaultSession.csv +2 -0
- package/serveur/defaultSkiniParametres.js +119 -0
- package/serveur/gameOSC.mjs +96 -0
- package/serveur/groupeClientsSons.mjs +1014 -0
- package/serveur/ipConfig.json +24 -0
- package/serveur/ipConfig127.json +19 -0
- package/serveur/ipConfig75.json +17 -0
- package/serveur/ipConfigBH.json +19 -0
- package/serveur/ipConfigLocal.json +19 -0
- package/serveur/midiConfig.json +26 -0
- package/serveur/midiConfigBH.json +26 -0
- package/serveur/midiConfigVoid.json +3 -0
- package/serveur/midimix.mjs +570 -0
- package/serveur/saveParam.mjs +159 -0
- package/serveur/skiniParametres.good.js +132 -0
- package/serveur/skiniParametres.js +106 -0
- package/serveur/utilsHHSkini.hh.js +64 -0
- package/serveur/utilsSkini.mjs +137 -0
- package/serveur/websocketServer.mjs +2052 -0
- package/serveur/workerInterfaceZ.mjs +327 -0
- package/serveur/workerSynchro.mjs +49 -0
- package/skini.mjs +141 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
body {
|
|
2
|
+
font-family: Helvetica Neue, Helvetica, Arial;
|
|
3
|
+
background: rgb(244,215,201); /* Old browsers */
|
|
4
|
+
background: -moz-linear-gradient(top, rgb(244,215,201) 0%, rgb(244,226,201) 100%); /* FF3.6-15 */
|
|
5
|
+
background: -webkit-linear-gradient(top, rgb(244,215,201) 0%,rgb(244,226,201) 100%); /* Chrome10-25,Safari5.1-6 */
|
|
6
|
+
background: linear-gradient(to bottom, rgb(244,215,201) 0%,rgb(244,226,201) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
|
7
|
+
margin-bottom: 100px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.header {
|
|
11
|
+
margin-top: 30px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.header h1 {
|
|
15
|
+
margin-top: 10px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
h4 {
|
|
19
|
+
padding-bottom: 10px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.prettyprinted {
|
|
23
|
+
margin-top: 5px;
|
|
24
|
+
border-top: none !important;
|
|
25
|
+
border-bottom: none !important;
|
|
26
|
+
border-right: none !important;
|
|
27
|
+
border-left: 1px solid rgba(0,0,0,.1) !important;
|
|
28
|
+
padding-left: 15px !important;
|
|
29
|
+
word-wrap: break-word !important;
|
|
30
|
+
overflow: default !important;
|
|
31
|
+
text-overflow: default !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tinted {
|
|
35
|
+
background-color: #fff6b2;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.handle {
|
|
39
|
+
cursor: grab;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
code {
|
|
43
|
+
color: #606;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.toc {
|
|
47
|
+
background-color: rgb(255,255,255,0.5);
|
|
48
|
+
border: solid #444 1px;
|
|
49
|
+
padding: 20px;
|
|
50
|
+
margin-left: auto;
|
|
51
|
+
margin-right: auto;
|
|
52
|
+
list-style: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.toc h5 {
|
|
56
|
+
margin-top: 8px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.list-group-item:hover {
|
|
60
|
+
z-index: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.input-section {
|
|
64
|
+
background-color: rgb(255,255,255,0.5);
|
|
65
|
+
padding: 20px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.square-section {
|
|
69
|
+
background-color: rgb(255,255,255,0.5);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
.square {
|
|
74
|
+
width: 20vw;
|
|
75
|
+
height: 20vw;
|
|
76
|
+
background-color: #00a2ff;
|
|
77
|
+
margin-top: 2vw;
|
|
78
|
+
margin-left: 2vw;
|
|
79
|
+
display: inline-block;
|
|
80
|
+
position: relative;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.swap-threshold-indicator {
|
|
84
|
+
background-color: #0079bf;
|
|
85
|
+
height: 100%;
|
|
86
|
+
display: inline-block;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.inverted-swap-threshold-indicator {
|
|
90
|
+
background-color: #0079bf;
|
|
91
|
+
height: 100%;
|
|
92
|
+
position: absolute;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.indicator-left {
|
|
96
|
+
left: 0;
|
|
97
|
+
top: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.indicator-right {
|
|
101
|
+
right: 0;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.num-indicator {
|
|
106
|
+
position: absolute;
|
|
107
|
+
font-size: 50px;
|
|
108
|
+
width: 25px;
|
|
109
|
+
top: 50%;
|
|
110
|
+
left: 50%;
|
|
111
|
+
transform: translate(-50%, -50%);
|
|
112
|
+
color: white;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.grid-square {
|
|
116
|
+
width: 100px;
|
|
117
|
+
height: 100px;
|
|
118
|
+
display: inline-block;
|
|
119
|
+
background-color: #fff;
|
|
120
|
+
border: solid 1px rgb(0,0,0,0.2);
|
|
121
|
+
padding: 10px;
|
|
122
|
+
margin: 12px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.nested-sortable, .nested-1, .nested-2, .nested-3 {
|
|
126
|
+
margin-top: 5px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.nested-1 {
|
|
130
|
+
background-color: #e6e6e6;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.nested-2 {
|
|
134
|
+
background-color: #cccccc;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.nested-3 {
|
|
138
|
+
background-color: #b3b3b3;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.frameworks {
|
|
142
|
+
background-color: rgb(255,255,255,0.5);
|
|
143
|
+
border: solid rgb(0,0,0,0.3) 1px;
|
|
144
|
+
padding: 20px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.frameworks h3 {
|
|
148
|
+
margin-top: 5px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
input[type=range] {
|
|
152
|
+
-webkit-appearance: none;
|
|
153
|
+
width: 100%;
|
|
154
|
+
margin: 3.8px 0;
|
|
155
|
+
}
|
|
156
|
+
input[type=range]:focus {
|
|
157
|
+
outline: none;
|
|
158
|
+
}
|
|
159
|
+
input[type=range]::-webkit-slider-runnable-track {
|
|
160
|
+
width: 100%;
|
|
161
|
+
height: 8.4px;
|
|
162
|
+
cursor: pointer;
|
|
163
|
+
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
|
164
|
+
background: rgba(48, 113, 169, 0);
|
|
165
|
+
border-radius: 1.3px;
|
|
166
|
+
border: 0.2px solid #010101;
|
|
167
|
+
}
|
|
168
|
+
input[type=range]::-webkit-slider-thumb {
|
|
169
|
+
box-shadow: 0px 0px 0.9px #000000, 0px 0px 0px #0d0d0d;
|
|
170
|
+
border: 1.3px solid rgba(0, 0, 0, 0.7);
|
|
171
|
+
height: 16px;
|
|
172
|
+
width: 16px;
|
|
173
|
+
border-radius: 49px;
|
|
174
|
+
background: #ffffff;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
-webkit-appearance: none;
|
|
177
|
+
margin-top: -4px;
|
|
178
|
+
}
|
|
179
|
+
input[type=range]:focus::-webkit-slider-runnable-track {
|
|
180
|
+
background: rgba(54, 126, 189, 0);
|
|
181
|
+
}
|
|
182
|
+
input[type=range]::-moz-range-track {
|
|
183
|
+
width: 100%;
|
|
184
|
+
height: 8.4px;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
|
187
|
+
background: rgba(48, 113, 169, 0);
|
|
188
|
+
border-radius: 1.3px;
|
|
189
|
+
border: 0.2px solid #010101;
|
|
190
|
+
}
|
|
191
|
+
input[type=range]::-moz-range-thumb {
|
|
192
|
+
box-shadow: 0px 0px 0.9px #000000, 0px 0px 0px #0d0d0d;
|
|
193
|
+
border: 1.3px solid rgba(0, 0, 0, 0.7);
|
|
194
|
+
height: 16px;
|
|
195
|
+
width: 16px;
|
|
196
|
+
border-radius: 49px;
|
|
197
|
+
background: #ffffff;
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
}
|
|
200
|
+
input[type=range]::-ms-track {
|
|
201
|
+
width: 100%;
|
|
202
|
+
height: 8.4px;
|
|
203
|
+
cursor: pointer;
|
|
204
|
+
background: transparent;
|
|
205
|
+
border-color: transparent;
|
|
206
|
+
color: transparent;
|
|
207
|
+
}
|
|
208
|
+
input[type=range]::-ms-fill-lower {
|
|
209
|
+
background: rgba(42, 100, 149, 0);
|
|
210
|
+
border: 0.2px solid #010101;
|
|
211
|
+
border-radius: 2.6px;
|
|
212
|
+
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
|
213
|
+
}
|
|
214
|
+
input[type=range]::-ms-fill-upper {
|
|
215
|
+
background: rgba(48, 113, 169, 0);
|
|
216
|
+
border: 0.2px solid #010101;
|
|
217
|
+
border-radius: 2.6px;
|
|
218
|
+
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
|
219
|
+
}
|
|
220
|
+
input[type=range]::-ms-thumb {
|
|
221
|
+
box-shadow: 0px 0px 0.9px #000000, 0px 0px 0px #0d0d0d;
|
|
222
|
+
border: 1.3px solid rgba(0, 0, 0, 0.7);
|
|
223
|
+
height: 16px;
|
|
224
|
+
width: 16px;
|
|
225
|
+
border-radius: 49px;
|
|
226
|
+
background: #ffffff;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
height: 8.4px;
|
|
229
|
+
}
|
|
230
|
+
input[type=range]:focus::-ms-fill-lower {
|
|
231
|
+
background: rgba(48, 113, 169, 0);
|
|
232
|
+
}
|
|
233
|
+
input[type=range]:focus::-ms-fill-upper {
|
|
234
|
+
background: rgba(54, 126, 189, 0);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.blue-background-class {
|
|
238
|
+
background-color: #C8EBFB;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.col {
|
|
242
|
+
padding-right: 0;
|
|
243
|
+
margin-right: 15px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.selected {
|
|
247
|
+
background-color: #f9c7c8;
|
|
248
|
+
border: solid red 1px !important;
|
|
249
|
+
z-index: 1 !important;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.highlight {
|
|
253
|
+
background-color: #B7F8C7;
|
|
254
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Selector } from 'testcafe';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
fixture `Simple Sorting`
|
|
5
|
+
.page `./single-list.html`;
|
|
6
|
+
|
|
7
|
+
let list1 = Selector('#list1');
|
|
8
|
+
|
|
9
|
+
test('Sort down list', async browser => {
|
|
10
|
+
const dragStartPosition = list1.child(0);
|
|
11
|
+
const dragEl = await dragStartPosition();
|
|
12
|
+
const dragEndPosition = list1.child(2);
|
|
13
|
+
const targetStartPosition = list1.child(2);
|
|
14
|
+
const target = await targetStartPosition();
|
|
15
|
+
const targetEndPosition = list1.child(1);
|
|
16
|
+
|
|
17
|
+
await browser
|
|
18
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
19
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
20
|
+
.dragToElement(dragEl, target)
|
|
21
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
22
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('Sort up list', async browser => {
|
|
26
|
+
const dragStartPosition = list1.child(2);
|
|
27
|
+
const dragEl = await dragStartPosition();
|
|
28
|
+
const dragEndPosition = list1.child(0);
|
|
29
|
+
const targetStartPosition = list1.child(0);
|
|
30
|
+
const target = await targetStartPosition();
|
|
31
|
+
const targetEndPosition = list1.child(1);
|
|
32
|
+
|
|
33
|
+
await browser
|
|
34
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
35
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
36
|
+
.dragToElement(dragEl, target)
|
|
37
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
38
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
39
|
+
});
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { Selector } from 'testcafe';
|
|
2
|
+
const itemHeight = 54; // px
|
|
3
|
+
const leeway = 1;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
fixture `Simple Sorting`
|
|
7
|
+
.page `./single-list.html`;
|
|
8
|
+
|
|
9
|
+
let list1 = Selector('#list1');
|
|
10
|
+
|
|
11
|
+
test('Sort down list', async browser => {
|
|
12
|
+
const dragStartPosition = list1.child(0);
|
|
13
|
+
const dragEl = await dragStartPosition();
|
|
14
|
+
const dragEndPosition = list1.child(2);
|
|
15
|
+
const targetStartPosition = list1.child(2);
|
|
16
|
+
const target = await targetStartPosition();
|
|
17
|
+
const targetEndPosition = list1.child(1);
|
|
18
|
+
|
|
19
|
+
await browser
|
|
20
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
21
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
22
|
+
.dragToElement(dragEl, target)
|
|
23
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
24
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test('Sort up list', async browser => {
|
|
28
|
+
const dragStartPosition = list1.child(2);
|
|
29
|
+
const dragEl = await dragStartPosition();
|
|
30
|
+
const dragEndPosition = list1.child(0);
|
|
31
|
+
const targetStartPosition = list1.child(0);
|
|
32
|
+
const target = await targetStartPosition();
|
|
33
|
+
const targetEndPosition = list1.child(1);
|
|
34
|
+
|
|
35
|
+
await browser
|
|
36
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
37
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
38
|
+
.dragToElement(dragEl, target)
|
|
39
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
40
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test('Swap threshold', async browser => {
|
|
44
|
+
const dragStartPosition = list1.child(0);
|
|
45
|
+
const dragEl = await dragStartPosition();
|
|
46
|
+
const dragEndPosition = list1.child(1);
|
|
47
|
+
const targetStartPosition = list1.child(1);
|
|
48
|
+
const target = await targetStartPosition();
|
|
49
|
+
const targetEndPosition = list1.child(0);
|
|
50
|
+
|
|
51
|
+
await browser.eval(() => {
|
|
52
|
+
Sortable.get(document.getElementById('list1')).option('swapThreshold', 0.6);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
await browser
|
|
57
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
58
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
59
|
+
.dragToElement(dragEl, target, {
|
|
60
|
+
destinationOffsetY: Math.round(itemHeight / 2 * 0.4 - leeway)
|
|
61
|
+
})
|
|
62
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
63
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
64
|
+
.dragToElement(dragEl, target, {
|
|
65
|
+
destinationOffsetY: Math.round(itemHeight / 2 * 0.4 + leeway)
|
|
66
|
+
})
|
|
67
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
68
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
test('Invert swap', async browser => {
|
|
72
|
+
const dragStartPosition = list1.child(0);
|
|
73
|
+
const dragEl = await dragStartPosition();
|
|
74
|
+
const dragEndPosition = list1.child(1);
|
|
75
|
+
const targetStartPosition = list1.child(1);
|
|
76
|
+
const target = await targetStartPosition();
|
|
77
|
+
const targetEndPosition = list1.child(0);
|
|
78
|
+
|
|
79
|
+
await browser.eval(() => {
|
|
80
|
+
Sortable.get(document.getElementById('list1')).option('invertSwap', true);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
await browser
|
|
85
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
86
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
87
|
+
.dragToElement(dragEl, target, {
|
|
88
|
+
destinationOffsetY: Math.round(itemHeight / 2 - leeway)
|
|
89
|
+
})
|
|
90
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
91
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
92
|
+
.dragToElement(dragEl, target, {
|
|
93
|
+
destinationOffsetY: Math.round(itemHeight / 2 + leeway)
|
|
94
|
+
})
|
|
95
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
96
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
test('Inverted swap threshold', async browser => {
|
|
101
|
+
const dragStartPosition = list1.child(0);
|
|
102
|
+
const dragEl = await dragStartPosition();
|
|
103
|
+
const dragEndPosition = list1.child(1);
|
|
104
|
+
const targetStartPosition = list1.child(1);
|
|
105
|
+
const target = await targetStartPosition();
|
|
106
|
+
const targetEndPosition = list1.child(0);
|
|
107
|
+
|
|
108
|
+
await browser.eval(() => {
|
|
109
|
+
Sortable.get(document.getElementById('list1')).option('invertSwap', true);
|
|
110
|
+
Sortable.get(document.getElementById('list1')).option('invertedSwapThreshold', 0.5);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
await browser
|
|
115
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
116
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
117
|
+
.dragToElement(dragEl, target, {
|
|
118
|
+
destinationOffsetY: Math.round(itemHeight - (itemHeight / 2 * 0.5) - leeway)
|
|
119
|
+
})
|
|
120
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
121
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
122
|
+
.dragToElement(dragEl, target, {
|
|
123
|
+
destinationOffsetY: Math.round(itemHeight - (itemHeight / 2 * 0.5) + leeway)
|
|
124
|
+
})
|
|
125
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
126
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
fixture `Grouping`
|
|
131
|
+
.page `./dual-list.html`;
|
|
132
|
+
|
|
133
|
+
let list2 = Selector('#list2');
|
|
134
|
+
|
|
135
|
+
test('Move to list of the same group', async browser => {
|
|
136
|
+
const dragStartPosition = list1.child(0);
|
|
137
|
+
const dragEl = await dragStartPosition();
|
|
138
|
+
const dragEndPosition = list2.child(0);
|
|
139
|
+
const targetStartPosition = list2.child(0);
|
|
140
|
+
const target = await targetStartPosition();
|
|
141
|
+
const targetEndPosition = list2.child(1);
|
|
142
|
+
|
|
143
|
+
await browser.eval(() => {
|
|
144
|
+
Sortable.get(document.getElementById('list2')).option('group', 'shared');
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
await browser
|
|
148
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
149
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
150
|
+
.dragToElement(dragEl, target, { offsetY: 0, destinationOffsetY: 0 })
|
|
151
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
152
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
test('Do not move to list of different group', async browser => {
|
|
157
|
+
const dragStartPosition = list1.child(0);
|
|
158
|
+
const dragEl = await dragStartPosition();
|
|
159
|
+
const targetStartPosition = list2.child(0);
|
|
160
|
+
const target = await targetStartPosition();
|
|
161
|
+
|
|
162
|
+
await browser.eval(() => {
|
|
163
|
+
Sortable.get(document.getElementById('list2')).option('group', null);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
await browser
|
|
167
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
168
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
169
|
+
.dragToElement(dragEl, target, { offsetY: 0, destinationOffsetY: 0 })
|
|
170
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
171
|
+
.expect(targetStartPosition.innerText).eql(target.innerText);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
test('Move to list with put:true', async browser => {
|
|
176
|
+
// Should allow insert, since pull defaults to `true`
|
|
177
|
+
const dragStartPosition = list1.child(0);
|
|
178
|
+
const dragEl = await dragStartPosition();
|
|
179
|
+
const dragEndPosition = list2.child(0);
|
|
180
|
+
const targetStartPosition = list2.child(0);
|
|
181
|
+
const target = await targetStartPosition();
|
|
182
|
+
const targetEndPosition = list2.child(1);
|
|
183
|
+
|
|
184
|
+
await browser.eval(() => {
|
|
185
|
+
Sortable.get(document.getElementById('list2')).option('group', { put: true });
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
await browser
|
|
189
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
190
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
191
|
+
.dragToElement(dragEl, target, { offsetY: 0, destinationOffsetY: 0 })
|
|
192
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
193
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
test('Do not move from list with pull:false', async browser => {
|
|
197
|
+
// Should not allow insert, since put defaults to `false`
|
|
198
|
+
const dragStartPosition = list1.child(0);
|
|
199
|
+
const dragEl = await dragStartPosition();
|
|
200
|
+
const targetStartPosition = list2.child(0);
|
|
201
|
+
const target = await targetStartPosition();
|
|
202
|
+
|
|
203
|
+
await browser.eval(() => {
|
|
204
|
+
Sortable.get(document.getElementById('list1')).option('group', { pull: false });
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
await browser
|
|
208
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
209
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
210
|
+
.dragToElement(dragEl, target, { offsetY: 0, destinationOffsetY: 0 })
|
|
211
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
212
|
+
.expect(targetStartPosition.innerText).eql(target.innerText);
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
test('Clone element if pull:"clone"', async browser => {
|
|
216
|
+
const dragStartPosition = list1.child(0);
|
|
217
|
+
const dragEl = await dragStartPosition();
|
|
218
|
+
const dragEndPosition = list2.child(0);
|
|
219
|
+
const targetStartPosition = list2.child(0);
|
|
220
|
+
const target = await targetStartPosition();
|
|
221
|
+
const targetEndPosition = list2.child(1);
|
|
222
|
+
|
|
223
|
+
await browser.eval(() => {
|
|
224
|
+
Sortable.get(document.getElementById('list1')).option('group', { pull: 'clone' });
|
|
225
|
+
Sortable.get(document.getElementById('list2')).option('group', { put: true });
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
await browser
|
|
229
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
230
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
231
|
+
.dragToElement(dragEl, target, { offsetY: 0, destinationOffsetY: 0 })
|
|
232
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText) // clone check
|
|
233
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
234
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
fixture `Handles`
|
|
240
|
+
.page `./handles.html`;
|
|
241
|
+
|
|
242
|
+
test('Do not allow dragging not using handle', async browser => {
|
|
243
|
+
const dragStartPosition = list1.child(0);
|
|
244
|
+
const dragEl = await dragStartPosition();
|
|
245
|
+
const targetStartPosition = list1.child(1);
|
|
246
|
+
const target = await targetStartPosition();
|
|
247
|
+
|
|
248
|
+
await browser
|
|
249
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
250
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
251
|
+
.dragToElement(dragEl, target)
|
|
252
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
253
|
+
.expect(targetStartPosition.innerText).eql(target.innerText);
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
test('Allow dragging using handle', async browser => {
|
|
258
|
+
const dragStartPosition = list1.child(0);
|
|
259
|
+
const dragEl = await dragStartPosition();
|
|
260
|
+
const dragEndPosition = list1.child(1);
|
|
261
|
+
const targetStartPosition = list1.child(1);
|
|
262
|
+
const target = await targetStartPosition();
|
|
263
|
+
const targetEndPosition = list1.child(0);
|
|
264
|
+
|
|
265
|
+
await browser
|
|
266
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
267
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
268
|
+
.dragToElement(await dragStartPosition.child('.handle'), target)
|
|
269
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
270
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
fixture `Filter`
|
|
274
|
+
.page `./filter.html`;
|
|
275
|
+
|
|
276
|
+
test('Do not allow dragging of filtered element', async browser => {
|
|
277
|
+
const dragStartPosition = list1.child('.filtered');
|
|
278
|
+
const dragEl = await dragStartPosition();
|
|
279
|
+
const targetStartPosition = dragStartPosition.nextSibling(1);
|
|
280
|
+
const target = await targetStartPosition();
|
|
281
|
+
|
|
282
|
+
await browser
|
|
283
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
284
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
285
|
+
.dragToElement(dragEl, target)
|
|
286
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
287
|
+
.expect(targetStartPosition.innerText).eql(target.innerText);
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
test('Allow dragging of non-filtered element', async browser => {
|
|
292
|
+
const dragStartPosition = list1.child(':not(.filtered)');
|
|
293
|
+
const dragEl = await dragStartPosition();
|
|
294
|
+
const dragEndPosition = dragStartPosition.nextSibling(1);
|
|
295
|
+
const targetStartPosition = dragStartPosition.nextSibling(1);
|
|
296
|
+
const target = await targetStartPosition();
|
|
297
|
+
const targetEndPosition = dragStartPosition.nextSibling(0);
|
|
298
|
+
|
|
299
|
+
await browser
|
|
300
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
301
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
302
|
+
.dragToElement(dragEl, target)
|
|
303
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
304
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
fixture `Nested`
|
|
310
|
+
.page `./nested.html`;
|
|
311
|
+
|
|
312
|
+
let list1n1 = Selector('.n1');
|
|
313
|
+
let list1n2 = Selector('.n2');
|
|
314
|
+
let list2n1 = Selector('.n1:nth-of-type(2)');
|
|
315
|
+
|
|
316
|
+
test('Dragging from level 1 to level 0', async browser => {
|
|
317
|
+
const dragStartPosition = list1n1.child(0);
|
|
318
|
+
const dragEl = await dragStartPosition();
|
|
319
|
+
const dragEndPosition = list1.child(2);
|
|
320
|
+
const targetStartPosition = list1.child(2);
|
|
321
|
+
const target = await targetStartPosition();
|
|
322
|
+
const targetEndPosition = list1.child(3);
|
|
323
|
+
|
|
324
|
+
await browser
|
|
325
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
326
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
327
|
+
.dragToElement(dragEl, target, { destinationOffsetY: 0 })
|
|
328
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
329
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
test('Dragging from level 0 to level 2', async browser => {
|
|
334
|
+
const dragStartPosition = list1.child(1);
|
|
335
|
+
const dragEl = await dragStartPosition();
|
|
336
|
+
const dragEndPosition = list1n2.child(2);
|
|
337
|
+
const targetStartPosition = list1n2.child(2);
|
|
338
|
+
const target = await targetStartPosition();
|
|
339
|
+
const targetEndPosition = list1n2.child(3);
|
|
340
|
+
|
|
341
|
+
await browser
|
|
342
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
343
|
+
.expect(targetStartPosition.innerText).eql(target.innerText)
|
|
344
|
+
.dragToElement(dragEl, target, { destinationOffsetY: 0 })
|
|
345
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText)
|
|
346
|
+
.expect(targetEndPosition.innerText).eql(target.innerText);
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
fixture `Empty Insert`
|
|
351
|
+
.page `./empty-list.html`;
|
|
352
|
+
|
|
353
|
+
test('Insert into empty list if within emptyInsertThreshold', async browser => {
|
|
354
|
+
const threshold = await browser.eval(() => Sortable.get(document.getElementById('list2')).option('emptyInsertThreshold'));
|
|
355
|
+
const dragStartPosition = list1.child(0);
|
|
356
|
+
const dragEl = await dragStartPosition();
|
|
357
|
+
const dragEndPosition = list2.child(0);
|
|
358
|
+
// Must use rects since testcafe won't drag to element that is "not visible"
|
|
359
|
+
const dragRect = dragEl.boundingClientRect;
|
|
360
|
+
const list2Rect = await list2.boundingClientRect;
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
await browser
|
|
364
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
365
|
+
.drag(dragEl, Math.round(list2Rect.left - dragRect.left) - (threshold - 1), -(threshold - 1), {
|
|
366
|
+
offsetY: 0,
|
|
367
|
+
offsetX: 0
|
|
368
|
+
})
|
|
369
|
+
.expect(dragEndPosition.innerText).eql(dragEl.innerText);
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
test('Do not insert into empty list if outside emptyInsertThreshold', async browser => {
|
|
373
|
+
const threshold = await browser.eval(() => Sortable.get(document.getElementById('list2')).option('emptyInsertThreshold'));
|
|
374
|
+
const dragStartPosition = list1.child(0);
|
|
375
|
+
const dragEl = await dragStartPosition();
|
|
376
|
+
const dragRect = dragEl.boundingClientRect;
|
|
377
|
+
const list2Rect = await list2.boundingClientRect;
|
|
378
|
+
|
|
379
|
+
await browser
|
|
380
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText)
|
|
381
|
+
.drag(dragEl, Math.round(list2Rect.left - dragRect.left) - (threshold + 1), -(threshold + 1), {
|
|
382
|
+
offsetY: 0,
|
|
383
|
+
offsetX: 0
|
|
384
|
+
})
|
|
385
|
+
.expect(dragStartPosition.innerText).eql(dragEl.innerText);
|
|
386
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title></title>
|
|
5
|
+
<link rel="stylesheet" type="text/css" href="./style.css">
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
|
|
9
|
+
<div class="list half" id="list1">
|
|
10
|
+
<div>Item 1.1</div>
|
|
11
|
+
<div>Item 1.2</div>
|
|
12
|
+
<div>Item 1.3</div>
|
|
13
|
+
<div>Item 1.4</div>
|
|
14
|
+
<div>Item 1.5</div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div class="list half" id="list2">
|
|
18
|
+
<div>Item 2.1</div>
|
|
19
|
+
<div>Item 2.2</div>
|
|
20
|
+
<div>Item 2.3</div>
|
|
21
|
+
<div>Item 2.4</div>
|
|
22
|
+
<div>Item 2.5</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
<script src="../Sortable.js"></script>
|
|
27
|
+
|
|
28
|
+
<script type="text/javascript">
|
|
29
|
+
new Sortable(document.getElementById('list1'), { group: 'shared' });
|
|
30
|
+
new Sortable(document.getElementById('list2'), { });
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|