@truenas/ui-components 0.1.40 → 0.1.41
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/package.json
CHANGED
|
@@ -4242,6 +4242,20 @@ declare class TnDateInputHarness extends ComponentHarness {
|
|
|
4242
4242
|
* @returns Promise resolving to true if the calendar overlay is visible.
|
|
4243
4243
|
*/
|
|
4244
4244
|
isCalendarOpen(): Promise<boolean>;
|
|
4245
|
+
/**
|
|
4246
|
+
* Selects a date via the calendar popup. Opens the calendar if not already
|
|
4247
|
+
* open, navigates to the target month, and clicks the day cell.
|
|
4248
|
+
*
|
|
4249
|
+
* @param date The date to select.
|
|
4250
|
+
*
|
|
4251
|
+
* @example
|
|
4252
|
+
* ```typescript
|
|
4253
|
+
* const dateInput = await loader.getHarness(TnDateInputHarness);
|
|
4254
|
+
* await dateInput.selectDate(new Date(2026, 3, 15));
|
|
4255
|
+
* expect(await dateInput.getDisplayText()).toBe('04/15/2026');
|
|
4256
|
+
* ```
|
|
4257
|
+
*/
|
|
4258
|
+
selectDate(date: Date): Promise<void>;
|
|
4245
4259
|
}
|
|
4246
4260
|
/**
|
|
4247
4261
|
* Filters for finding `TnDateInputHarness` instances.
|
|
@@ -4328,6 +4342,27 @@ declare class TnDateRangeInputHarness extends ComponentHarness {
|
|
|
4328
4342
|
* @returns Promise resolving to true if the calendar overlay is visible.
|
|
4329
4343
|
*/
|
|
4330
4344
|
isCalendarOpen(): Promise<boolean>;
|
|
4345
|
+
/**
|
|
4346
|
+
* Selects a date range via the calendar popup. Opens the calendar if not
|
|
4347
|
+
* already open, navigates to each target month, and clicks the day cells.
|
|
4348
|
+
*
|
|
4349
|
+
* @param range An object with `start` and `end` dates.
|
|
4350
|
+
*
|
|
4351
|
+
* @example
|
|
4352
|
+
* ```typescript
|
|
4353
|
+
* const rangeInput = await loader.getHarness(TnDateRangeInputHarness);
|
|
4354
|
+
* await rangeInput.selectRange({
|
|
4355
|
+
* start: new Date(2026, 0, 1),
|
|
4356
|
+
* end: new Date(2026, 0, 31),
|
|
4357
|
+
* });
|
|
4358
|
+
* expect(await rangeInput.getStartText()).toBe('01/01/2026');
|
|
4359
|
+
* expect(await rangeInput.getEndText()).toBe('01/31/2026');
|
|
4360
|
+
* ```
|
|
4361
|
+
*/
|
|
4362
|
+
selectRange(range: {
|
|
4363
|
+
start: Date;
|
|
4364
|
+
end: Date;
|
|
4365
|
+
}): Promise<void>;
|
|
4331
4366
|
}
|
|
4332
4367
|
/**
|
|
4333
4368
|
* Filters for finding `TnDateRangeInputHarness` instances.
|