jqtree 1.7.4 → 1.7.5
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/.eslintrc +5 -1
- package/bower.json +1 -1
- package/docs/_config.yml +1 -1
- package/docs/_entries/general/changelog.md +5 -0
- package/docs/package.json +1 -1
- package/docs/pnpm-lock.yaml +30 -30
- package/lib/dataLoader.js +2 -3
- package/lib/dragAndDropHandler.js +5 -13
- package/lib/elementsRenderer.js +2 -3
- package/lib/keyHandler.js +1 -5
- package/lib/mouse.widget.js +1 -2
- package/lib/node.js +30 -39
- package/lib/nodeElement.js +3 -6
- package/lib/nodeUtils.js +10 -0
- package/lib/playwright/coverage.js +14 -11
- package/lib/playwright/playwright.test.js +482 -104
- package/lib/playwright/testUtils.js +75 -49
- package/lib/saveStateHandler.js +2 -3
- package/lib/scrollHandler/containerScrollParent.js +160 -0
- package/lib/scrollHandler/createScrollParent.js +57 -0
- package/lib/scrollHandler/documentScrollParent.js +169 -0
- package/lib/scrollHandler/scrollParent.js +58 -0
- package/lib/scrollHandler/types.js +1 -0
- package/lib/scrollHandler.js +28 -207
- package/lib/selectNodeHandler.js +2 -3
- package/lib/simple.widget.js +1 -2
- package/lib/test/jqTree/loadOnDemand.test.js +3 -3
- package/lib/test/jqTree/methods.test.js +2 -1
- package/lib/test/jqTree/scrollHandler/containerScrollParent.test.js +94 -0
- package/lib/test/node.test.js +49 -7
- package/lib/test/nodeUtils.test.js +20 -0
- package/lib/test/support/exampleData.js +1 -2
- package/lib/test/support/testUtil.js +3 -6
- package/lib/test/support/treeStructure.js +1 -2
- package/lib/tree.jquery.js +6 -7
- package/lib/util.js +4 -7
- package/lib/version.js +2 -3
- package/package.json +27 -27
- package/src/dragAndDropHandler.ts +27 -33
- package/src/keyHandler.ts +0 -8
- package/src/node.ts +32 -48
- package/src/nodeUtils.ts +10 -0
- package/src/playwright/playwright.test.ts +207 -15
- package/src/playwright/testUtils.ts +23 -15
- package/src/scrollHandler/containerScrollParent.ts +177 -0
- package/src/scrollHandler/createScrollParent.ts +50 -0
- package/src/scrollHandler/documentScrollParent.ts +182 -0
- package/src/scrollHandler/types.ts +7 -0
- package/src/scrollHandler.ts +25 -243
- package/src/test/jqTree/loadOnDemand.test.ts +2 -3
- package/src/test/jqTree/methods.test.ts +1 -1
- package/src/test/node.test.ts +84 -25
- package/src/test/nodeUtils.test.ts +21 -0
- package/src/tree.jquery.ts +27 -30
- package/src/version.ts +1 -1
- package/tree.jquery.debug.js +391 -229
- package/tree.jquery.debug.js.map +1 -1
- package/tree.jquery.js +2 -2
- package/tree.jquery.js.map +1 -1
|
@@ -4,192 +4,226 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
var _test = require("@playwright/test");
|
|
5
5
|
var _testUtils = require("./testUtils");
|
|
6
6
|
var _coverage = require("./coverage");
|
|
7
|
-
var _ref2, _ref4, _ref6;
|
|
8
7
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
9
8
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
10
9
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
11
|
-
var initPage = function
|
|
12
|
-
|
|
13
|
-
var baseURL, dragAndDrop, page;
|
|
10
|
+
var initPage = /*#__PURE__*/function () {
|
|
11
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(page, baseURL) {
|
|
14
12
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15
13
|
while (1) switch (_context.prev = _context.next) {
|
|
16
14
|
case 0:
|
|
17
|
-
baseURL = _ref.baseURL, dragAndDrop = _ref.dragAndDrop, page = _ref.page;
|
|
18
15
|
if (baseURL) {
|
|
19
|
-
_context.next =
|
|
16
|
+
_context.next = 2;
|
|
20
17
|
break;
|
|
21
18
|
}
|
|
22
19
|
throw new Error("Missing baseURL");
|
|
23
|
-
case
|
|
24
|
-
_context.next =
|
|
20
|
+
case 2:
|
|
21
|
+
_context.next = 4;
|
|
25
22
|
return page["goto"]("".concat(baseURL, "/test_index.html"));
|
|
26
|
-
case
|
|
27
|
-
_context.next =
|
|
23
|
+
case 4:
|
|
24
|
+
_context.next = 6;
|
|
28
25
|
return page.waitForLoadState("domcontentloaded");
|
|
29
|
-
case
|
|
26
|
+
case 6:
|
|
30
27
|
page.on("console", function (msg) {
|
|
31
28
|
return console.log("console: ".concat(msg.text()));
|
|
32
29
|
});
|
|
33
|
-
_context.next =
|
|
34
|
-
return page.evaluate("\n const $tree = jQuery(\"#tree1\");\n\n $tree.tree({\n animationSpeed: 0,\n autoOpen: 0,\n data: ExampleData.exampleData,\n dragAndDrop: ".concat(dragAndDrop, ",\n startDndDelay: 100,\n });\n "));
|
|
35
|
-
case 10:
|
|
36
|
-
_context.next = 12;
|
|
30
|
+
_context.next = 9;
|
|
37
31
|
return page.evaluate("\n console.log(window.__coverage__ ? 'Coverage enabled' : 'Coverage not enabled');\n ");
|
|
38
|
-
case
|
|
32
|
+
case 9:
|
|
39
33
|
case "end":
|
|
40
34
|
return _context.stop();
|
|
41
35
|
}
|
|
42
36
|
}, _callee);
|
|
43
|
-
}))
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
}));
|
|
38
|
+
return function initPage(_x, _x2) {
|
|
39
|
+
return _ref.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
}();
|
|
42
|
+
var initTree = /*#__PURE__*/function () {
|
|
43
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(page, _ref2) {
|
|
44
|
+
var autoOpen, dragAndDrop;
|
|
48
45
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
49
46
|
while (1) switch (_context2.prev = _context2.next) {
|
|
50
47
|
case 0:
|
|
51
|
-
|
|
48
|
+
autoOpen = _ref2.autoOpen, dragAndDrop = _ref2.dragAndDrop;
|
|
52
49
|
_context2.next = 3;
|
|
53
|
-
return (0,
|
|
50
|
+
return page.evaluate("\n const $tree = jQuery(\"#tree1\");\n\n $tree.tree({\n animationSpeed: 0,\n autoOpen: ".concat(autoOpen || 0, ",\n data: ExampleData.exampleData,\n dragAndDrop: ").concat(dragAndDrop || false, ",\n startDndDelay: 100,\n });\n "));
|
|
54
51
|
case 3:
|
|
55
52
|
case "end":
|
|
56
53
|
return _context2.stop();
|
|
57
54
|
}
|
|
58
55
|
}, _callee2);
|
|
59
|
-
}))
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
}));
|
|
57
|
+
return function initTree(_x3, _x4) {
|
|
58
|
+
return _ref3.apply(this, arguments);
|
|
59
|
+
};
|
|
60
|
+
}();
|
|
61
|
+
_test.test.beforeEach( /*#__PURE__*/function () {
|
|
62
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref4) {
|
|
63
63
|
var context;
|
|
64
64
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
65
65
|
while (1) switch (_context3.prev = _context3.next) {
|
|
66
66
|
case 0:
|
|
67
|
-
context =
|
|
67
|
+
context = _ref4.context;
|
|
68
68
|
_context3.next = 3;
|
|
69
|
-
return (0, _coverage.
|
|
69
|
+
return (0, _coverage.initCoverage)(context);
|
|
70
70
|
case 3:
|
|
71
71
|
case "end":
|
|
72
72
|
return _context3.stop();
|
|
73
73
|
}
|
|
74
74
|
}, _callee3);
|
|
75
|
-
}))
|
|
76
|
-
|
|
75
|
+
}));
|
|
76
|
+
return function (_x5) {
|
|
77
|
+
return _ref5.apply(this, arguments);
|
|
78
|
+
};
|
|
79
|
+
}());
|
|
80
|
+
_test.test.afterEach( /*#__PURE__*/function () {
|
|
81
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref6) {
|
|
82
|
+
var context;
|
|
83
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
84
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
85
|
+
case 0:
|
|
86
|
+
context = _ref6.context;
|
|
87
|
+
_context4.next = 3;
|
|
88
|
+
return (0, _coverage.saveCoverage)(context);
|
|
89
|
+
case 3:
|
|
90
|
+
case "end":
|
|
91
|
+
return _context4.stop();
|
|
92
|
+
}
|
|
93
|
+
}, _callee4);
|
|
94
|
+
}));
|
|
95
|
+
return function (_x6) {
|
|
96
|
+
return _ref7.apply(this, arguments);
|
|
97
|
+
};
|
|
98
|
+
}());
|
|
77
99
|
_test.test.describe("without dragAndDrop", function () {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return (_ref8 = _ref8 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref7) {
|
|
100
|
+
_test.test.beforeEach( /*#__PURE__*/function () {
|
|
101
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref8) {
|
|
81
102
|
var baseURL, page;
|
|
82
|
-
return _regeneratorRuntime().wrap(function
|
|
83
|
-
while (1) switch (
|
|
103
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
104
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
84
105
|
case 0:
|
|
85
|
-
baseURL =
|
|
86
|
-
|
|
87
|
-
return initPage(
|
|
88
|
-
|
|
89
|
-
|
|
106
|
+
baseURL = _ref8.baseURL, page = _ref8.page;
|
|
107
|
+
_context5.next = 3;
|
|
108
|
+
return initPage(page, baseURL);
|
|
109
|
+
case 3:
|
|
110
|
+
_context5.next = 5;
|
|
111
|
+
return initTree(page, {
|
|
90
112
|
dragAndDrop: false
|
|
91
113
|
});
|
|
92
|
-
case
|
|
114
|
+
case 5:
|
|
93
115
|
case "end":
|
|
94
|
-
return
|
|
116
|
+
return _context5.stop();
|
|
95
117
|
}
|
|
96
|
-
},
|
|
97
|
-
}))
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
118
|
+
}, _callee5);
|
|
119
|
+
}));
|
|
120
|
+
return function (_x7) {
|
|
121
|
+
return _ref9.apply(this, arguments);
|
|
122
|
+
};
|
|
123
|
+
}());
|
|
124
|
+
(0, _test.test)("displays a tree", /*#__PURE__*/function () {
|
|
125
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_ref10) {
|
|
101
126
|
var page, screenshot;
|
|
102
|
-
return _regeneratorRuntime().wrap(function
|
|
103
|
-
while (1) switch (
|
|
127
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
128
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
104
129
|
case 0:
|
|
105
|
-
page =
|
|
106
|
-
|
|
130
|
+
page = _ref10.page;
|
|
131
|
+
_context6.next = 3;
|
|
107
132
|
return (0, _test.expect)(page.locator("body")).toHaveText(/.*Saurischia.*/);
|
|
108
133
|
case 3:
|
|
109
|
-
|
|
134
|
+
_context6.next = 5;
|
|
110
135
|
return (0, _test.expect)(page.locator("body")).toHaveText(/.*Ornithischians.*/);
|
|
111
136
|
case 5:
|
|
112
|
-
|
|
137
|
+
_context6.next = 7;
|
|
113
138
|
return (0, _test.expect)(page.locator("body")).toHaveText(/.*Coelophysoids.*/);
|
|
114
139
|
case 7:
|
|
115
|
-
|
|
140
|
+
_context6.next = 9;
|
|
116
141
|
return page.screenshot();
|
|
117
142
|
case 9:
|
|
118
|
-
screenshot =
|
|
143
|
+
screenshot = _context6.sent;
|
|
119
144
|
(0, _test.expect)(screenshot).toMatchSnapshot();
|
|
120
145
|
case 11:
|
|
121
146
|
case "end":
|
|
122
|
-
return
|
|
147
|
+
return _context6.stop();
|
|
123
148
|
}
|
|
124
|
-
},
|
|
125
|
-
}))
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
149
|
+
}, _callee6);
|
|
150
|
+
}));
|
|
151
|
+
return function (_x8) {
|
|
152
|
+
return _ref11.apply(this, arguments);
|
|
153
|
+
};
|
|
154
|
+
}());
|
|
155
|
+
(0, _test.test)("selects a node", /*#__PURE__*/function () {
|
|
156
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_ref12) {
|
|
129
157
|
var page, saurischia, screenshot;
|
|
130
|
-
return _regeneratorRuntime().wrap(function
|
|
131
|
-
while (1) switch (
|
|
158
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
159
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
132
160
|
case 0:
|
|
133
|
-
page =
|
|
134
|
-
|
|
161
|
+
page = _ref12.page;
|
|
162
|
+
_context7.next = 3;
|
|
135
163
|
return (0, _test.expect)(page.locator("body")).toHaveText(/.*Saurischia.*/);
|
|
136
164
|
case 3:
|
|
137
|
-
|
|
165
|
+
_context7.next = 5;
|
|
138
166
|
return (0, _testUtils.findNodeElement)(page, "Saurischia");
|
|
139
167
|
case 5:
|
|
140
|
-
saurischia =
|
|
141
|
-
|
|
168
|
+
saurischia = _context7.sent;
|
|
169
|
+
_context7.next = 8;
|
|
142
170
|
return (0, _testUtils.selectNode)(saurischia);
|
|
143
171
|
case 8:
|
|
144
|
-
|
|
172
|
+
_context7.next = 10;
|
|
145
173
|
return page.screenshot();
|
|
146
174
|
case 10:
|
|
147
|
-
screenshot =
|
|
175
|
+
screenshot = _context7.sent;
|
|
148
176
|
(0, _test.expect)(screenshot).toMatchSnapshot();
|
|
149
177
|
case 12:
|
|
150
178
|
case "end":
|
|
151
|
-
return
|
|
179
|
+
return _context7.stop();
|
|
152
180
|
}
|
|
153
|
-
},
|
|
154
|
-
}))
|
|
155
|
-
|
|
181
|
+
}, _callee7);
|
|
182
|
+
}));
|
|
183
|
+
return function (_x9) {
|
|
184
|
+
return _ref13.apply(this, arguments);
|
|
185
|
+
};
|
|
186
|
+
}());
|
|
156
187
|
});
|
|
157
188
|
_test.test.describe("with dragAndDrop", function () {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
return (_ref14 = _ref14 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_ref13) {
|
|
189
|
+
_test.test.beforeEach( /*#__PURE__*/function () {
|
|
190
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_ref14) {
|
|
161
191
|
var baseURL, page;
|
|
162
|
-
return _regeneratorRuntime().wrap(function
|
|
163
|
-
while (1) switch (
|
|
192
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
193
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
164
194
|
case 0:
|
|
165
|
-
baseURL =
|
|
166
|
-
|
|
167
|
-
return initPage(
|
|
168
|
-
|
|
169
|
-
|
|
195
|
+
baseURL = _ref14.baseURL, page = _ref14.page;
|
|
196
|
+
_context8.next = 3;
|
|
197
|
+
return initPage(page, baseURL);
|
|
198
|
+
case 3:
|
|
199
|
+
_context8.next = 5;
|
|
200
|
+
return initTree(page, {
|
|
170
201
|
dragAndDrop: true
|
|
171
202
|
});
|
|
172
|
-
case
|
|
203
|
+
case 5:
|
|
173
204
|
case "end":
|
|
174
|
-
return
|
|
205
|
+
return _context8.stop();
|
|
175
206
|
}
|
|
176
|
-
},
|
|
177
|
-
}))
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
207
|
+
}, _callee8);
|
|
208
|
+
}));
|
|
209
|
+
return function (_x10) {
|
|
210
|
+
return _ref15.apply(this, arguments);
|
|
211
|
+
};
|
|
212
|
+
}());
|
|
213
|
+
(0, _test.test)("moves a node", /*#__PURE__*/function () {
|
|
214
|
+
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_ref16) {
|
|
181
215
|
var page, structure, screenshot;
|
|
182
|
-
return _regeneratorRuntime().wrap(function
|
|
183
|
-
while (1) switch (
|
|
216
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
217
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
184
218
|
case 0:
|
|
185
|
-
page =
|
|
186
|
-
|
|
219
|
+
page = _ref16.page;
|
|
220
|
+
_context9.next = 3;
|
|
187
221
|
return (0, _testUtils.dragAndDrop)(page, "Herrerasaurians", "Ornithischians");
|
|
188
222
|
case 3:
|
|
189
|
-
|
|
223
|
+
_context9.next = 5;
|
|
190
224
|
return (0, _testUtils.getTreeStructure)(page);
|
|
191
225
|
case 5:
|
|
192
|
-
structure =
|
|
226
|
+
structure = _context9.sent;
|
|
193
227
|
(0, _test.expect)(structure).toEqual([_test.expect.objectContaining({
|
|
194
228
|
name: "Saurischia",
|
|
195
229
|
children: [_test.expect.objectContaining({
|
|
@@ -213,16 +247,360 @@ _test.test.describe("with dragAndDrop", function () {
|
|
|
213
247
|
name: "Ceratopsians"
|
|
214
248
|
})]
|
|
215
249
|
})]);
|
|
216
|
-
|
|
250
|
+
_context9.next = 9;
|
|
217
251
|
return page.screenshot();
|
|
218
252
|
case 9:
|
|
219
|
-
screenshot =
|
|
253
|
+
screenshot = _context9.sent;
|
|
220
254
|
(0, _test.expect)(screenshot).toMatchSnapshot();
|
|
221
255
|
case 11:
|
|
222
256
|
case "end":
|
|
223
|
-
return
|
|
257
|
+
return _context9.stop();
|
|
224
258
|
}
|
|
225
|
-
},
|
|
226
|
-
}))
|
|
227
|
-
|
|
259
|
+
}, _callee9);
|
|
260
|
+
}));
|
|
261
|
+
return function (_x11) {
|
|
262
|
+
return _ref17.apply(this, arguments);
|
|
263
|
+
};
|
|
264
|
+
}());
|
|
265
|
+
});
|
|
266
|
+
_test.test.describe("autoscroll when the window is scrollable", function () {
|
|
267
|
+
(0, _test.test)("it scrolls vertically when the users drags an element to the bottom ", /*#__PURE__*/function () {
|
|
268
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref18) {
|
|
269
|
+
var baseURL, page;
|
|
270
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
271
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
272
|
+
case 0:
|
|
273
|
+
baseURL = _ref18.baseURL, page = _ref18.page;
|
|
274
|
+
_context10.next = 3;
|
|
275
|
+
return page.setViewportSize({
|
|
276
|
+
width: 200,
|
|
277
|
+
height: 100
|
|
278
|
+
});
|
|
279
|
+
case 3:
|
|
280
|
+
_context10.next = 5;
|
|
281
|
+
return initPage(page, baseURL);
|
|
282
|
+
case 5:
|
|
283
|
+
_context10.next = 7;
|
|
284
|
+
return initTree(page, {
|
|
285
|
+
autoOpen: 3,
|
|
286
|
+
dragAndDrop: true
|
|
287
|
+
});
|
|
288
|
+
case 7:
|
|
289
|
+
_context10.t0 = _test.expect;
|
|
290
|
+
_context10.next = 10;
|
|
291
|
+
return page.getByRole("document").evaluate(function (element) {
|
|
292
|
+
return element.scrollTop;
|
|
293
|
+
});
|
|
294
|
+
case 10:
|
|
295
|
+
_context10.t1 = _context10.sent;
|
|
296
|
+
(0, _context10.t0)(_context10.t1).toEqual(0);
|
|
297
|
+
_context10.next = 14;
|
|
298
|
+
return (0, _testUtils.moveMouseToNode)(page, "Saurischia");
|
|
299
|
+
case 14:
|
|
300
|
+
_context10.next = 16;
|
|
301
|
+
return page.mouse.down();
|
|
302
|
+
case 16:
|
|
303
|
+
_context10.next = 18;
|
|
304
|
+
return page.waitForTimeout(200);
|
|
305
|
+
case 18:
|
|
306
|
+
_context10.next = 20;
|
|
307
|
+
return page.mouse.move(20, 190);
|
|
308
|
+
case 20:
|
|
309
|
+
_context10.next = 22;
|
|
310
|
+
return page.waitForTimeout(50);
|
|
311
|
+
case 22:
|
|
312
|
+
_context10.t2 = _test.expect;
|
|
313
|
+
_context10.next = 25;
|
|
314
|
+
return page.getByRole("document").evaluate(function (element) {
|
|
315
|
+
return element.scrollTop;
|
|
316
|
+
});
|
|
317
|
+
case 25:
|
|
318
|
+
_context10.t3 = _context10.sent;
|
|
319
|
+
(0, _context10.t2)(_context10.t3).toBeGreaterThan(0);
|
|
320
|
+
case 27:
|
|
321
|
+
case "end":
|
|
322
|
+
return _context10.stop();
|
|
323
|
+
}
|
|
324
|
+
}, _callee10);
|
|
325
|
+
}));
|
|
326
|
+
return function (_x12) {
|
|
327
|
+
return _ref19.apply(this, arguments);
|
|
328
|
+
};
|
|
329
|
+
}());
|
|
330
|
+
(0, _test.test)("it scrolls horizontally when the users drags an element to the right", /*#__PURE__*/function () {
|
|
331
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_ref20) {
|
|
332
|
+
var baseURL, page;
|
|
333
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
334
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
335
|
+
case 0:
|
|
336
|
+
baseURL = _ref20.baseURL, page = _ref20.page;
|
|
337
|
+
_context11.next = 3;
|
|
338
|
+
return page.setViewportSize({
|
|
339
|
+
width: 60,
|
|
340
|
+
height: 400
|
|
341
|
+
});
|
|
342
|
+
case 3:
|
|
343
|
+
_context11.next = 5;
|
|
344
|
+
return initPage(page, baseURL);
|
|
345
|
+
case 5:
|
|
346
|
+
_context11.next = 7;
|
|
347
|
+
return initTree(page, {
|
|
348
|
+
autoOpen: 3,
|
|
349
|
+
dragAndDrop: true
|
|
350
|
+
});
|
|
351
|
+
case 7:
|
|
352
|
+
_context11.t0 = _test.expect;
|
|
353
|
+
_context11.next = 10;
|
|
354
|
+
return page.getByRole("document").evaluate(function (element) {
|
|
355
|
+
return element.scrollLeft;
|
|
356
|
+
});
|
|
357
|
+
case 10:
|
|
358
|
+
_context11.t1 = _context11.sent;
|
|
359
|
+
(0, _context11.t0)(_context11.t1).toEqual(0);
|
|
360
|
+
_context11.next = 14;
|
|
361
|
+
return (0, _testUtils.moveMouseToNode)(page, "Saurischia");
|
|
362
|
+
case 14:
|
|
363
|
+
_context11.next = 16;
|
|
364
|
+
return page.mouse.down();
|
|
365
|
+
case 16:
|
|
366
|
+
_context11.next = 18;
|
|
367
|
+
return page.waitForTimeout(200);
|
|
368
|
+
case 18:
|
|
369
|
+
_context11.next = 20;
|
|
370
|
+
return page.mouse.move(55, 10);
|
|
371
|
+
case 20:
|
|
372
|
+
_context11.next = 22;
|
|
373
|
+
return page.waitForTimeout(50);
|
|
374
|
+
case 22:
|
|
375
|
+
_context11.t2 = _test.expect;
|
|
376
|
+
_context11.next = 25;
|
|
377
|
+
return page.getByRole("document").evaluate(function (element) {
|
|
378
|
+
return element.scrollLeft;
|
|
379
|
+
});
|
|
380
|
+
case 25:
|
|
381
|
+
_context11.t3 = _context11.sent;
|
|
382
|
+
(0, _context11.t2)(_context11.t3).toBeGreaterThan(0);
|
|
383
|
+
case 27:
|
|
384
|
+
case "end":
|
|
385
|
+
return _context11.stop();
|
|
386
|
+
}
|
|
387
|
+
}, _callee11);
|
|
388
|
+
}));
|
|
389
|
+
return function (_x13) {
|
|
390
|
+
return _ref21.apply(this, arguments);
|
|
391
|
+
};
|
|
392
|
+
}());
|
|
393
|
+
(0, _test.test)("scrollToNode scrolls to a node", /*#__PURE__*/function () {
|
|
394
|
+
var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_ref22) {
|
|
395
|
+
var baseURL, page;
|
|
396
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
397
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
398
|
+
case 0:
|
|
399
|
+
baseURL = _ref22.baseURL, page = _ref22.page;
|
|
400
|
+
_context12.next = 3;
|
|
401
|
+
return page.setViewportSize({
|
|
402
|
+
width: 200,
|
|
403
|
+
height: 100
|
|
404
|
+
});
|
|
405
|
+
case 3:
|
|
406
|
+
_context12.next = 5;
|
|
407
|
+
return initPage(page, baseURL);
|
|
408
|
+
case 5:
|
|
409
|
+
_context12.next = 7;
|
|
410
|
+
return initTree(page, {
|
|
411
|
+
autoOpen: 3,
|
|
412
|
+
dragAndDrop: true
|
|
413
|
+
});
|
|
414
|
+
case 7:
|
|
415
|
+
_context12.t0 = _test.expect;
|
|
416
|
+
_context12.next = 10;
|
|
417
|
+
return page.getByRole("document").evaluate(function (element) {
|
|
418
|
+
return element.scrollTop;
|
|
419
|
+
});
|
|
420
|
+
case 10:
|
|
421
|
+
_context12.t1 = _context12.sent;
|
|
422
|
+
(0, _context12.t0)(_context12.t1).toEqual(0);
|
|
423
|
+
_context12.next = 14;
|
|
424
|
+
return page.evaluate("\n const $tree = jQuery(\"#tree1\");\n const node = $tree.tree(\"getNodeByName\", \"Sauropodomorphs\");\n $tree.tree(\"scrollToNode\",node);\n ");
|
|
425
|
+
case 14:
|
|
426
|
+
_context12.t2 = _test.expect;
|
|
427
|
+
_context12.next = 17;
|
|
428
|
+
return page.getByRole("document").evaluate(function (element) {
|
|
429
|
+
return element.scrollTop;
|
|
430
|
+
});
|
|
431
|
+
case 17:
|
|
432
|
+
_context12.t3 = _context12.sent;
|
|
433
|
+
(0, _context12.t2)(_context12.t3).toBeGreaterThan(0);
|
|
434
|
+
case 19:
|
|
435
|
+
case "end":
|
|
436
|
+
return _context12.stop();
|
|
437
|
+
}
|
|
438
|
+
}, _callee12);
|
|
439
|
+
}));
|
|
440
|
+
return function (_x14) {
|
|
441
|
+
return _ref23.apply(this, arguments);
|
|
442
|
+
};
|
|
443
|
+
}());
|
|
444
|
+
});
|
|
445
|
+
_test.test.describe("autoscroll when the container is scrollable", function () {
|
|
446
|
+
_test.test.beforeEach( /*#__PURE__*/function () {
|
|
447
|
+
var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(_ref24) {
|
|
448
|
+
var page, baseURL;
|
|
449
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
450
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
451
|
+
case 0:
|
|
452
|
+
page = _ref24.page, baseURL = _ref24.baseURL;
|
|
453
|
+
_context13.next = 3;
|
|
454
|
+
return initPage(page, baseURL);
|
|
455
|
+
case 3:
|
|
456
|
+
_context13.next = 5;
|
|
457
|
+
return page.evaluate("\n document.body.style.marginLeft = \"40px\";\n document.body.style.marginTop = \"40px\";\n\n const treeElement = document.querySelector(\"#tree1\");\n\n const container = document.createElement(\"div\");\n container.id = \"container\";\n container.style.height = \"200px\";\n container.style.width = \"60px\";\n container.style.overflowY = \"scroll\";\n\n document.body.replaceChild(container, treeElement);\n container.appendChild(treeElement);\n ");
|
|
458
|
+
case 5:
|
|
459
|
+
_context13.next = 7;
|
|
460
|
+
return initTree(page, {
|
|
461
|
+
autoOpen: 3,
|
|
462
|
+
dragAndDrop: true
|
|
463
|
+
});
|
|
464
|
+
case 7:
|
|
465
|
+
case "end":
|
|
466
|
+
return _context13.stop();
|
|
467
|
+
}
|
|
468
|
+
}, _callee13);
|
|
469
|
+
}));
|
|
470
|
+
return function (_x15) {
|
|
471
|
+
return _ref25.apply(this, arguments);
|
|
472
|
+
};
|
|
473
|
+
}());
|
|
474
|
+
(0, _test.test)("it scrolls vertically when the users drags an element to the bottom", /*#__PURE__*/function () {
|
|
475
|
+
var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(_ref26) {
|
|
476
|
+
var page;
|
|
477
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
478
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
479
|
+
case 0:
|
|
480
|
+
page = _ref26.page;
|
|
481
|
+
_context14.t0 = _test.expect;
|
|
482
|
+
_context14.next = 4;
|
|
483
|
+
return page.locator("#container").evaluate(function (element) {
|
|
484
|
+
return element.scrollTop;
|
|
485
|
+
});
|
|
486
|
+
case 4:
|
|
487
|
+
_context14.t1 = _context14.sent;
|
|
488
|
+
(0, _context14.t0)(_context14.t1).toEqual(0);
|
|
489
|
+
_context14.next = 8;
|
|
490
|
+
return (0, _testUtils.moveMouseToNode)(page, "Saurischia");
|
|
491
|
+
case 8:
|
|
492
|
+
_context14.next = 10;
|
|
493
|
+
return page.mouse.down();
|
|
494
|
+
case 10:
|
|
495
|
+
_context14.next = 12;
|
|
496
|
+
return page.waitForTimeout(200);
|
|
497
|
+
case 12:
|
|
498
|
+
_context14.next = 14;
|
|
499
|
+
return page.mouse.move(20, 245);
|
|
500
|
+
case 14:
|
|
501
|
+
_context14.next = 16;
|
|
502
|
+
return page.waitForTimeout(50);
|
|
503
|
+
case 16:
|
|
504
|
+
_context14.t2 = _test.expect;
|
|
505
|
+
_context14.next = 19;
|
|
506
|
+
return page.locator("#container").evaluate(function (element) {
|
|
507
|
+
return element.scrollTop;
|
|
508
|
+
});
|
|
509
|
+
case 19:
|
|
510
|
+
_context14.t3 = _context14.sent;
|
|
511
|
+
(0, _context14.t2)(_context14.t3).toBeGreaterThan(0);
|
|
512
|
+
case 21:
|
|
513
|
+
case "end":
|
|
514
|
+
return _context14.stop();
|
|
515
|
+
}
|
|
516
|
+
}, _callee14);
|
|
517
|
+
}));
|
|
518
|
+
return function (_x16) {
|
|
519
|
+
return _ref27.apply(this, arguments);
|
|
520
|
+
};
|
|
521
|
+
}());
|
|
522
|
+
(0, _test.test)("it scrolls horizontally when the users drags an element to the right", /*#__PURE__*/function () {
|
|
523
|
+
var _ref29 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(_ref28) {
|
|
524
|
+
var page;
|
|
525
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
526
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
527
|
+
case 0:
|
|
528
|
+
page = _ref28.page;
|
|
529
|
+
_context15.t0 = _test.expect;
|
|
530
|
+
_context15.next = 4;
|
|
531
|
+
return page.locator("#container").evaluate(function (element) {
|
|
532
|
+
return element.scrollLeft;
|
|
533
|
+
});
|
|
534
|
+
case 4:
|
|
535
|
+
_context15.t1 = _context15.sent;
|
|
536
|
+
(0, _context15.t0)(_context15.t1).toEqual(0);
|
|
537
|
+
_context15.next = 8;
|
|
538
|
+
return (0, _testUtils.moveMouseToNode)(page, "Saurischia");
|
|
539
|
+
case 8:
|
|
540
|
+
_context15.next = 10;
|
|
541
|
+
return page.mouse.down();
|
|
542
|
+
case 10:
|
|
543
|
+
_context15.next = 12;
|
|
544
|
+
return page.waitForTimeout(200);
|
|
545
|
+
case 12:
|
|
546
|
+
_context15.next = 14;
|
|
547
|
+
return page.mouse.move(100, 50);
|
|
548
|
+
case 14:
|
|
549
|
+
_context15.next = 16;
|
|
550
|
+
return page.waitForTimeout(50);
|
|
551
|
+
case 16:
|
|
552
|
+
_context15.t2 = _test.expect;
|
|
553
|
+
_context15.next = 19;
|
|
554
|
+
return page.locator("#container").evaluate(function (element) {
|
|
555
|
+
return element.scrollLeft;
|
|
556
|
+
});
|
|
557
|
+
case 19:
|
|
558
|
+
_context15.t3 = _context15.sent;
|
|
559
|
+
(0, _context15.t2)(_context15.t3).toBeGreaterThan(0);
|
|
560
|
+
case 21:
|
|
561
|
+
case "end":
|
|
562
|
+
return _context15.stop();
|
|
563
|
+
}
|
|
564
|
+
}, _callee15);
|
|
565
|
+
}));
|
|
566
|
+
return function (_x17) {
|
|
567
|
+
return _ref29.apply(this, arguments);
|
|
568
|
+
};
|
|
569
|
+
}());
|
|
570
|
+
(0, _test.test)("scrollToNode scrolls to a node", /*#__PURE__*/function () {
|
|
571
|
+
var _ref31 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(_ref30) {
|
|
572
|
+
var page;
|
|
573
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
574
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
575
|
+
case 0:
|
|
576
|
+
page = _ref30.page;
|
|
577
|
+
_context16.t0 = _test.expect;
|
|
578
|
+
_context16.next = 4;
|
|
579
|
+
return page.locator("#container").evaluate(function (element) {
|
|
580
|
+
return element.scrollTop;
|
|
581
|
+
});
|
|
582
|
+
case 4:
|
|
583
|
+
_context16.t1 = _context16.sent;
|
|
584
|
+
(0, _context16.t0)(_context16.t1).toEqual(0);
|
|
585
|
+
_context16.next = 8;
|
|
586
|
+
return page.evaluate("\n const $tree = jQuery(\"#tree1\");\n const node = $tree.tree(\"getNodeByName\", \"Sauropodomorphs\");\n $tree.tree(\"scrollToNode\",node);\n ");
|
|
587
|
+
case 8:
|
|
588
|
+
_context16.t2 = _test.expect;
|
|
589
|
+
_context16.next = 11;
|
|
590
|
+
return page.locator("#container").evaluate(function (element) {
|
|
591
|
+
return element.scrollTop;
|
|
592
|
+
});
|
|
593
|
+
case 11:
|
|
594
|
+
_context16.t3 = _context16.sent;
|
|
595
|
+
(0, _context16.t2)(_context16.t3).toBeGreaterThan(0);
|
|
596
|
+
case 13:
|
|
597
|
+
case "end":
|
|
598
|
+
return _context16.stop();
|
|
599
|
+
}
|
|
600
|
+
}, _callee16);
|
|
601
|
+
}));
|
|
602
|
+
return function (_x18) {
|
|
603
|
+
return _ref31.apply(this, arguments);
|
|
604
|
+
};
|
|
605
|
+
}());
|
|
228
606
|
});
|