@sap_oss/wdio-qmate-service 3.1.0 → 3.2.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/docs/doc.md +274 -97
- package/lib/reuse/helper/dateTimeFormatParser.d.ts +6 -0
- package/lib/reuse/helper/dateTimeFormatParser.js +28 -0
- package/lib/reuse/helper/dateTimeFormatParser.js.map +1 -0
- package/lib/reuse/helper/timeHelper.d.ts +17 -0
- package/lib/reuse/helper/timeHelper.js +91 -0
- package/lib/reuse/helper/timeHelper.js.map +1 -0
- package/lib/reuse/modules/common/constants/date.constants.d.ts +5 -0
- package/lib/reuse/modules/common/constants/date.constants.js +9 -1
- package/lib/reuse/modules/common/constants/date.constants.js.map +1 -1
- package/lib/reuse/modules/common/date.d.ts +71 -10
- package/lib/reuse/modules/common/date.js +93 -9
- package/lib/reuse/modules/common/date.js.map +1 -1
- package/lib/reuse/modules/common/types/time.types.d.ts +3 -0
- package/lib/reuse/modules/common/types/time.types.js +3 -0
- package/lib/reuse/modules/common/types/time.types.js.map +1 -0
- package/lib/reuse/modules/ui5/date.d.ts +22 -3
- package/lib/reuse/modules/ui5/date.js +111 -25
- package/lib/reuse/modules/ui5/date.js.map +1 -1
- package/lib/reuse/modules/util/constants/formatter.constants.d.ts +10 -0
- package/lib/reuse/modules/util/constants/formatter.constants.js +14 -1
- package/lib/reuse/modules/util/constants/formatter.constants.js.map +1 -1
- package/lib/reuse/modules/util/formatter.d.ts +34 -2
- package/lib/reuse/modules/util/formatter.js +77 -1
- package/lib/reuse/modules/util/formatter.js.map +1 -1
- package/lib/reuse/modules/util/types/formatter.types.d.ts +4 -1
- package/lib/scripts/locators/qmateLocator.js +1 -1
- package/lib/scripts/locators/qmateLocator.js.map +1 -1
- package/lib/scripts/locators/qmateLocatorSrc/comparators/Comparator.js +1 -1
- package/lib/scripts/locators/qmateLocatorSrc/comparators/Comparator.js.map +1 -1
- package/package.json +1 -1
- package/test/reuse/common/date/calculateWithTime.spec.js +399 -0
- package/test/reuse/common/date/getCurrentDateAndTime.spec.js +31 -0
- package/test/reuse/common/date/test.date.conf.js +2 -0
- package/test/reuse/common/date/utils.js +10 -1
- package/test/reuse/ui5/date/pickWithTime.spec.js +155 -0
- package/test/reuse/ui5/date/test.date.conf.js +5 -1
- package/test/reuse/util/formatter/formatDateWithTime.spec.js +357 -0
- package/test/reuse/util/formatter/test.formatter.conf.js +2 -1
package/docs/doc.md
CHANGED
|
@@ -49,9 +49,12 @@ Global namespace for common modules.
|
|
|
49
49
|
* [.getPreviousYear([format])](#common.date.getPreviousYear) ⇒ <code>String</code>
|
|
50
50
|
* [.getSpecific(date, [format])](#common.date.getSpecific) ⇒ <code>String</code>
|
|
51
51
|
* [.calculate([date], [format])](#common.date.calculate) ⇒ <code>String</code> \| <code>Date</code>
|
|
52
|
+
* [.getCurrentDateAndTime([format])](#common.date.getCurrentDateAndTime) ⇒ <code>String</code> \| <code>Date</code>
|
|
53
|
+
* [.calculateWithTime([date], [time], [format])](#common.date.calculateWithTime) ⇒ <code>String</code> \| <code>Date</code>
|
|
52
54
|
* [.navigation](#common.navigation)
|
|
53
55
|
* [.navigateToUrl(url)](#common.navigation.navigateToUrl)
|
|
54
56
|
* [.navigateToUrlAndRetry(url, [retries], [interval])](#common.navigation.navigateToUrlAndRetry)
|
|
57
|
+
* [.time](#common.time)
|
|
55
58
|
* [.userInteraction](#common.userInteraction)
|
|
56
59
|
* [.fillActive(value)](#common.userInteraction.fillActive)
|
|
57
60
|
* [.fillActiveAndRetry(value, [retries], [interval])](#common.userInteraction.fillActiveAndRetry)
|
|
@@ -196,6 +199,8 @@ await common.assertion.expectUrlToBe("www.sap.com");
|
|
|
196
199
|
* [.getPreviousYear([format])](#common.date.getPreviousYear) ⇒ <code>String</code>
|
|
197
200
|
* [.getSpecific(date, [format])](#common.date.getSpecific) ⇒ <code>String</code>
|
|
198
201
|
* [.calculate([date], [format])](#common.date.calculate) ⇒ <code>String</code> \| <code>Date</code>
|
|
202
|
+
* [.getCurrentDateAndTime([format])](#common.date.getCurrentDateAndTime) ⇒ <code>String</code> \| <code>Date</code>
|
|
203
|
+
* [.calculateWithTime([date], [time], [format])](#common.date.calculateWithTime) ⇒ <code>String</code> \| <code>Date</code>
|
|
199
204
|
|
|
200
205
|
<a name="common.date.getToday"></a>
|
|
201
206
|
|
|
@@ -207,7 +212,7 @@ Returns the current day in the given format.
|
|
|
207
212
|
|
|
208
213
|
| Param | Type | Default | Description |
|
|
209
214
|
| --- | --- | --- | --- |
|
|
210
|
-
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "mmm dd, yyyy", "datetime", "object"). |
|
|
215
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
|
|
211
216
|
|
|
212
217
|
**Example**
|
|
213
218
|
```js
|
|
@@ -223,7 +228,7 @@ Returns tomorrows date in the given format.
|
|
|
223
228
|
|
|
224
229
|
| Param | Type | Default | Description |
|
|
225
230
|
| --- | --- | --- | --- |
|
|
226
|
-
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "mmm dd, yyyy", "datetime", "object"). |
|
|
231
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
|
|
227
232
|
|
|
228
233
|
**Example**
|
|
229
234
|
```js
|
|
@@ -239,7 +244,7 @@ Returns the current day one month later in the given format.
|
|
|
239
244
|
|
|
240
245
|
| Param | Type | Default | Description |
|
|
241
246
|
| --- | --- | --- | --- |
|
|
242
|
-
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "mmm dd, yyyy", "datetime", "object"). |
|
|
247
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
|
|
243
248
|
|
|
244
249
|
**Example**
|
|
245
250
|
```js
|
|
@@ -255,7 +260,7 @@ Returns the current day one month before in the given format.
|
|
|
255
260
|
|
|
256
261
|
| Param | Type | Default | Description |
|
|
257
262
|
| --- | --- | --- | --- |
|
|
258
|
-
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "mmm dd, yyyy", "datetime", "object"). |
|
|
263
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
|
|
259
264
|
|
|
260
265
|
**Example**
|
|
261
266
|
```js
|
|
@@ -271,7 +276,7 @@ Returns the current day one year later in the given format.
|
|
|
271
276
|
|
|
272
277
|
| Param | Type | Default | Description |
|
|
273
278
|
| --- | --- | --- | --- |
|
|
274
|
-
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "mmm dd, yyyy", "datetime", "object"). |
|
|
279
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
|
|
275
280
|
|
|
276
281
|
**Example**
|
|
277
282
|
```js
|
|
@@ -287,7 +292,7 @@ Returns the current day one year before in the given format.
|
|
|
287
292
|
|
|
288
293
|
| Param | Type | Default | Description |
|
|
289
294
|
| --- | --- | --- | --- |
|
|
290
|
-
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "mmm dd, yyyy", "datetime", "object"). |
|
|
295
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
|
|
291
296
|
|
|
292
297
|
**Example**
|
|
293
298
|
```js
|
|
@@ -304,7 +309,7 @@ Returns a specific date in the given format.
|
|
|
304
309
|
| Param | Type | Default | Description |
|
|
305
310
|
| --- | --- | --- | --- |
|
|
306
311
|
| date | <code>String</code> | | A specific date string. |
|
|
307
|
-
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "mmm dd, yyyy", "datetime", "object"). |
|
|
312
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
|
|
308
313
|
|
|
309
314
|
**Example**
|
|
310
315
|
```js
|
|
@@ -320,13 +325,89 @@ Calculates the date based on the input parameter and returns it in the given for
|
|
|
320
325
|
|
|
321
326
|
| Param | Type | Default | Description |
|
|
322
327
|
| --- | --- | --- | --- |
|
|
323
|
-
| [date] | <code>String</code> | <code>"today"</code> | Supported values: today, tomorrow, nextMonth, previousMonth, nextYear, previousYear |
|
|
324
|
-
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "mmm dd, yyyy", "mmm d, yyyy", "datetime", "object"). |
|
|
328
|
+
| [date] | <code>String</code> | <code>"today"</code> | Supported values: "today", "tomorrow", "nextMonth", "previousMonth", "nextYear", "previousYear" If the date is not provided, "today" will be used. |
|
|
329
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
|
|
325
330
|
|
|
326
331
|
**Example**
|
|
327
332
|
```js
|
|
328
333
|
const date = await common.date.calculate("today", "mm/dd/yyyy");
|
|
329
334
|
```
|
|
335
|
+
<a name="common.date.getCurrentDateAndTime"></a>
|
|
336
|
+
|
|
337
|
+
#### date.getCurrentDateAndTime([format]) ⇒ <code>String</code> \| <code>Date</code>
|
|
338
|
+
Returns the current date and time in the given format.
|
|
339
|
+
|
|
340
|
+
**Kind**: static method of [<code>date</code>](#common.date)
|
|
341
|
+
**Returns**: <code>String</code> \| <code>Date</code> - The calculated date and time in the given format.
|
|
342
|
+
|
|
343
|
+
| Param | Type | Default | Description |
|
|
344
|
+
| --- | --- | --- | --- |
|
|
345
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected format as a string, which consists of date and time formats, separated by a whitespace or another delimiter. Supported formats are the same as for the [calculateWithTime](#common.date.calculateWithTime) method.<br> |
|
|
346
|
+
|
|
347
|
+
**Example**
|
|
348
|
+
```js
|
|
349
|
+
const date = common.date.getCurrentDateAndTime("mm/dd/yyyy HH:mm:ss");
|
|
350
|
+
// returns a string like "06/17/2025 08:17:27"
|
|
351
|
+
```
|
|
352
|
+
**Example**
|
|
353
|
+
```js
|
|
354
|
+
const date = common.date.getCurrentDateAndTime();
|
|
355
|
+
// returns a Date object like "Tue Jun 17 2025 08:17:27 GMT+0200 (Central European Summer Time)"
|
|
356
|
+
```
|
|
357
|
+
<a name="common.date.calculateWithTime"></a>
|
|
358
|
+
|
|
359
|
+
#### date.calculateWithTime([date], [time], [format]) ⇒ <code>String</code> \| <code>Date</code>
|
|
360
|
+
Calculates the date and time based on the input parameter and returns it in the given format.
|
|
361
|
+
|
|
362
|
+
**Kind**: static method of [<code>date</code>](#common.date)
|
|
363
|
+
**Returns**: <code>String</code> \| <code>Date</code> - The calculated date and time in the given format.
|
|
364
|
+
|
|
365
|
+
| Param | Type | Default | Description |
|
|
366
|
+
| --- | --- | --- | --- |
|
|
367
|
+
| [date] | <code>String</code> | <code>"today"</code> | Supported values: "today", "tomorrow", "nextMonth", "previousMonth", "nextYear", "previousYear". |
|
|
368
|
+
| [time] | <code>String</code> | | The time of day. Supported formats: "HH:MM:SS" (e.g. "10:30:20"), "HH:MM" (e.g. "10:30"), "HH" (e.g. "10"). It can also be in 12-hour format with AM/PM (e.g. "10:30 PM", "3 AM"). It can also be a time anchor, such as "currentTime", "startOfDay", or "endOfDay".<br> If not provided, the time will default to the "startOfDay". |
|
|
369
|
+
| [format] | <code>String</code> | <code>"object"</code> | The expected output format as a string, which consists of <b>date and time formats, separated by a whitespace or another delimiter</b> (such as 'T' substring).<br> - Supported <b>date</b> formats are the same as for the [calculate](#common.date.calculate) method.<br> - Supported <b>time</b> formats are the following: "HH\:mm:ss" (24-hour format), "h\:mm:ss a" (12-hour format), "HH\:mm:ss z" (24-hour format with timezone), "h\:mm:ss a z" (12-hour format with timezone), "HH\:mm" (24-hour format), "h\:mm a" (12-hour format), "HH" (24-hour format), "h a" (12-hour format).<br> - Examples of <b>expected format</b>: "datetime", "object", "mm/dd/yyyy HH\:mm:ss", "dd.mm.yyyy h\:mm:ss a", "dd/mm/yyyy HH\:mm:ss z", "yyyymmddTh\:mm:ss a z", "yyyy/mm/dd HH\:mm", "mmm dd, yyyy h\:mm a", "mmm d, yyyy HH", "mmm d, yyyy h a", and other combinations of supported date and time formats.<br> |
|
|
370
|
+
|
|
371
|
+
**Example**
|
|
372
|
+
```js
|
|
373
|
+
const date = common.date.calculateWithTime("today", "10:00");
|
|
374
|
+
// returns a Date object like "Tue Jun 17 2025 08:17:27 GMT+0200 (Central European Summer Time)"
|
|
375
|
+
```
|
|
376
|
+
**Example**
|
|
377
|
+
```js
|
|
378
|
+
const date = common.date.calculateWithTime("today", "10:00:00", "mm/dd/yyyy HH:mm:ss");
|
|
379
|
+
// returns a string like "06/17/2025 10:00:00"
|
|
380
|
+
```
|
|
381
|
+
**Example**
|
|
382
|
+
```js
|
|
383
|
+
const date = common.date.calculateWithTime("nextMonth", "9:00 PM", "mm-dd-yyyy h:mm a");
|
|
384
|
+
// returns a string like "07-17-2025 9:00 PM"
|
|
385
|
+
```
|
|
386
|
+
**Example**
|
|
387
|
+
```js
|
|
388
|
+
const date = common.date.calculateWithTime("previousMonth", "22:00:45", "dd.mm.yyyy HH:mm:ss");
|
|
389
|
+
// returns a string like "17.05.2025 22:00:45"
|
|
390
|
+
```
|
|
391
|
+
**Example**
|
|
392
|
+
```js
|
|
393
|
+
const date = common.date.calculateWithTime("nextYear", "3 AM", "dd/mm/yyyy h a");
|
|
394
|
+
// returns a string like "17/06/2026 3 AM"
|
|
395
|
+
```
|
|
396
|
+
**Example**
|
|
397
|
+
```js
|
|
398
|
+
const date = common.date.calculateWithTime("previousYear", "15:30", "yyyymmddTHH:mm");
|
|
399
|
+
// returns a string like "20240617T15:30"
|
|
400
|
+
```
|
|
401
|
+
**Example**
|
|
402
|
+
```js
|
|
403
|
+
const date = common.date.calculateWithTime("tomorrow", "10:00:50", "mmm dd, yyyy HH:mm:ss z");
|
|
404
|
+
// returns a string like "Jun 18, 2025 10:00:50 GMT+02:00"
|
|
405
|
+
```
|
|
406
|
+
**Example**
|
|
407
|
+
```js
|
|
408
|
+
const date = common.date.calculateWithTime("today", "startOfDay", "dd.mm.yyyy HH:mm:ss");
|
|
409
|
+
// returns a string like "17.06.2025 00:00:00"
|
|
410
|
+
```
|
|
330
411
|
<a name="common.navigation"></a>
|
|
331
412
|
|
|
332
413
|
### common.navigation
|
|
@@ -368,6 +449,10 @@ Navigates to the passed url and retries the function in case of a failure.
|
|
|
368
449
|
```js
|
|
369
450
|
await common.navigation.navigateToUrlAndRetry("www.sap.com");
|
|
370
451
|
```
|
|
452
|
+
<a name="common.time"></a>
|
|
453
|
+
|
|
454
|
+
### common.time
|
|
455
|
+
**Kind**: static class of [<code>common</code>](#common)
|
|
371
456
|
<a name="common.userInteraction"></a>
|
|
372
457
|
|
|
373
458
|
### common.userInteraction
|
|
@@ -618,6 +703,7 @@ Global namespace for util modules.
|
|
|
618
703
|
* [.stringifyJSON(object)](#util.formatter.stringifyJSON) ⇒ <code>String</code>
|
|
619
704
|
* [.addRemoveLeadingZeros(number, length)](#util.formatter.addRemoveLeadingZeros) ⇒ <code>String</code>
|
|
620
705
|
* [.formatDate(date, format, [locale])](#util.formatter.formatDate) ⇒ <code>String</code>
|
|
706
|
+
* [.formatDateWithTime(date, format, [locale])](#util.formatter.formatDateWithTime) ⇒ <code>String</code> \| <code>Date</code>
|
|
621
707
|
* [.function](#util.function)
|
|
622
708
|
* [.retry(fct, args, [retries], [interval], [scope])](#util.function.retry)
|
|
623
709
|
* [.executeOptional(fct, args)](#util.function.executeOptional)
|
|
@@ -1496,6 +1582,7 @@ const fileNames = await util.file.getFileNamesByExtensions("regression/downloads
|
|
|
1496
1582
|
* [.stringifyJSON(object)](#util.formatter.stringifyJSON) ⇒ <code>String</code>
|
|
1497
1583
|
* [.addRemoveLeadingZeros(number, length)](#util.formatter.addRemoveLeadingZeros) ⇒ <code>String</code>
|
|
1498
1584
|
* [.formatDate(date, format, [locale])](#util.formatter.formatDate) ⇒ <code>String</code>
|
|
1585
|
+
* [.formatDateWithTime(date, format, [locale])](#util.formatter.formatDateWithTime) ⇒ <code>String</code> \| <code>Date</code>
|
|
1499
1586
|
|
|
1500
1587
|
<a name="util.formatter.sliceStringAt"></a>
|
|
1501
1588
|
|
|
@@ -1618,7 +1705,7 @@ formats date.
|
|
|
1618
1705
|
| Param | Type | Default | Description |
|
|
1619
1706
|
| --- | --- | --- | --- |
|
|
1620
1707
|
| date | <code>Date</code> | | The date object to be formatted. |
|
|
1621
|
-
| format | <code>String</code> | | The expected format ("mm/dd/yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "mmm dd, yyyy", "mmm d, yyyy", "datetime", "object"). |
|
|
1708
|
+
| format | <code>String</code> | | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
|
|
1622
1709
|
| [locale] | <code>String</code> | <code>"en-US"</code> | The locale format of the date. E.g. "en-US", "de-DE", etc. |
|
|
1623
1710
|
|
|
1624
1711
|
**Example**
|
|
@@ -1633,6 +1720,50 @@ const date = new Date(2022, 3, 12);
|
|
|
1633
1720
|
const formattedDate = util.formatter.formatDate(date, "mmm dd, yyyy");
|
|
1634
1721
|
// returns "Apr 03, 2022"
|
|
1635
1722
|
```
|
|
1723
|
+
<a name="util.formatter.formatDateWithTime"></a>
|
|
1724
|
+
|
|
1725
|
+
#### formatter.formatDateWithTime(date, format, [locale]) ⇒ <code>String</code> \| <code>Date</code>
|
|
1726
|
+
formats date with time.
|
|
1727
|
+
|
|
1728
|
+
**Kind**: static method of [<code>formatter</code>](#util.formatter)
|
|
1729
|
+
**Returns**: <code>String</code> \| <code>Date</code> - The formatted date with time as string or date object.
|
|
1730
|
+
|
|
1731
|
+
| Param | Type | Default | Description |
|
|
1732
|
+
| --- | --- | --- | --- |
|
|
1733
|
+
| date | <code>Date</code> | | The date object to be formatted. |
|
|
1734
|
+
| format | <code>String</code> | | The expected format ("datetime", "object", "mm/dd/yyyy HH\:mm:ss", "dd.mm.yyyy h\:mm:ss a", "dd/mm/yyyy HH\:mm:ss z", "yyyymmdd h\:mm:ss a z", "yyyy/mm/dd HH\:mm", "mmm dd, yyyy h\:mm a", "mmm d, yyyy HH", "mmm d, yyyy h a", etc.).<br> See the `format` argument of the [calculateWithTime](#common.date.calculateWithTime) function for more details on the available formats. |
|
|
1735
|
+
| [locale] | <code>String</code> | <code>"en-US"</code> | The locale format of the date. E.g. "en-US", "de-DE", etc. |
|
|
1736
|
+
|
|
1737
|
+
**Example**
|
|
1738
|
+
```js
|
|
1739
|
+
const date = new Date(2020, 0, 17, 15, 30, 45);
|
|
1740
|
+
const formattedDate = util.formatter.formatDateWithTime(date, "mm/dd/yyyy HH:mm:ss");
|
|
1741
|
+
// returns "01/17/2020 15:30:45"
|
|
1742
|
+
```
|
|
1743
|
+
**Example**
|
|
1744
|
+
```js
|
|
1745
|
+
const date = new Date(2022, 3, 12, 9, 5, 0);
|
|
1746
|
+
const formattedDate = util.formatter.formatDateWithTime(date, "mmm dd, yyyy h:mm:ss a");
|
|
1747
|
+
// returns "Apr 12, 2022 9:05:00 AM"
|
|
1748
|
+
```
|
|
1749
|
+
**Example**
|
|
1750
|
+
```js
|
|
1751
|
+
const date = new Date(2022, 3, 12, 9, 5, 0);
|
|
1752
|
+
const formattedDate = util.formatter.formatDateWithTime(date, "dd/mm/yyyy HH:mm:ss z");
|
|
1753
|
+
// returns "12/04/2022 09:05:00 GMT+02:00"
|
|
1754
|
+
```
|
|
1755
|
+
**Example**
|
|
1756
|
+
```js
|
|
1757
|
+
const date = new Date(2022, 3, 12, 9, 5, 0);
|
|
1758
|
+
const formattedDate = util.formatter.formatDateWithTime(date, "yyyy/mm/dd HH:mm");
|
|
1759
|
+
// returns "2022/04/12 09:05"
|
|
1760
|
+
```
|
|
1761
|
+
**Example**
|
|
1762
|
+
```js
|
|
1763
|
+
const date = new Date(2022, 3, 12, 9, 5, 0);
|
|
1764
|
+
const formattedDate = util.formatter.formatDateWithTime(date, "mmm dd, yyyy h:mm a");
|
|
1765
|
+
// returns "Apr 12, 2022 9:05 AM"
|
|
1766
|
+
```
|
|
1636
1767
|
<a name="util.function"></a>
|
|
1637
1768
|
|
|
1638
1769
|
### util.function
|
|
@@ -1753,6 +1884,7 @@ Global namespace for UI5 modules.
|
|
|
1753
1884
|
* [.date](#ui5.date)
|
|
1754
1885
|
* [.pick(selector, date, [index])](#ui5.date.pick)
|
|
1755
1886
|
* [.pickRange(selector, range, [index])](#ui5.date.pickRange)
|
|
1887
|
+
* [.pickWithTime(selector, date, [index])](#ui5.date.pickWithTime)
|
|
1756
1888
|
* [.fillRange(selector, range, [index])](#ui5.date.fillRange)
|
|
1757
1889
|
* [.element](#ui5.element)
|
|
1758
1890
|
* [.waitForAll(selector, [timeout])](#ui5.element.waitForAll)
|
|
@@ -1782,7 +1914,7 @@ Global namespace for UI5 modules.
|
|
|
1782
1914
|
* [.clickPost([timeout])](#ui5.footerBar.clickPost)
|
|
1783
1915
|
* [.clickAdd([timeout])](#ui5.footerBar.clickAdd)
|
|
1784
1916
|
* [.mockserver](#ui5.mockserver)
|
|
1785
|
-
* [.waitForUi5ApplicationLoad(
|
|
1917
|
+
* [.waitForUi5ApplicationLoad()](#ui5.mockserver.waitForUi5ApplicationLoad)
|
|
1786
1918
|
* [.interactWithMockServer(mockServerPath, fnCallback, oParams)](#ui5.mockserver.interactWithMockServer)
|
|
1787
1919
|
* [.attachFunctionBefore(method, mockServerPath, fnBeforeCallback, oParams)](#ui5.mockserver.attachFunctionBefore)
|
|
1788
1920
|
* [.attachFunctionAfter(method, mockServerPath, fnAfterCallback, oParams)](#ui5.mockserver.attachFunctionAfter)
|
|
@@ -1828,14 +1960,15 @@ Global namespace for UI5 modules.
|
|
|
1828
1960
|
* [.clickSettingsButton(tableSelector)](#ui5.table.clickSettingsButton)
|
|
1829
1961
|
* [.getTotalNumberOfRows(tableSelectorOrId)](#ui5.table.getTotalNumberOfRows) ⇒ <code>Number</code>
|
|
1830
1962
|
* [.getTotalNumberOfRowsByValues(tableSelectorOrId, values, [index])](#ui5.table.getTotalNumberOfRowsByValues) ⇒ <code>Number</code>
|
|
1831
|
-
* [.selectRowByIndex(tableSelectorOrId, index)](#ui5.table.selectRowByIndex)
|
|
1832
|
-
* [.openItemByIndex(tableSelectorOrId, index)](#ui5.table.openItemByIndex)
|
|
1833
|
-
* [.openItemByValues(tableSelectorOrId, values, [index])](#ui5.table.openItemByValues)
|
|
1834
1963
|
* [.getSelectorsForRowsByValues(tableSelectorOrId, values)](#ui5.table.getSelectorsForRowsByValues)
|
|
1835
1964
|
* [.getSelectorForRowByIndex(tableSelectorOrId, index)](#ui5.table.getSelectorForRowByIndex)
|
|
1965
|
+
* [.selectRowByIndex(tableSelectorOrId, index)](#ui5.table.selectRowByIndex)
|
|
1836
1966
|
* [.selectAllRows(tableSelectorOrId)](#ui5.table.selectAllRows)
|
|
1837
1967
|
* [.deselectRowByIndex(tableSelectorOrId)](#ui5.table.deselectRowByIndex)
|
|
1838
1968
|
* [.deselectAllRows(tableSelectorOrId)](#ui5.table.deselectAllRows)
|
|
1969
|
+
* [.selectRowByValues(tableSelectorOrId, values, [index])](#ui5.table.selectRowByValues)
|
|
1970
|
+
* [.openItemByIndex(tableSelectorOrId, index)](#ui5.table.openItemByIndex)
|
|
1971
|
+
* [.openItemByValues(tableSelectorOrId, values, [index])](#ui5.table.openItemByValues)
|
|
1839
1972
|
* [.userInteraction](#ui5.userInteraction)
|
|
1840
1973
|
* [.click(selector, [index], [timeout])](#ui5.userInteraction.click)
|
|
1841
1974
|
* [.clickAndRetry(selector, [index], [timeout], [retries], [interval])](#ui5.userInteraction.clickAndRetry)
|
|
@@ -2479,6 +2612,7 @@ const binding = await ui5.control.getPropertyBinding(elem, propertyName);
|
|
|
2479
2612
|
* [.date](#ui5.date)
|
|
2480
2613
|
* [.pick(selector, date, [index])](#ui5.date.pick)
|
|
2481
2614
|
* [.pickRange(selector, range, [index])](#ui5.date.pickRange)
|
|
2615
|
+
* [.pickWithTime(selector, date, [index])](#ui5.date.pickWithTime)
|
|
2482
2616
|
* [.fillRange(selector, range, [index])](#ui5.date.fillRange)
|
|
2483
2617
|
|
|
2484
2618
|
<a name="ui5.date.pick"></a>
|
|
@@ -2520,6 +2654,24 @@ const end = await common.date.calculate("2021, 1, 3");
|
|
|
2520
2654
|
const range = [start, end];
|
|
2521
2655
|
await ui5.date.pickRange(selector, range);
|
|
2522
2656
|
```
|
|
2657
|
+
<a name="ui5.date.pickWithTime"></a>
|
|
2658
|
+
|
|
2659
|
+
#### date.pickWithTime(selector, date, [index])
|
|
2660
|
+
Picks the passed date with time using the "DateTimePicker" with the given selector.
|
|
2661
|
+
|
|
2662
|
+
**Kind**: static method of [<code>date</code>](#ui5.date)
|
|
2663
|
+
|
|
2664
|
+
| Param | Type | Default | Description |
|
|
2665
|
+
| --- | --- | --- | --- |
|
|
2666
|
+
| selector | <code>Selector</code> | | The selector describing the element. |
|
|
2667
|
+
| date | <code>Date</code> | | The date object. |
|
|
2668
|
+
| [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
|
|
2669
|
+
|
|
2670
|
+
**Example**
|
|
2671
|
+
```js
|
|
2672
|
+
const tomorrowMorning = await common.date.calculateWithTime("tomorrow", "09:30:45");
|
|
2673
|
+
await ui5.date.pickWithTime(selector, tomorrowMorning);
|
|
2674
|
+
```
|
|
2523
2675
|
<a name="ui5.date.fillRange"></a>
|
|
2524
2676
|
|
|
2525
2677
|
#### date.fillRange(selector, range, [index])
|
|
@@ -2999,7 +3151,7 @@ await ui5.footerBar.clickAdd();
|
|
|
2999
3151
|
**Kind**: static class of [<code>ui5</code>](#ui5)
|
|
3000
3152
|
|
|
3001
3153
|
* [.mockserver](#ui5.mockserver)
|
|
3002
|
-
* [.waitForUi5ApplicationLoad(
|
|
3154
|
+
* [.waitForUi5ApplicationLoad()](#ui5.mockserver.waitForUi5ApplicationLoad)
|
|
3003
3155
|
* [.interactWithMockServer(mockServerPath, fnCallback, oParams)](#ui5.mockserver.interactWithMockServer)
|
|
3004
3156
|
* [.attachFunctionBefore(method, mockServerPath, fnBeforeCallback, oParams)](#ui5.mockserver.attachFunctionBefore)
|
|
3005
3157
|
* [.attachFunctionAfter(method, mockServerPath, fnAfterCallback, oParams)](#ui5.mockserver.attachFunctionAfter)
|
|
@@ -3016,15 +3168,10 @@ await ui5.footerBar.clickAdd();
|
|
|
3016
3168
|
|
|
3017
3169
|
<a name="ui5.mockserver.waitForUi5ApplicationLoad"></a>
|
|
3018
3170
|
|
|
3019
|
-
#### mockserver.waitForUi5ApplicationLoad(
|
|
3171
|
+
#### mockserver.waitForUi5ApplicationLoad()
|
|
3020
3172
|
Waits for the UI5 framework to load and makes sure XHR request finished und busy indicators are not visible anymore.
|
|
3021
3173
|
|
|
3022
3174
|
**Kind**: static method of [<code>mockserver</code>](#ui5.mockserver)
|
|
3023
|
-
|
|
3024
|
-
| Param | Type | Description |
|
|
3025
|
-
| --- | --- | --- |
|
|
3026
|
-
| interval | <code>Integer</code> | The intervals to use when waiting UI5 to load. |
|
|
3027
|
-
|
|
3028
3175
|
**Example**
|
|
3029
3176
|
```js
|
|
3030
3177
|
await ui5.mockserver.waitForUi5ApplicationLoad(100);
|
|
@@ -3713,14 +3860,15 @@ await ui5.session.expectLogoutText();
|
|
|
3713
3860
|
* [.clickSettingsButton(tableSelector)](#ui5.table.clickSettingsButton)
|
|
3714
3861
|
* [.getTotalNumberOfRows(tableSelectorOrId)](#ui5.table.getTotalNumberOfRows) ⇒ <code>Number</code>
|
|
3715
3862
|
* [.getTotalNumberOfRowsByValues(tableSelectorOrId, values, [index])](#ui5.table.getTotalNumberOfRowsByValues) ⇒ <code>Number</code>
|
|
3716
|
-
* [.selectRowByIndex(tableSelectorOrId, index)](#ui5.table.selectRowByIndex)
|
|
3717
|
-
* [.openItemByIndex(tableSelectorOrId, index)](#ui5.table.openItemByIndex)
|
|
3718
|
-
* [.openItemByValues(tableSelectorOrId, values, [index])](#ui5.table.openItemByValues)
|
|
3719
3863
|
* [.getSelectorsForRowsByValues(tableSelectorOrId, values)](#ui5.table.getSelectorsForRowsByValues)
|
|
3720
3864
|
* [.getSelectorForRowByIndex(tableSelectorOrId, index)](#ui5.table.getSelectorForRowByIndex)
|
|
3865
|
+
* [.selectRowByIndex(tableSelectorOrId, index)](#ui5.table.selectRowByIndex)
|
|
3721
3866
|
* [.selectAllRows(tableSelectorOrId)](#ui5.table.selectAllRows)
|
|
3722
3867
|
* [.deselectRowByIndex(tableSelectorOrId)](#ui5.table.deselectRowByIndex)
|
|
3723
3868
|
* [.deselectAllRows(tableSelectorOrId)](#ui5.table.deselectAllRows)
|
|
3869
|
+
* [.selectRowByValues(tableSelectorOrId, values, [index])](#ui5.table.selectRowByValues)
|
|
3870
|
+
* [.openItemByIndex(tableSelectorOrId, index)](#ui5.table.openItemByIndex)
|
|
3871
|
+
* [.openItemByValues(tableSelectorOrId, values, [index])](#ui5.table.openItemByValues)
|
|
3724
3872
|
|
|
3725
3873
|
<a name="ui5.table.sortColumnAscending"></a>
|
|
3726
3874
|
|
|
@@ -3851,21 +3999,22 @@ const selector = {
|
|
|
3851
3999
|
const numberOfRows = await ui5.table.getTotalNumberOfRowsByValues(selector, ["value1", "value2"]);
|
|
3852
4000
|
const numberOfRows = await ui5.table.getTotalNumberOfRowsByValues(selector, "value");
|
|
3853
4001
|
```
|
|
3854
|
-
<a name="ui5.table.
|
|
4002
|
+
<a name="ui5.table.getSelectorsForRowsByValues"></a>
|
|
3855
4003
|
|
|
3856
|
-
#### table.
|
|
3857
|
-
|
|
4004
|
+
#### table.getSelectorsForRowsByValues(tableSelectorOrId, values)
|
|
4005
|
+
Gets the selectors of rows in the table that contain the given values. If multiple values are provided, it only returns the selectors of rows that contain all of them.
|
|
3858
4006
|
|
|
3859
4007
|
**Kind**: static method of [<code>table</code>](#ui5.table)
|
|
3860
4008
|
|
|
3861
4009
|
| Param | Type | Description |
|
|
3862
4010
|
| --- | --- | --- |
|
|
3863
4011
|
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | The selector or ID describing the table (sap.m.Table | sap.ui.comp.smarttable.SmartTable). |
|
|
3864
|
-
|
|
|
4012
|
+
| values | <code>String</code> \| <code>Array.<String></code> | The value(s) to match in the table rows. |
|
|
3865
4013
|
|
|
3866
4014
|
**Example**
|
|
3867
4015
|
```js
|
|
3868
|
-
|
|
4016
|
+
const id = "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
4017
|
+
await ui5.table.getSelectorsForRowsByValues(id, "February");
|
|
3869
4018
|
```
|
|
3870
4019
|
**Example**
|
|
3871
4020
|
```js
|
|
@@ -3876,12 +4025,12 @@ const selector = {
|
|
|
3876
4025
|
id: "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
3877
4026
|
}
|
|
3878
4027
|
};
|
|
3879
|
-
await ui5.table.
|
|
4028
|
+
await ui5.table.getSelectorsForRowsByValues(selector, ["January", "2022"]);
|
|
3880
4029
|
```
|
|
3881
|
-
<a name="ui5.table.
|
|
4030
|
+
<a name="ui5.table.getSelectorForRowByIndex"></a>
|
|
3882
4031
|
|
|
3883
|
-
#### table.
|
|
3884
|
-
|
|
4032
|
+
#### table.getSelectorForRowByIndex(tableSelectorOrId, index)
|
|
4033
|
+
Gets the selector of a row in the table by its index.
|
|
3885
4034
|
|
|
3886
4035
|
**Kind**: static method of [<code>table</code>](#ui5.table)
|
|
3887
4036
|
|
|
@@ -3894,31 +4043,34 @@ Opens the item in the table by its index.
|
|
|
3894
4043
|
```js
|
|
3895
4044
|
const selector = {
|
|
3896
4045
|
elementProperties: {
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
4046
|
+
viewName: "gs.fin.runstatutoryreports.s1.view.ReportList",
|
|
4047
|
+
metadata: "sap.ui.comp.smarttable.SmartTable",
|
|
4048
|
+
id: "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
3900
4049
|
}
|
|
3901
4050
|
};
|
|
3902
|
-
await ui5.table.
|
|
4051
|
+
const rowSelector = await ui5.table.getSelectorForRowByIndex(selector, 0);
|
|
3903
4052
|
```
|
|
3904
4053
|
**Example**
|
|
3905
4054
|
```js
|
|
3906
|
-
|
|
3907
|
-
await ui5.table.
|
|
4055
|
+
id = "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
4056
|
+
const rowSelector = await ui5.table.getSelectorForRowByIndex(id, 0);
|
|
3908
4057
|
```
|
|
3909
|
-
<a name="ui5.table.
|
|
4058
|
+
<a name="ui5.table.selectRowByIndex"></a>
|
|
3910
4059
|
|
|
3911
|
-
#### table.
|
|
3912
|
-
|
|
4060
|
+
#### table.selectRowByIndex(tableSelectorOrId, index)
|
|
4061
|
+
Selects a row in the table by its index.
|
|
3913
4062
|
|
|
3914
4063
|
**Kind**: static method of [<code>table</code>](#ui5.table)
|
|
3915
4064
|
|
|
3916
|
-
| Param | Type |
|
|
3917
|
-
| --- | --- | --- |
|
|
3918
|
-
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> |
|
|
3919
|
-
|
|
|
3920
|
-
| [index] | <code>Number</code> | <code>0</code> | The index of the matching row to consider. |
|
|
4065
|
+
| Param | Type | Description |
|
|
4066
|
+
| --- | --- | --- |
|
|
4067
|
+
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | The selector or ID describing the table (sap.m.Table | sap.ui.comp.smarttable.SmartTable). |
|
|
4068
|
+
| index | <code>Number</code> | The index of the row to select. |
|
|
3921
4069
|
|
|
4070
|
+
**Example**
|
|
4071
|
+
```js
|
|
4072
|
+
await ui5.table.selectRowByIndex("application-ReportingTask-run-component---ReportList--ReportingTable", 0);
|
|
4073
|
+
```
|
|
3922
4074
|
**Example**
|
|
3923
4075
|
```js
|
|
3924
4076
|
const selector = {
|
|
@@ -3928,53 +4080,66 @@ const selector = {
|
|
|
3928
4080
|
id: "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
3929
4081
|
}
|
|
3930
4082
|
};
|
|
3931
|
-
await ui5.table.
|
|
3932
|
-
```
|
|
3933
|
-
**Example**
|
|
3934
|
-
```js
|
|
3935
|
-
const id = "application-ReportingTask-run-component---ReportList--ReportingTable";
|
|
3936
|
-
await ui5.table.openItemByValues(id, "value");
|
|
4083
|
+
await ui5.table.selectRowByIndex(selector, 0);
|
|
3937
4084
|
```
|
|
3938
|
-
<a name="ui5.table.
|
|
4085
|
+
<a name="ui5.table.selectAllRows"></a>
|
|
3939
4086
|
|
|
3940
|
-
#### table.
|
|
3941
|
-
|
|
4087
|
+
#### table.selectAllRows(tableSelectorOrId)
|
|
4088
|
+
Selects all rows in the table.
|
|
3942
4089
|
|
|
3943
4090
|
**Kind**: static method of [<code>table</code>](#ui5.table)
|
|
3944
4091
|
|
|
3945
4092
|
| Param | Type | Description |
|
|
3946
4093
|
| --- | --- | --- |
|
|
3947
4094
|
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | The selector or ID describing the table (sap.m.Table | sap.ui.comp.smarttable.SmartTable). |
|
|
3948
|
-
| values | <code>string</code> | The value(s) to match in the table rows. |
|
|
3949
4095
|
|
|
3950
4096
|
**Example**
|
|
3951
4097
|
```js
|
|
3952
|
-
|
|
3953
|
-
await ui5.table.
|
|
4098
|
+
await ui5.table.selectAllRows("application-ReportingTask-run-component---ReportList--ReportingTable");
|
|
4099
|
+
await ui5.table.selectAllRows(selector);
|
|
3954
4100
|
```
|
|
4101
|
+
<a name="ui5.table.deselectRowByIndex"></a>
|
|
4102
|
+
|
|
4103
|
+
#### table.deselectRowByIndex(tableSelectorOrId)
|
|
4104
|
+
Deselects a row in the table by its index.
|
|
4105
|
+
|
|
4106
|
+
**Kind**: static method of [<code>table</code>](#ui5.table)
|
|
4107
|
+
|
|
4108
|
+
| Param | Type | Description |
|
|
4109
|
+
| --- | --- | --- |
|
|
4110
|
+
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | The selector or ID describing the table (sap.m.Table | sap.ui.comp.smarttable.SmartTable). |
|
|
4111
|
+
|
|
3955
4112
|
**Example**
|
|
3956
4113
|
```js
|
|
3957
4114
|
const selector = {
|
|
3958
4115
|
elementProperties: {
|
|
3959
4116
|
viewName: "gs.fin.runstatutoryreports.s1.view.ReportList",
|
|
3960
4117
|
metadata: "sap.ui.comp.smarttable.SmartTable",
|
|
3961
|
-
|
|
4118
|
+
id: "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
3962
4119
|
}
|
|
3963
4120
|
};
|
|
3964
|
-
await ui5.table.
|
|
4121
|
+
await ui5.table.deselectRowByIndex(selector, 0);
|
|
3965
4122
|
```
|
|
3966
|
-
|
|
4123
|
+
**Example**
|
|
4124
|
+
```js
|
|
4125
|
+
const id = "application-ReportingTask-run-component---ReportList--ReportingTable";
|
|
4126
|
+
await ui5.table.deselectRowByIndex(id, 0);
|
|
4127
|
+
```
|
|
4128
|
+
<a name="ui5.table.deselectAllRows"></a>
|
|
3967
4129
|
|
|
3968
|
-
#### table.
|
|
3969
|
-
|
|
4130
|
+
#### table.deselectAllRows(tableSelectorOrId)
|
|
4131
|
+
Deselects all rows in the table.
|
|
3970
4132
|
|
|
3971
4133
|
**Kind**: static method of [<code>table</code>](#ui5.table)
|
|
3972
4134
|
|
|
3973
4135
|
| Param | Type | Description |
|
|
3974
4136
|
| --- | --- | --- |
|
|
3975
4137
|
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | The selector or ID describing the table (sap.m.Table | sap.ui.comp.smarttable.SmartTable). |
|
|
3976
|
-
| index | <code>Number</code> | The index of the item to open. |
|
|
3977
4138
|
|
|
4139
|
+
**Example**
|
|
4140
|
+
```js
|
|
4141
|
+
await ui5.table.deselectAllRows("application-ReportingTask-run-component---ReportList--ReportingTable");
|
|
4142
|
+
```
|
|
3978
4143
|
**Example**
|
|
3979
4144
|
```js
|
|
3980
4145
|
const selector = {
|
|
@@ -3984,71 +4149,78 @@ const selector = {
|
|
|
3984
4149
|
id: "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
3985
4150
|
}
|
|
3986
4151
|
};
|
|
3987
|
-
|
|
3988
|
-
```
|
|
3989
|
-
**Example**
|
|
3990
|
-
```js
|
|
3991
|
-
id = "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
3992
|
-
const rowSelector = await ui5.table.getSelectorForRowByIndex(id, 0);
|
|
4152
|
+
await ui5.table.deselectAllRows(selector);
|
|
3993
4153
|
```
|
|
3994
|
-
<a name="ui5.table.
|
|
4154
|
+
<a name="ui5.table.selectRowByValues"></a>
|
|
3995
4155
|
|
|
3996
|
-
#### table.
|
|
3997
|
-
Selects
|
|
4156
|
+
#### table.selectRowByValues(tableSelectorOrId, values, [index])
|
|
4157
|
+
Selects a row in the table by matching value(s). If multiple rows match, selects the one at the given global index (across all pages).
|
|
3998
4158
|
|
|
3999
4159
|
**Kind**: static method of [<code>table</code>](#ui5.table)
|
|
4000
4160
|
|
|
4001
|
-
| Param | Type | Description |
|
|
4002
|
-
| --- | --- | --- |
|
|
4003
|
-
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | The selector or ID describing the table
|
|
4161
|
+
| Param | Type | Default | Description |
|
|
4162
|
+
| --- | --- | --- | --- |
|
|
4163
|
+
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | | The selector or ID describing the table. |
|
|
4164
|
+
| values | <code>String</code> \| <code>Array.<String></code> | | The value(s) to match in the table rows. |
|
|
4165
|
+
| [index] | <code>Number</code> | <code>0</code> | The global index of the matching row to select (across all pages). |
|
|
4004
4166
|
|
|
4005
4167
|
**Example**
|
|
4006
4168
|
```js
|
|
4007
|
-
|
|
4008
|
-
|
|
4169
|
+
const selector = {
|
|
4170
|
+
elementProperties: {
|
|
4171
|
+
viewName: "gs.fin.runstatutoryreports.s1.view.ReportList",
|
|
4172
|
+
metadata: "sap.ui.comp.smarttable.SmartTable",
|
|
4173
|
+
id: "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
4174
|
+
}
|
|
4175
|
+
};
|
|
4176
|
+
await ui5.table.selectRowByValues(selector, ["value1", "value2"]);
|
|
4009
4177
|
```
|
|
4010
|
-
|
|
4178
|
+
**Example**
|
|
4179
|
+
```js
|
|
4180
|
+
const id = "application-ReportingTask-run-component---ReportList--ReportingTable";
|
|
4181
|
+
await ui5.table.selectRowByValues(id, "value", 1);
|
|
4182
|
+
```
|
|
4183
|
+
<a name="ui5.table.openItemByIndex"></a>
|
|
4011
4184
|
|
|
4012
|
-
#### table.
|
|
4013
|
-
|
|
4185
|
+
#### table.openItemByIndex(tableSelectorOrId, index)
|
|
4186
|
+
Opens the item in the table by its index.
|
|
4014
4187
|
|
|
4015
4188
|
**Kind**: static method of [<code>table</code>](#ui5.table)
|
|
4016
4189
|
|
|
4017
4190
|
| Param | Type | Description |
|
|
4018
4191
|
| --- | --- | --- |
|
|
4019
4192
|
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | The selector or ID describing the table (sap.m.Table | sap.ui.comp.smarttable.SmartTable). |
|
|
4193
|
+
| index | <code>Number</code> | The index of the item to open. |
|
|
4020
4194
|
|
|
4021
4195
|
**Example**
|
|
4022
4196
|
```js
|
|
4023
4197
|
const selector = {
|
|
4024
4198
|
elementProperties: {
|
|
4025
|
-
|
|
4026
|
-
|
|
4199
|
+
viewName: "gs.fin.runstatutoryreports.s1.view.ReportList",
|
|
4200
|
+
metadata: "sap.ui.comp.smarttable.SmartTable",
|
|
4027
4201
|
id: "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
4028
4202
|
}
|
|
4029
4203
|
};
|
|
4030
|
-
await ui5.table.
|
|
4204
|
+
await ui5.table.openItemByIndex(selector, 0);
|
|
4031
4205
|
```
|
|
4032
4206
|
**Example**
|
|
4033
4207
|
```js
|
|
4034
4208
|
const id = "application-ReportingTask-run-component---ReportList--ReportingTable";
|
|
4035
|
-
await ui5.table.
|
|
4209
|
+
await ui5.table.openItemByIndex(id, 0);
|
|
4036
4210
|
```
|
|
4037
|
-
<a name="ui5.table.
|
|
4211
|
+
<a name="ui5.table.openItemByValues"></a>
|
|
4038
4212
|
|
|
4039
|
-
#### table.
|
|
4040
|
-
|
|
4213
|
+
#### table.openItemByValues(tableSelectorOrId, values, [index])
|
|
4214
|
+
Opens the item in the table containing the given values. If multiple items match, it opens the index-th item.
|
|
4041
4215
|
|
|
4042
4216
|
**Kind**: static method of [<code>table</code>](#ui5.table)
|
|
4043
4217
|
|
|
4044
|
-
| Param | Type | Description |
|
|
4045
|
-
| --- | --- | --- |
|
|
4046
|
-
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | The selector or ID describing the table (sap.m.Table | sap.ui.comp.smarttable.SmartTable). |
|
|
4218
|
+
| Param | Type | Default | Description |
|
|
4219
|
+
| --- | --- | --- | --- |
|
|
4220
|
+
| tableSelectorOrId | <code>Ui5Selector</code> \| <code>String</code> | | The selector or ID describing the table (sap.m.Table | sap.ui.comp.smarttable.SmartTable). |
|
|
4221
|
+
| values | <code>String</code> \| <code>Array.<String></code> | | The value(s) to match in the table rows. |
|
|
4222
|
+
| [index] | <code>Number</code> | <code>0</code> | The index of the matching row to consider. |
|
|
4047
4223
|
|
|
4048
|
-
**Example**
|
|
4049
|
-
```js
|
|
4050
|
-
await ui5.table.deselectAllRows("application-ReportingTask-run-component---ReportList--ReportingTable");
|
|
4051
|
-
```
|
|
4052
4224
|
**Example**
|
|
4053
4225
|
```js
|
|
4054
4226
|
const selector = {
|
|
@@ -4058,7 +4230,12 @@ const selector = {
|
|
|
4058
4230
|
id: "application-ReportingTask-run-component---ReportList--ReportingTable"
|
|
4059
4231
|
}
|
|
4060
4232
|
};
|
|
4061
|
-
await ui5.table.
|
|
4233
|
+
await ui5.table.openItemByValues(selector, ["value1", "value2"]);
|
|
4234
|
+
```
|
|
4235
|
+
**Example**
|
|
4236
|
+
```js
|
|
4237
|
+
const id = "application-ReportingTask-run-component---ReportList--ReportingTable";
|
|
4238
|
+
await ui5.table.openItemByValues(id, "value");
|
|
4062
4239
|
```
|
|
4063
4240
|
<a name="ui5.userInteraction"></a>
|
|
4064
4241
|
|