@yomotech/view-toolkit 1.0.56 → 1.0.58
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/fesm2022/yomotech-view-toolkit-catalog.mjs +15 -5
- package/fesm2022/yomotech-view-toolkit-catalog.mjs.map +1 -1
- package/fesm2022/yomotech-view-toolkit.mjs +21 -110
- package/fesm2022/yomotech-view-toolkit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/yomotech-view-toolkit-catalog.d.ts +11 -3
- package/types/yomotech-view-toolkit.d.ts +5 -10
|
@@ -378,7 +378,7 @@ function temporalPart(property) {
|
|
|
378
378
|
* - read: ISO, date and time, a value without timezone is local wall time; Z or an offset is
|
|
379
379
|
* dropped (wall time) - P5W1 sends 2025-11-04T16:30:00
|
|
380
380
|
* - send: ISO with the device's offset, 2026-10-18T08:00:00+02:00 (the daily split of the time
|
|
381
|
-
* recording,
|
|
381
|
+
* recording, its add-on, stays as it is)
|
|
382
382
|
* - shown and typed: the app language, year with four digits (de 18.10.2026, time 08:05);
|
|
383
383
|
* lists: displayFormat short / medium (default) / long / iso (2026-10-30 in every language) / custom
|
|
384
384
|
*/
|
|
@@ -685,6 +685,9 @@ function alignRowsOf(center) {
|
|
|
685
685
|
return center?.option?.alignRows === true;
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
689
|
+
// - new: step goToPage - a list with page numbers (point 186)
|
|
690
|
+
// - new: step ifRecords, checks listLoaded and pdf - a list of live data may be empty, the PDF viewer (point 186)
|
|
688
691
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-04
|
|
689
692
|
// - change: tempo in seconds (DEFAULT_TEMPO_SECONDS 0.2) - the pause before each step is set at "Run tests"; the names
|
|
690
693
|
// fast, normal, slow stay valid
|
|
@@ -754,10 +757,10 @@ const TEST_DEVICES = ['mobile', 'tablet', 'laptop', 'desktop'];
|
|
|
754
757
|
/** Old spellings of a device, still taken: "phone" is "mobile" (2026-10-31, the preview's word). */
|
|
755
758
|
const OLD_DEVICE_NAMES = { phone: 'mobile' };
|
|
756
759
|
const ORIENTATIONS = ['portrait', 'landscape'];
|
|
757
|
-
const STEP_KINDS = ['open', 'menu', 'tap', 'type', 'pick', 'press', 'scroll', 'openRecord', 'close', 'cart', 'rotate', 'device', 'wait', 'language', 'reload', 'signIn', 'signOut', 'expect'];
|
|
760
|
+
const STEP_KINDS = ['open', 'menu', 'tap', 'type', 'pick', 'press', 'scroll', 'openRecord', 'ifRecords', 'goToPage', 'close', 'cart', 'rotate', 'device', 'wait', 'language', 'reload', 'signIn', 'signOut', 'expect'];
|
|
758
761
|
/** What an expect step can check - one of them per step. */
|
|
759
762
|
const EXPECT_KINDS = ['value', 'shows', 'keyboard', 'list', 'message', 'visible', 'hidden', 'locked', 'blocked', 'inFrame',
|
|
760
|
-
'page', 'records', 'recordsAtLeast', 'samePlace', 'cartCount', 'toast', 'checked', 'unchecked', 'cardRows',
|
|
763
|
+
'page', 'records', 'recordsAtLeast', 'listLoaded', 'pdf', 'samePlace', 'cartCount', 'toast', 'checked', 'unchecked', 'cardRows',
|
|
761
764
|
'formatted', 'translated', 'fieldVisible', 'restored', 'layout'];
|
|
762
765
|
/** How a value is shown in the language's form (expect formatted). */
|
|
763
766
|
const FORMATS = ['date', 'time', 'datetime', 'number', 'currency'];
|
|
@@ -859,7 +862,7 @@ function stepKind(step) {
|
|
|
859
862
|
const text = (v) => typeof v === 'string' && v.trim().length > 0;
|
|
860
863
|
/** The problems of a flow; an empty list means it can run. */
|
|
861
864
|
/** Step and check keys that hold a number. */
|
|
862
|
-
const NUMBER_KEYS = new Set(['scroll', 'openRecord', 'wait', 'records', 'recordsAtLeast', 'cartCount', 'cardRows']);
|
|
865
|
+
const NUMBER_KEYS = new Set(['scroll', 'goToPage', 'openRecord', 'wait', 'records', 'recordsAtLeast', 'cartCount', 'cardRows']);
|
|
863
866
|
/** The languages a flow runs in: its own (right-to-left left out), "all" = the app's left-to-right ones, none = the main one. */
|
|
864
867
|
function flowLanguages(flow, appLanguages, main) {
|
|
865
868
|
const ltr = (codes) => [...new Set(codes.map((c) => String(c).slice(0, 2).toLowerCase()))].filter((c) => c && !RTL_LANGUAGES.includes(c));
|
|
@@ -1157,6 +1160,10 @@ function checkTestFlow(flow, data) {
|
|
|
1157
1160
|
if (!text(step[kind]))
|
|
1158
1161
|
add('stepNameMissing', n, { kind });
|
|
1159
1162
|
break;
|
|
1163
|
+
case 'goToPage':
|
|
1164
|
+
if (!(Number.isInteger(step.goToPage) && step.goToPage >= 1))
|
|
1165
|
+
add('countNotNumber', n, { kind });
|
|
1166
|
+
break;
|
|
1160
1167
|
case 'scroll':
|
|
1161
1168
|
if (!Number.isInteger(step.scroll) || step.scroll < 1 || step.scroll > 20)
|
|
1162
1169
|
add('scrollOutOfRange', n);
|
|
@@ -1167,6 +1174,7 @@ function checkTestFlow(flow, data) {
|
|
|
1167
1174
|
break;
|
|
1168
1175
|
case 'close':
|
|
1169
1176
|
case 'cart':
|
|
1177
|
+
case 'ifRecords':
|
|
1170
1178
|
if (step[kind] !== true)
|
|
1171
1179
|
add('notTrue', n, { kind });
|
|
1172
1180
|
break;
|
|
@@ -1249,7 +1257,9 @@ function checkExpect(e, n, add) {
|
|
|
1249
1257
|
add('stepNameMissing', n, { kind });
|
|
1250
1258
|
if ((kind === 'records' || kind === 'recordsAtLeast') && !(Number.isInteger(e[kind]) && e[kind] >= 0))
|
|
1251
1259
|
add('countNotNumber', n, { kind });
|
|
1252
|
-
if (kind === 'samePlace' && e
|
|
1260
|
+
if ((kind === 'samePlace' || kind === 'listLoaded') && e[kind] !== true)
|
|
1261
|
+
add('notTrue', n, { kind });
|
|
1262
|
+
if (kind === 'pdf' && typeof e.pdf !== 'boolean')
|
|
1253
1263
|
add('notTrue', n, { kind });
|
|
1254
1264
|
if (kind === 'cardRows' && !(Number.isInteger(e.cardRows) && e.cardRows >= 1 && e.cardRows <= 3))
|
|
1255
1265
|
add('countNotNumber', n, { kind });
|