@iblai/iblai-js 1.20.11 → 1.20.13
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/dist/data-layer/playwright/tasks-tab-helpers.d.ts +8 -0
- package/dist/playwright/index.cjs +23 -9
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +2 -0
- package/dist/playwright/index.esm.js +23 -9
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/tasks-tab-helpers.d.ts +8 -0
- package/dist/web-containers/playwright/tasks-tab-helpers.d.ts +8 -0
- package/dist/web-containers/source/index.esm.js +9 -4
- package/dist/web-containers/source/next/index.esm.js +11 -6
- package/dist/web-utils/playwright/tasks-tab-helpers.d.ts +8 -0
- package/package.json +3 -3
|
@@ -1451,6 +1451,8 @@ declare const TASKS_LABELS: {
|
|
|
1451
1451
|
readonly empty: "No tasks scheduled.";
|
|
1452
1452
|
};
|
|
1453
1453
|
readonly scheduleDialog: {
|
|
1454
|
+
/** `aria-label` on the dialog's `DialogContent` — scopes in-dialog locators. */
|
|
1455
|
+
readonly dialogName: "schedule-task";
|
|
1454
1456
|
readonly taskName: "Task Name";
|
|
1455
1457
|
readonly taskNamePlaceholder: "Enter task name";
|
|
1456
1458
|
readonly taskPrompt: "Task Prompt";
|
|
@@ -4266,6 +4266,8 @@ const TASKS_LABELS = {
|
|
|
4266
4266
|
empty: 'No tasks scheduled.',
|
|
4267
4267
|
},
|
|
4268
4268
|
scheduleDialog: {
|
|
4269
|
+
/** `aria-label` on the dialog's `DialogContent` — scopes in-dialog locators. */
|
|
4270
|
+
dialogName: 'schedule-task',
|
|
4269
4271
|
taskName: 'Task Name',
|
|
4270
4272
|
taskNamePlaceholder: 'Enter task name',
|
|
4271
4273
|
taskPrompt: 'Task Prompt',
|
|
@@ -4406,11 +4408,18 @@ async function searchTasks(scope, query) {
|
|
|
4406
4408
|
await expect(input).toHaveValue(query);
|
|
4407
4409
|
}
|
|
4408
4410
|
// ── Schedule flow ──────────────────────────────────────────────────────
|
|
4411
|
+
/**
|
|
4412
|
+
* Locator for the Schedule Task dialog itself. Scoping in-dialog queries to
|
|
4413
|
+
* this avoids clashing with the toolbar's "Schedule Task" button, which
|
|
4414
|
+
* shares an accessible name with the dialog's submit button.
|
|
4415
|
+
*/
|
|
4416
|
+
function getScheduleTaskDialog(scope) {
|
|
4417
|
+
return asPage(scope).getByRole('dialog', { name: TASKS_LABELS.scheduleDialog.dialogName });
|
|
4418
|
+
}
|
|
4409
4419
|
/** Open the Schedule Task dialog and wait for it to be interactive. */
|
|
4410
4420
|
async function openScheduleTaskDialog(scope) {
|
|
4411
4421
|
await getScheduleTaskButton(scope).click();
|
|
4412
|
-
|
|
4413
|
-
await expect(page.getByLabel(TASKS_LABELS.scheduleDialog.taskName)).toBeVisible({
|
|
4422
|
+
await expect(getScheduleTaskDialog(scope).getByLabel(TASKS_LABELS.scheduleDialog.taskName)).toBeVisible({
|
|
4414
4423
|
timeout: 10000,
|
|
4415
4424
|
});
|
|
4416
4425
|
}
|
|
@@ -4425,11 +4434,15 @@ async function openScheduleTaskDialog(scope) {
|
|
|
4425
4434
|
async function scheduleTask(scope, opts) {
|
|
4426
4435
|
await openScheduleTaskDialog(scope);
|
|
4427
4436
|
const page = asPage(scope);
|
|
4428
|
-
|
|
4437
|
+
// Scope every query to the dialog: the toolbar "Schedule Task" button shares
|
|
4438
|
+
// an accessible name with the dialog's submit button, so an unscoped
|
|
4439
|
+
// getByRole('button', { name: 'Schedule Task' }) matches two elements.
|
|
4440
|
+
const dialog = getScheduleTaskDialog(scope);
|
|
4441
|
+
await dialog.getByLabel(TASKS_LABELS.scheduleDialog.taskName).fill(opts.name);
|
|
4429
4442
|
if (opts.prompt !== undefined) {
|
|
4430
|
-
await
|
|
4443
|
+
await dialog.getByLabel(TASKS_LABELS.scheduleDialog.taskPrompt).fill(opts.prompt);
|
|
4431
4444
|
}
|
|
4432
|
-
await
|
|
4445
|
+
await dialog.getByLabel(TASKS_LABELS.scheduleDialog.time).fill(opts.time);
|
|
4433
4446
|
if (opts.repeat) {
|
|
4434
4447
|
// The repeat <Select> renders as a combobox via Radix.
|
|
4435
4448
|
const repeatLabel = {
|
|
@@ -4438,16 +4451,17 @@ async function scheduleTask(scope, opts) {
|
|
|
4438
4451
|
weekly: TASKS_LABELS.scheduleDialog.weekly,
|
|
4439
4452
|
monthly: TASKS_LABELS.scheduleDialog.monthly,
|
|
4440
4453
|
}[opts.repeat];
|
|
4441
|
-
await
|
|
4454
|
+
await dialog.getByLabel(TASKS_LABELS.scheduleDialog.repeat).click();
|
|
4455
|
+
// Radix renders the option list in a portal outside the dialog subtree.
|
|
4442
4456
|
await page.getByRole('option', { name: repeatLabel }).click();
|
|
4443
4457
|
}
|
|
4444
4458
|
if (opts.notifyByEmail) {
|
|
4445
|
-
await
|
|
4459
|
+
await dialog.getByLabel(TASKS_LABELS.scheduleDialog.notifyByEmail).click();
|
|
4446
4460
|
}
|
|
4447
|
-
const submit =
|
|
4461
|
+
const submit = dialog.getByRole('button', { name: TASKS_LABELS.scheduleDialog.schedule });
|
|
4448
4462
|
await expect(submit).toBeEnabled({ timeout: 5000 });
|
|
4449
4463
|
await submit.click();
|
|
4450
|
-
await expect(
|
|
4464
|
+
await expect(dialog).toBeHidden({
|
|
4451
4465
|
timeout: 15000,
|
|
4452
4466
|
});
|
|
4453
4467
|
logger.info(`Scheduled task: ${opts.name}`);
|