diff --git a/webui/scripts/test-scheduling-page-structure.mjs b/webui/scripts/test-scheduling-page-structure.mjs index 6a55a6d..6b7e28f 100644 --- a/webui/scripts/test-scheduling-page-structure.mjs +++ b/webui/scripts/test-scheduling-page-structure.mjs @@ -11,42 +11,60 @@ assert.match(page, /usePlatformUiCapability\("calend assert.match(page, /hasScope\(auth, "calendar:calendar:read"\)/); assert.match(page, /Boolean\(calendarPickerCapability\) && canReadCalendars && canReadAvailability && canWriteCalendarEvent/); assert.doesNotMatch(page, /@govoplan\/calendar-webui|govoplan-calendar\/webui/); -assert.match(page, /Card,[\s\S]*DataGrid,[\s\S]*DataGridEmptyAction,[\s\S]*DataGridRowActions,[\s\S]*ModuleSubnav,[\s\S]*ToggleSwitch,[\s\S]*from "@govoplan\/core-webui"/); -assert.match(page, /SelectionList,[\s\S]*SelectionListItem,[\s\S]*from "@govoplan\/core-webui"/); +assert.match(page, /Card,[\s\S]*DataGrid,[\s\S]*DataGridEmptyAction,[\s\S]*DataGridRowActions,[\s\S]*FormField,[\s\S]*MetricCard,[\s\S]*PasswordField,[\s\S]*SelectionList,[\s\S]*ToggleSwitch,[\s\S]*from "@govoplan\/core-webui"/); assert.doesNotMatch(page, /@govoplan\/core-webui\/src\//); -assert.match(page, /className="scheduling-full-editor"/); -assert.match(page, /className="scheduling-page-actions"/); -const editorActions = page.slice( - page.indexOf('
'), - page.indexOf('
', page.indexOf('
')) -); -assert.ok(editorActions.indexOf("I18N.discard") < editorActions.indexOf("I18N.save")); -assert.match(editorActions, /form="scheduling-create-form"/); - -const createBranchStart = page.indexOf(" if (creating) {"); -const createReturnStart = page.indexOf("\n return (", createBranchStart); -const browseBranchStart = page.indexOf("\n return (", createReturnStart + 1); -const createBranch = page.slice(createBranchStart, browseBranchStart); -const browseBranch = page.slice(browseBranchStart); -assert.match(createBranch, /\{I18N\.requests\}<\/h1>/); -assert.match(browseBranch, /