@iblai/iblai-js 2.3.6 → 2.3.9
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/grader-tab-helpers.d.ts +41 -7
- package/dist/data-layer/playwright/index.d.ts +1 -1
- package/dist/playwright/index.cjs +111 -11
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +42 -8
- package/dist/playwright/index.esm.js +108 -12
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/grader-tab-helpers.d.ts +41 -7
- package/dist/playwright/playwright/index.d.ts +1 -1
- package/dist/security/playwright/grader-tab-helpers.d.ts +41 -7
- package/dist/security/playwright/index.d.ts +1 -1
- package/dist/web-containers/playwright/grader-tab-helpers.d.ts +41 -7
- package/dist/web-containers/playwright/index.d.ts +1 -1
- package/dist/web-containers/source/index.esm.js +307 -70
- package/dist/web-containers/source/next/index.esm.js +753 -144
- package/dist/web-utils/playwright/grader-tab-helpers.d.ts +41 -7
- package/dist/web-utils/playwright/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -25,10 +25,11 @@ export declare const GRADER_LABELS: {
|
|
|
25
25
|
readonly tabName: "Grader";
|
|
26
26
|
readonly capabilityToggle: "Grading";
|
|
27
27
|
readonly subTabs: {
|
|
28
|
-
readonly setup: "Grading
|
|
28
|
+
readonly setup: "Grading Setup";
|
|
29
29
|
readonly rubric: "Rubric";
|
|
30
|
+
readonly results: "Results";
|
|
30
31
|
};
|
|
31
|
-
readonly addButton: "Add
|
|
32
|
+
readonly addButton: "Add Criterion";
|
|
32
33
|
readonly menu: {
|
|
33
34
|
/** aria-label template for a row's three-dots trigger. */
|
|
34
35
|
readonly actionsAria: (name: string) => string;
|
|
@@ -43,18 +44,29 @@ export declare const GRADER_LABELS: {
|
|
|
43
44
|
};
|
|
44
45
|
readonly cancel: "Cancel";
|
|
45
46
|
};
|
|
47
|
+
readonly results: {
|
|
48
|
+
readonly searchUserButton: "Search for User";
|
|
49
|
+
readonly searchUsersPlaceholder: "Search users...";
|
|
50
|
+
readonly overrideButton: "Override";
|
|
51
|
+
/** aria-label template for a result row's Override button. */
|
|
52
|
+
readonly overrideButtonAria: (email: string) => string;
|
|
53
|
+
readonly modal: {
|
|
54
|
+
readonly pointsLabel: "Override Points";
|
|
55
|
+
readonly feedbackLabel: "Override Feedback";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
46
58
|
readonly toasts: {
|
|
47
59
|
readonly toggleOn: "Grading turned on";
|
|
48
60
|
readonly toggleOff: "Grading turned off — your rubric is kept for next time";
|
|
49
61
|
};
|
|
50
62
|
readonly gradingModeOptions: {
|
|
51
|
-
readonly submission: "A
|
|
52
|
-
readonly conversation: "The
|
|
63
|
+
readonly submission: "A Submission";
|
|
64
|
+
readonly conversation: "The Conversation";
|
|
53
65
|
};
|
|
54
66
|
readonly feedbackModeOptions: {
|
|
55
|
-
readonly overall: "Overall
|
|
56
|
-
readonly per_criteria: "Feedback per
|
|
57
|
-
readonly both: "Overall + per
|
|
67
|
+
readonly overall: "Overall Feedback Only";
|
|
68
|
+
readonly per_criteria: "Feedback per Criterion";
|
|
69
|
+
readonly both: "Overall + per Criterion";
|
|
58
70
|
};
|
|
59
71
|
};
|
|
60
72
|
export type GraderSubTab = keyof typeof GRADER_LABELS.subTabs;
|
|
@@ -136,3 +148,25 @@ export declare function expectLastCriterionDeleteDisabled(page: Page, name: stri
|
|
|
136
148
|
export declare function expectGraderMisconfiguredWarning(page: Page, visible: boolean): Promise<void>;
|
|
137
149
|
/** Assert the rubric's live "total possible points" readout (Rubric sub-tab). */
|
|
138
150
|
export declare function expectGraderTotalPoints(page: Page, total: number): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Filter the grade-results list by learner via the "Search for User" picker
|
|
153
|
+
* (switches to the Results sub-tab first). Types into the picker's search box,
|
|
154
|
+
* selects the learner, and gates completion on the matching row rendering.
|
|
155
|
+
*/
|
|
156
|
+
export declare function filterGradeResultsByEmail(page: Page, email: string): Promise<void>;
|
|
157
|
+
/** Assert a grade-result row for the given learner email is visible. */
|
|
158
|
+
export declare function expectGradeResultRow(page: Page, email: string): Promise<void>;
|
|
159
|
+
/**
|
|
160
|
+
* Override a learner's grade via the row's three-dots menu → Override grade
|
|
161
|
+
* popup. Points are in rubric points (0 to the rubric's total). Completion is
|
|
162
|
+
* gated on the popup closing, which only happens after the PATCH resolves.
|
|
163
|
+
*/
|
|
164
|
+
export declare function overrideGradeResult(page: Page, email: string, values: {
|
|
165
|
+
points: number;
|
|
166
|
+
feedback?: string;
|
|
167
|
+
}): Promise<void>;
|
|
168
|
+
/**
|
|
169
|
+
* Clear a learner's grade override via the popup, restoring the AI score.
|
|
170
|
+
* Completion is gated on the popup closing after the PATCH resolves.
|
|
171
|
+
*/
|
|
172
|
+
export declare function clearGradeResultOverride(page: Page, email: string): Promise<void>;
|
|
@@ -29,7 +29,7 @@ export { VOICE_LABELS, isVoiceTabVisible, switchToVoiceTab, switchToVoiceSubTab,
|
|
|
29
29
|
export type { VoiceProvider, CallMode, TtsProvider, SttProvider, LlmProvider, } from './voice-tab-helpers';
|
|
30
30
|
export { SCREENSHARE_LABELS, isScreenShareTabVisible, switchToScreenShareTab, openScreenSharePromptEditor, setScreenSharePrompt, saveScreenSharePrompts, expectScreenShareDisabledHint, } from './screenshare-tab-helpers';
|
|
31
31
|
export type { ScreenSharePromptField } from './screenshare-tab-helpers';
|
|
32
|
-
export { graderTabBody, isGraderTabVisible, switchToGraderTab, switchToGraderSubTab, isGradingEnabled, setGradingEnabled, saveGraderConfig, addGraderCriterion, editGraderCriterion, deleteGraderCriterion, expectLastCriterionDeleteDisabled, expectGraderMisconfiguredWarning, expectGraderTotalPoints, GRADER_LABELS, } from './grader-tab-helpers';
|
|
32
|
+
export { graderTabBody, isGraderTabVisible, switchToGraderTab, switchToGraderSubTab, isGradingEnabled, setGradingEnabled, saveGraderConfig, addGraderCriterion, editGraderCriterion, deleteGraderCriterion, expectLastCriterionDeleteDisabled, expectGraderMisconfiguredWarning, expectGraderTotalPoints, filterGradeResultsByEmail, expectGradeResultRow, overrideGradeResult, clearGradeResultOverride, GRADER_LABELS, } from './grader-tab-helpers';
|
|
33
33
|
export type { GraderCriterionInput, GraderGradingMode, GraderFeedbackMode, GraderSubTab, } from './grader-tab-helpers';
|
|
34
34
|
export { billingPlanSection, billingCreditsSection, billingAutoRechargeSection, getBillingPlanLabel, getBillingAutoRechargeStatus, waitForBillingTabReady, expectBillingPlanSection, expectBillingCreditsSection, expectBillingAutoRechargeSection, expectBillingTabForFreePlan, expectBillingTabForTrialPlan, expectBillingTabForPremiumPlan, expectBillingTabForCurrentPlan, clickBillingUpgrade, clickBillingAddCredits, clickBillingManageBilling, clickBillingManageUsage, } from './billing-tab-helpers';
|
|
35
35
|
export type { BillingAutoRechargeStatus } from './billing-tab-helpers';
|
|
@@ -4066,10 +4066,11 @@ const GRADER_LABELS = {
|
|
|
4066
4066
|
tabName: 'Grader',
|
|
4067
4067
|
capabilityToggle: 'Grading',
|
|
4068
4068
|
subTabs: {
|
|
4069
|
-
setup: 'Grading
|
|
4069
|
+
setup: 'Grading Setup',
|
|
4070
4070
|
rubric: 'Rubric',
|
|
4071
|
+
results: 'Results',
|
|
4071
4072
|
},
|
|
4072
|
-
addButton: 'Add
|
|
4073
|
+
addButton: 'Add Criterion',
|
|
4073
4074
|
menu: {
|
|
4074
4075
|
/** aria-label template for a row's three-dots trigger. */
|
|
4075
4076
|
actionsAria: (name) => `Actions for ${name}`,
|
|
@@ -4084,18 +4085,29 @@ const GRADER_LABELS = {
|
|
|
4084
4085
|
},
|
|
4085
4086
|
cancel: 'Cancel',
|
|
4086
4087
|
},
|
|
4088
|
+
results: {
|
|
4089
|
+
searchUserButton: 'Search for User',
|
|
4090
|
+
searchUsersPlaceholder: 'Search users...',
|
|
4091
|
+
overrideButton: 'Override',
|
|
4092
|
+
/** aria-label template for a result row's Override button. */
|
|
4093
|
+
overrideButtonAria: (email) => `Override grade for ${email}`,
|
|
4094
|
+
modal: {
|
|
4095
|
+
pointsLabel: 'Override Points',
|
|
4096
|
+
feedbackLabel: 'Override Feedback',
|
|
4097
|
+
},
|
|
4098
|
+
},
|
|
4087
4099
|
toasts: {
|
|
4088
4100
|
toggleOn: 'Grading turned on',
|
|
4089
4101
|
toggleOff: 'Grading turned off — your rubric is kept for next time',
|
|
4090
4102
|
},
|
|
4091
4103
|
gradingModeOptions: {
|
|
4092
|
-
submission: 'A
|
|
4093
|
-
conversation: 'The
|
|
4104
|
+
submission: 'A Submission',
|
|
4105
|
+
conversation: 'The Conversation',
|
|
4094
4106
|
},
|
|
4095
4107
|
feedbackModeOptions: {
|
|
4096
|
-
overall: 'Overall
|
|
4097
|
-
per_criteria: 'Feedback per
|
|
4098
|
-
both: 'Overall + per
|
|
4108
|
+
overall: 'Overall Feedback Only',
|
|
4109
|
+
per_criteria: 'Feedback per Criterion',
|
|
4110
|
+
both: 'Overall + per Criterion',
|
|
4099
4111
|
},
|
|
4100
4112
|
};
|
|
4101
4113
|
const UI_TIMEOUT = 10000;
|
|
@@ -4160,9 +4172,12 @@ async function switchToGraderSubTab(page, subTab) {
|
|
|
4160
4172
|
const trigger = body.getByTestId(`grader-sub-tab-${subTab}`);
|
|
4161
4173
|
await test$1.expect(trigger).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4162
4174
|
await trigger.click();
|
|
4163
|
-
const
|
|
4164
|
-
|
|
4165
|
-
:
|
|
4175
|
+
const sectionTestId = {
|
|
4176
|
+
setup: 'grader-setup-section',
|
|
4177
|
+
rubric: 'grader-criteria-section',
|
|
4178
|
+
results: 'grader-results-section',
|
|
4179
|
+
}[subTab];
|
|
4180
|
+
const section = body.getByTestId(sectionTestId);
|
|
4166
4181
|
await test$1.expect(section).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4167
4182
|
logger.info(`Switched to Grader ${subTab} sub-tab`);
|
|
4168
4183
|
}
|
|
@@ -4349,7 +4364,88 @@ async function expectGraderMisconfiguredWarning(page, visible) {
|
|
|
4349
4364
|
/** Assert the rubric's live "total possible points" readout (Rubric sub-tab). */
|
|
4350
4365
|
async function expectGraderTotalPoints(page, total) {
|
|
4351
4366
|
await switchToGraderSubTab(page, 'rubric');
|
|
4352
|
-
await test$1.expect(criteriaSection(page).getByText(`Total
|
|
4367
|
+
await test$1.expect(criteriaSection(page).getByText(`Total Possible Points: ${total}`, { exact: true })).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4368
|
+
}
|
|
4369
|
+
/** The Results sub-tab's section within the tab body. */
|
|
4370
|
+
function resultsSection(page) {
|
|
4371
|
+
return graderTabBody(page).getByTestId('grader-results-section');
|
|
4372
|
+
}
|
|
4373
|
+
/** A grade-result table row containing the given learner email (exact match). */
|
|
4374
|
+
function gradeResultRow(page, email) {
|
|
4375
|
+
return resultsSection(page)
|
|
4376
|
+
.locator('[data-testid^="grader-result-row-"]')
|
|
4377
|
+
.filter({ has: page.getByText(email, { exact: true }) });
|
|
4378
|
+
}
|
|
4379
|
+
/**
|
|
4380
|
+
* Filter the grade-results list by learner via the "Search for User" picker
|
|
4381
|
+
* (switches to the Results sub-tab first). Types into the picker's search box,
|
|
4382
|
+
* selects the learner, and gates completion on the matching row rendering.
|
|
4383
|
+
*/
|
|
4384
|
+
async function filterGradeResultsByEmail(page, email) {
|
|
4385
|
+
await switchToGraderSubTab(page, 'results');
|
|
4386
|
+
const trigger = resultsSection(page).getByTestId('grader-results-user-filter');
|
|
4387
|
+
await test$1.expect(trigger).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4388
|
+
await trigger.click();
|
|
4389
|
+
const searchBox = resultsSection(page).getByPlaceholder(GRADER_LABELS.results.searchUsersPlaceholder);
|
|
4390
|
+
await test$1.expect(searchBox).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4391
|
+
await searchBox.fill(email);
|
|
4392
|
+
const option = resultsSection(page).getByRole('option', { name: email });
|
|
4393
|
+
await test$1.expect(option).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4394
|
+
await option.click();
|
|
4395
|
+
await test$1.expect(gradeResultRow(page, email)).toBeVisible({ timeout: MUTATION_TIMEOUT });
|
|
4396
|
+
logger.info(`Filtered grade results by learner "${email}"`);
|
|
4397
|
+
}
|
|
4398
|
+
/** Assert a grade-result row for the given learner email is visible. */
|
|
4399
|
+
async function expectGradeResultRow(page, email) {
|
|
4400
|
+
await switchToGraderSubTab(page, 'results');
|
|
4401
|
+
await test$1.expect(gradeResultRow(page, email)).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4402
|
+
}
|
|
4403
|
+
/**
|
|
4404
|
+
* Override a learner's grade via the row's three-dots menu → Override grade
|
|
4405
|
+
* popup. Points are in rubric points (0 to the rubric's total). Completion is
|
|
4406
|
+
* gated on the popup closing, which only happens after the PATCH resolves.
|
|
4407
|
+
*/
|
|
4408
|
+
async function overrideGradeResult(page, email, values) {
|
|
4409
|
+
await switchToGraderSubTab(page, 'results');
|
|
4410
|
+
const overrideButton = gradeResultRow(page, email).getByRole('button', {
|
|
4411
|
+
name: GRADER_LABELS.results.overrideButtonAria(email),
|
|
4412
|
+
});
|
|
4413
|
+
await test$1.expect(overrideButton).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4414
|
+
await overrideButton.click();
|
|
4415
|
+
const modal = page.getByTestId('grader-override-modal');
|
|
4416
|
+
await test$1.expect(modal).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4417
|
+
await modal
|
|
4418
|
+
.getByLabel(GRADER_LABELS.results.modal.pointsLabel, { exact: true })
|
|
4419
|
+
.fill(String(values.points));
|
|
4420
|
+
if (values.feedback !== undefined) {
|
|
4421
|
+
await modal
|
|
4422
|
+
.getByLabel(GRADER_LABELS.results.modal.feedbackLabel, { exact: true })
|
|
4423
|
+
.fill(values.feedback);
|
|
4424
|
+
}
|
|
4425
|
+
const saveButton = modal.getByTestId('grader-override-save');
|
|
4426
|
+
await test$1.expect(saveButton).toBeEnabled({ timeout: UI_TIMEOUT });
|
|
4427
|
+
await saveButton.click();
|
|
4428
|
+
await test$1.expect(modal).toBeHidden({ timeout: MUTATION_TIMEOUT });
|
|
4429
|
+
logger.info(`Overrode grade for "${email}" with ${values.points} points`);
|
|
4430
|
+
}
|
|
4431
|
+
/**
|
|
4432
|
+
* Clear a learner's grade override via the popup, restoring the AI score.
|
|
4433
|
+
* Completion is gated on the popup closing after the PATCH resolves.
|
|
4434
|
+
*/
|
|
4435
|
+
async function clearGradeResultOverride(page, email) {
|
|
4436
|
+
await switchToGraderSubTab(page, 'results');
|
|
4437
|
+
const overrideButton = gradeResultRow(page, email).getByRole('button', {
|
|
4438
|
+
name: GRADER_LABELS.results.overrideButtonAria(email),
|
|
4439
|
+
});
|
|
4440
|
+
await test$1.expect(overrideButton).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4441
|
+
await overrideButton.click();
|
|
4442
|
+
const modal = page.getByTestId('grader-override-modal');
|
|
4443
|
+
await test$1.expect(modal).toBeVisible({ timeout: UI_TIMEOUT });
|
|
4444
|
+
const clearButton = modal.getByTestId('grader-override-clear');
|
|
4445
|
+
await test$1.expect(clearButton).toBeEnabled({ timeout: UI_TIMEOUT });
|
|
4446
|
+
await clearButton.click();
|
|
4447
|
+
await test$1.expect(modal).toBeHidden({ timeout: MUTATION_TIMEOUT });
|
|
4448
|
+
logger.info(`Cleared grade override for "${email}"`);
|
|
4353
4449
|
}
|
|
4354
4450
|
|
|
4355
4451
|
const DEFAULT_TIMEOUT = 10000;
|
|
@@ -6874,6 +6970,7 @@ exports.cancelStartEvaluation = cancelStartEvaluation;
|
|
|
6874
6970
|
exports.checkAdminStatus = checkAdminStatus;
|
|
6875
6971
|
exports.checkRunStatus = checkRunStatus;
|
|
6876
6972
|
exports.clearDateRangeFilter = clearDateRangeFilter;
|
|
6973
|
+
exports.clearGradeResultOverride = clearGradeResultOverride;
|
|
6877
6974
|
exports.clearInstanceSearch = clearInstanceSearch;
|
|
6878
6975
|
exports.clearUserFilter = clearUserFilter;
|
|
6879
6976
|
exports.clickBackHome = clickBackHome;
|
|
@@ -6955,6 +7052,7 @@ exports.expectDetailWaitingForTraces = expectDetailWaitingForTraces;
|
|
|
6955
7052
|
exports.expectEndpointUrl = expectEndpointUrl;
|
|
6956
7053
|
exports.expectEntitySelected = expectEntitySelected;
|
|
6957
7054
|
exports.expectFailedTasks = expectFailedTasks;
|
|
7055
|
+
exports.expectGradeResultRow = expectGradeResultRow;
|
|
6958
7056
|
exports.expectGraderMisconfiguredWarning = expectGraderMisconfiguredWarning;
|
|
6959
7057
|
exports.expectGraderTotalPoints = expectGraderTotalPoints;
|
|
6960
7058
|
exports.expectKeyDeleteError = expectKeyDeleteError;
|
|
@@ -7019,6 +7117,7 @@ exports.filterByActionAndVerify = filterByActionAndVerify;
|
|
|
7019
7117
|
exports.filterByActor = filterByActor;
|
|
7020
7118
|
exports.filterByActorAndVerify = filterByActorAndVerify;
|
|
7021
7119
|
exports.filterByDateRange = filterByDateRange;
|
|
7120
|
+
exports.filterGradeResultsByEmail = filterGradeResultsByEmail;
|
|
7022
7121
|
exports.filterTicketsByStatus = filterTicketsByStatus;
|
|
7023
7122
|
exports.filterTicketsByUser = filterTicketsByUser;
|
|
7024
7123
|
exports.generateBrowserSetupProjects = generateBrowserSetupProjects;
|
|
@@ -7178,6 +7277,7 @@ exports.openScreenSharePromptEditor = openScreenSharePromptEditor;
|
|
|
7178
7277
|
exports.openSkillActionsMenu = openSkillActionsMenu;
|
|
7179
7278
|
exports.openStartEvaluationDialog = openStartEvaluationDialog;
|
|
7180
7279
|
exports.openTicket = openTicket;
|
|
7280
|
+
exports.overrideGradeResult = overrideGradeResult;
|
|
7181
7281
|
exports.parseReportUrlParams = parseReportUrlParams;
|
|
7182
7282
|
exports.previewCallConfigVoiceInline = previewCallConfigVoiceInline;
|
|
7183
7283
|
exports.previewMentorVoiceInline = previewMentorVoiceInline;
|