@multiplatform.one/backoffice 7.84.7 → 7.85.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/dist/cjs/chrome/BackofficeAwesomebar.native.js +1 -1
- package/dist/cjs/chrome/BackofficeAwesomebar.native.js.map +1 -1
- package/dist/cjs/chrome/CommandPalette.native.js +1 -1
- package/dist/cjs/chrome/CommandPalette.native.js.map +1 -1
- package/dist/cjs/chrome/HelpMenu.native.js +1 -1
- package/dist/cjs/chrome/HelpMenu.native.js.map +1 -1
- package/dist/cjs/chrome/NotificationsButton.native.js +1 -1
- package/dist/cjs/chrome/NotificationsButton.native.js.map +1 -1
- package/dist/cjs/chrome/UserMenu.native.js +1 -1
- package/dist/cjs/chrome/UserMenu.native.js.map +1 -1
- package/dist/cjs/chrome/awesomebar-data.native.js.map +1 -1
- package/dist/cjs/chrome/command-palette-model.native.js +1 -1
- package/dist/cjs/chrome/command-palette-model.native.js.map +1 -1
- package/dist/cjs/chrome/help-about-dialog.native.js +1 -1
- package/dist/cjs/chrome/help-about-dialog.native.js.map +1 -1
- package/dist/cjs/chrome/help-shortcuts-dialog.native.js +1 -1
- package/dist/cjs/chrome/help-shortcuts-dialog.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-data.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-panel.native.js +1 -1
- package/dist/cjs/chrome/notifications-panel.native.js.map +1 -1
- package/dist/cjs/chrome/notifications-utils.native.js.map +1 -1
- package/dist/cjs/chrome/shortcuts.native.js.map +1 -1
- package/dist/cjs/chrome/user-session.native.js.map +1 -1
- package/dist/cjs/config/BackofficeProvider.native.js +1 -1
- package/dist/cjs/config/BackofficeProvider.native.js.map +1 -1
- package/dist/cjs/config/capabilities.native.js.map +1 -1
- package/dist/cjs/config/events.native.js.map +1 -1
- package/dist/cjs/config/slots.native.js.map +1 -1
- package/dist/cjs/desk/Desk.native.js +1 -1
- package/dist/cjs/desk/Desk.native.js.map +1 -1
- package/dist/cjs/desk/DeskSurface.native.js.map +1 -1
- package/dist/cjs/desk/resolveDeskPath.native.js.map +1 -1
- package/dist/cjs/desk/scope.native.js.map +1 -1
- package/dist/cjs/desk/target.native.js.map +1 -1
- package/dist/cjs/form/DocFormScreen.native.js +1 -1
- package/dist/cjs/form/DocFormScreen.native.js.map +1 -1
- package/dist/cjs/form/FormConnections.native.js +1 -1
- package/dist/cjs/form/FormConnections.native.js.map +1 -1
- package/dist/cjs/form/FormDialogs.native.js +1 -1
- package/dist/cjs/form/FormDialogs.native.js.map +1 -1
- package/dist/cjs/form/FormErrorBoundary.native.js +1 -1
- package/dist/cjs/form/FormErrorBoundary.native.js.map +1 -1
- package/dist/cjs/form/FormHeaderCluster.native.js +1 -1
- package/dist/cjs/form/FormHeaderCluster.native.js.map +1 -1
- package/dist/cjs/form/FormSidebarPanel.native.js +1 -1
- package/dist/cjs/form/FormSidebarPanel.native.js.map +1 -1
- package/dist/cjs/form/FormTimeline.native.js +1 -1
- package/dist/cjs/form/FormTimeline.native.js.map +1 -1
- package/dist/cjs/form/FormToolbar.native.js +1 -1
- package/dist/cjs/form/FormToolbar.native.js.map +1 -1
- package/dist/cjs/form/connections-data.native.js.map +1 -1
- package/dist/cjs/form/createPrefill.native.js.map +1 -1
- package/dist/cjs/form/dependsOn.native.js.map +1 -1
- package/dist/cjs/form/dirtyTracking.native.js.map +1 -1
- package/dist/cjs/form/docinfo.native.js.map +1 -1
- package/dist/cjs/form/fetchFrom.native.js.map +1 -1
- package/dist/cjs/form/fieldPermissions.native.js.map +1 -1
- package/dist/cjs/form/formActions.native.js.map +1 -1
- package/dist/cjs/form/formLayout.native.js.map +1 -1
- package/dist/cjs/form/platformHooks.native.js.map +1 -1
- package/dist/cjs/form/sidebar-attachments.native.js +1 -1
- package/dist/cjs/form/sidebar-attachments.native.js.map +1 -1
- package/dist/cjs/form/sidebar-dialogs.native.js +1 -1
- package/dist/cjs/form/sidebar-dialogs.native.js.map +1 -1
- package/dist/cjs/form/sidebar-people.native.js +1 -1
- package/dist/cjs/form/sidebar-people.native.js.map +1 -1
- package/dist/cjs/form/sidebar-rpc.native.js.map +1 -1
- package/dist/cjs/form/sidebar-utils.native.js.map +1 -1
- package/dist/cjs/form/timeline-entries.native.js.map +1 -1
- package/dist/cjs/form/timeline-utils.native.js.map +1 -1
- package/dist/cjs/form/useFormEngine.native.js.map +1 -1
- package/dist/cjs/formBuilder/DoctypePicker.native.js +1 -1
- package/dist/cjs/formBuilder/DoctypePicker.native.js.map +1 -1
- package/dist/cjs/formBuilder/FieldPalette.native.js +1 -1
- package/dist/cjs/formBuilder/FieldPalette.native.js.map +1 -1
- package/dist/cjs/formBuilder/FieldPropertiesPanel.native.js +1 -1
- package/dist/cjs/formBuilder/FieldPropertiesPanel.native.js.map +1 -1
- package/dist/cjs/formBuilder/FormBuilderCanvas.native.js +1 -1
- package/dist/cjs/formBuilder/FormBuilderCanvas.native.js.map +1 -1
- package/dist/cjs/formBuilder/FormBuilderScreen.native.js +1 -1
- package/dist/cjs/formBuilder/FormBuilderScreen.native.js.map +1 -1
- package/dist/cjs/formBuilder/api.native.js.map +1 -1
- package/dist/cjs/formBuilder/fieldtypes.native.js.map +1 -1
- package/dist/cjs/formBuilder/index.native.js.map +1 -1
- package/dist/cjs/formBuilder/model.native.js.map +1 -1
- package/dist/cjs/formBuilder/useFormBuilderDrag.native.js +1 -1
- package/dist/cjs/formBuilder/useFormBuilderDrag.native.js.map +1 -1
- package/dist/cjs/i18n/en.native.js.map +1 -1
- package/dist/cjs/i18n/index.native.js.map +1 -1
- package/dist/cjs/index.native.js +2 -2
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/list/AddTagsDialog.native.js +1 -1
- package/dist/cjs/list/AddTagsDialog.native.js.map +1 -1
- package/dist/cjs/list/AssignToDialog.native.js +1 -1
- package/dist/cjs/list/AssignToDialog.native.js.map +1 -1
- package/dist/cjs/list/DoctypeListScreen.native.js +1 -1
- package/dist/cjs/list/DoctypeListScreen.native.js.map +1 -1
- package/dist/cjs/list/ListBulkActionsBar.native.js +1 -1
- package/dist/cjs/list/ListBulkActionsBar.native.js.map +1 -1
- package/dist/cjs/list/ListFilterBar.native.js +1 -1
- package/dist/cjs/list/ListFilterBar.native.js.map +1 -1
- package/dist/cjs/list/ListSidebar.native.js +1 -1
- package/dist/cjs/list/ListSidebar.native.js.map +1 -1
- package/dist/cjs/list/bulk-edit-dialog.native.js +1 -1
- package/dist/cjs/list/bulk-edit-dialog.native.js.map +1 -1
- package/dist/cjs/list/bulk-export.native.js.map +1 -1
- package/dist/cjs/list/bulk-submit-cancel.native.js.map +1 -1
- package/dist/cjs/list/bulkActions.native.js.map +1 -1
- package/dist/cjs/list/filter-chips.native.js +1 -1
- package/dist/cjs/list/filter-chips.native.js.map +1 -1
- package/dist/cjs/list/filter-editor.native.js +1 -1
- package/dist/cjs/list/filter-editor.native.js.map +1 -1
- package/dist/cjs/list/filter-fields.native.js.map +1 -1
- package/dist/cjs/list/filter-saved.native.js +1 -1
- package/dist/cjs/list/filter-saved.native.js.map +1 -1
- package/dist/cjs/list/filter-sort.native.js +1 -1
- package/dist/cjs/list/filter-sort.native.js.map +1 -1
- package/dist/cjs/list/filter-standard.native.js.map +1 -1
- package/dist/cjs/list/filterConversion.native.js.map +1 -1
- package/dist/cjs/list/list-paging.native.js +1 -1
- package/dist/cjs/list/list-paging.native.js.map +1 -1
- package/dist/cjs/list/list-tools-sheet.native.js +1 -1
- package/dist/cjs/list/list-tools-sheet.native.js.map +1 -1
- package/dist/cjs/list/listColumns.native.js.map +1 -1
- package/dist/cjs/list/listFields.native.js.map +1 -1
- package/dist/cjs/list/listFormat.native.js.map +1 -1
- package/dist/cjs/list/listUrlState.native.js.map +1 -1
- package/dist/cjs/list/sidebar-section.native.js +1 -1
- package/dist/cjs/list/sidebar-section.native.js.map +1 -1
- package/dist/cjs/list/sidebar-stats.native.js.map +1 -1
- package/dist/cjs/list/statusColors.native.js.map +1 -1
- package/dist/cjs/navigation/navigator.native.js.map +1 -1
- package/dist/cjs/navigation/paths.native.js.map +1 -1
- package/dist/cjs/oneAdapter/index.native.js.map +1 -1
- package/dist/cjs/quickEntry/QuickEntryDialog.native.js +1 -1
- package/dist/cjs/quickEntry/QuickEntryDialog.native.js.map +1 -1
- package/dist/cjs/quickEntry/quickEntryPlan.native.js.map +1 -1
- package/dist/cjs/report/DoctypeReportView.native.js.map +1 -1
- package/dist/cjs/report/QueryReportScreen.native.js +1 -1
- package/dist/cjs/report/QueryReportScreen.native.js.map +1 -1
- package/dist/cjs/report/queryReportColumns.native.js.map +1 -1
- package/dist/cjs/report/queryReportFilterBar.native.js +1 -1
- package/dist/cjs/report/queryReportFilterBar.native.js.map +1 -1
- package/dist/cjs/report/queryReportUrlState.native.js.map +1 -1
- package/dist/cjs/report/report-grid.native.js.map +1 -1
- package/dist/cjs/report/report-toolbar.native.js.map +1 -1
- package/dist/cjs/report/reportShapes.native.js.map +1 -1
- package/dist/cjs/report/reportViewModel.native.js.map +1 -1
- package/dist/cjs/report/savedReports.native.js.map +1 -1
- package/dist/cjs/report/useQueryReport.native.js.map +1 -1
- package/dist/cjs/shared/deskLinks.native.js.map +1 -1
- package/dist/cjs/shared/listNavContext.native.js.map +1 -1
- package/dist/cjs/shared/measures.native.js.map +1 -1
- package/dist/cjs/shared/sessionUser.native.js.map +1 -1
- package/dist/cjs/shared/types.native.js.map +1 -1
- package/dist/cjs/shared/useDocinfo.native.js.map +1 -1
- package/dist/cjs/shared/useDoctypeMeta.native.js.map +1 -1
- package/dist/cjs/shared/useFrappeApp.native.js.map +1 -1
- package/dist/cjs/shared/useRecentVisit.native.js.map +1 -1
- package/dist/cjs/shared/useSessionUserId.native.js.map +1 -1
- package/dist/cjs/shared/useSlugTarget.native.js.map +1 -1
- package/dist/cjs/shared/useUserRoles.native.js.map +1 -1
- package/dist/cjs/shell/AllDoctypesScreen.cjs +3 -4
- package/dist/cjs/shell/AllDoctypesScreen.native.js +4 -5
- package/dist/cjs/shell/AllDoctypesScreen.native.js.map +1 -1
- package/dist/cjs/shell/BackofficeShell.native.js +1 -1
- package/dist/cjs/shell/BackofficeShell.native.js.map +1 -1
- package/dist/cjs/shell/HomeRedirect.native.js +1 -1
- package/dist/cjs/shell/HomeRedirect.native.js.map +1 -1
- package/dist/cjs/shell/NotFoundScreen.native.js +1 -1
- package/dist/cjs/shell/NotFoundScreen.native.js.map +1 -1
- package/dist/cjs/shell/SlugScreen.native.js +1 -1
- package/dist/cjs/shell/SlugScreen.native.js.map +1 -1
- package/dist/cjs/shell/WorkspaceSidebar.native.js +1 -1
- package/dist/cjs/shell/WorkspaceSidebar.native.js.map +1 -1
- package/dist/cjs/shell/shellSidebarSlot.native.js.map +1 -1
- package/dist/cjs/shell/shellTopBarSlot.native.js.map +1 -1
- package/dist/cjs/shell/useWorkspaces.native.js.map +1 -1
- package/dist/cjs/shell/workspaceIcons.native.js.map +1 -1
- package/dist/cjs/views/CalendarView.native.js +1 -1
- package/dist/cjs/views/CalendarView.native.js.map +1 -1
- package/dist/cjs/views/DashboardView.native.js +1 -1
- package/dist/cjs/views/DashboardView.native.js.map +1 -1
- package/dist/cjs/views/DoctypeViewScreen.native.js.map +1 -1
- package/dist/cjs/views/ImageView.native.js +1 -1
- package/dist/cjs/views/ImageView.native.js.map +1 -1
- package/dist/cjs/views/KanbanView.native.js +1 -1
- package/dist/cjs/views/KanbanView.native.js.map +1 -1
- package/dist/cjs/views/ReportView.native.js.map +1 -1
- package/dist/cjs/views/TreeView.native.js +1 -1
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/ViewHeader.native.js +1 -1
- package/dist/cjs/views/ViewHeader.native.js.map +1 -1
- package/dist/cjs/views/ViewStates.native.js +1 -1
- package/dist/cjs/views/ViewStates.native.js.map +1 -1
- package/dist/cjs/views/ViewSwitcherMenu.native.js +1 -1
- package/dist/cjs/views/ViewSwitcherMenu.native.js.map +1 -1
- package/dist/cjs/views/calendar-field-selector.native.js +1 -1
- package/dist/cjs/views/calendar-field-selector.native.js.map +1 -1
- package/dist/cjs/views/connection.native.js.map +1 -1
- package/dist/cjs/views/dashboard-data.native.js.map +1 -1
- package/dist/cjs/views/deskViewConfigs.native.js.map +1 -1
- package/dist/cjs/views/kanban-board-controls.native.js +1 -1
- package/dist/cjs/views/kanban-board-controls.native.js.map +1 -1
- package/dist/cjs/views/kanban-field-picker.native.js +1 -1
- package/dist/cjs/views/kanban-field-picker.native.js.map +1 -1
- package/dist/cjs/views/kanbanBoardOps.native.js.map +1 -1
- package/dist/cjs/views/kanbanCardText.native.js.map +1 -1
- package/dist/cjs/views/report-controls.native.js +1 -1
- package/dist/cjs/views/report-controls.native.js.map +1 -1
- package/dist/cjs/views/viewAvailability.native.js.map +1 -1
- package/dist/cjs/views/viewMeta.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceChartBlock.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceChartBlock.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceGrid.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceQuickList.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceQuickList.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceRecents.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceRecents.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceScreen.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceScreen.native.js.map +1 -1
- package/dist/cjs/workspace/WorkspaceShortcut.native.js +1 -1
- package/dist/cjs/workspace/WorkspaceShortcut.native.js.map +1 -1
- package/dist/cjs/workspace/parseContent.native.js.map +1 -1
- package/dist/cjs/workspace/types.native.js.map +1 -1
- package/dist/cjs/workspace/useDashboardChart.native.js.map +1 -1
- package/dist/cjs/workspace/useWorkspaceDoc.native.js.map +1 -1
- package/dist/esm/shell/AllDoctypesScreen.mjs +3 -4
- package/dist/esm/shell/AllDoctypesScreen.mjs.map +1 -1
- package/dist/esm/shell/AllDoctypesScreen.native.js +3 -4
- package/dist/esm/shell/AllDoctypesScreen.native.js.map +1 -1
- package/dist/jsx/shell/AllDoctypesScreen.mjs +3 -4
- package/dist/jsx/shell/AllDoctypesScreen.mjs.map +1 -1
- package/dist/jsx/shell/AllDoctypesScreen.native.js +3 -4
- package/dist/jsx/shell/AllDoctypesScreen.native.js.map +1 -1
- package/package.json +12 -12
- package/src/chrome/CommandPalette.spec.tsx +9 -12
- package/src/chrome/NotificationsButton.screen.spec.tsx +1 -1
- package/src/chrome/UserMenu.screen.spec.tsx +1 -1
- package/src/form/DocFormScreen.guest.screen.spec.tsx +8 -14
- package/src/form/DocFormScreen.rights.spec.tsx +5 -7
- package/src/form/FormConnections.screen.spec.tsx +1 -3
- package/src/form/FormErrorBoundary.spec.tsx +2 -6
- package/src/list/DoctypeListScreen.auth.spec.tsx +1 -1
- package/src/list/DoctypeListScreen.compactHead.screen.spec.tsx +15 -19
- package/src/list/DoctypeListScreen.guest.screen.spec.tsx +20 -23
- package/src/list/DoctypeListScreen.rights.spec.tsx +1 -3
- package/src/quickEntry/QuickEntryDialog.screen.spec.tsx +1 -1
- package/src/report/DoctypeReportView.screen.spec.tsx +4 -8
- package/src/report/QueryReportScreen.spec.tsx +3 -3
- package/src/shell/AllDoctypesScreen.screen.spec.tsx +12 -0
- package/src/shell/AllDoctypesScreen.tsx +8 -11
- package/src/shell/shellSidebarSlot.spec.tsx +1 -3
- package/src/shell/useWorkspaces.spec.tsx +13 -22
- package/src/views/CalendarView.screen.spec.tsx +16 -20
- package/src/views/DashboardView.screen.spec.tsx +13 -16
- package/src/views/ImageView.screen.spec.tsx +4 -6
- package/src/views/KanbanView.screen.spec.tsx +17 -20
- package/src/views/ReportView.screen.spec.tsx +1 -1
- package/src/views/ViewHeader.screen.spec.tsx +7 -7
- package/types/shell/AllDoctypesScreen.d.ts.map +1 -1
|
@@ -92,7 +92,7 @@ function rowNames(): string[] {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
async function rowsAre(names: string[]) {
|
|
95
|
-
await waitFor(() => expect(rowNames().sort()).toEqual([...names].sort())
|
|
95
|
+
await waitFor(() => expect(rowNames().sort()).toEqual([...names].sort()));
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
describe("<DoctypeReportView />", () => {
|
|
@@ -132,7 +132,7 @@ describe("<DoctypeReportView />", () => {
|
|
|
132
132
|
|
|
133
133
|
it("says so when the doctype has no records", async () => {
|
|
134
134
|
renderReport({ doctype: "QaReportEmpty" });
|
|
135
|
-
expect(await screen.findByText("No results"
|
|
135
|
+
expect(await screen.findByText("No results")).toBeTruthy();
|
|
136
136
|
expect(screen.getByText("There are no QaReportEmpty records yet")).toBeTruthy();
|
|
137
137
|
});
|
|
138
138
|
|
|
@@ -144,12 +144,8 @@ describe("<DoctypeReportView />", () => {
|
|
|
144
144
|
target: { value: "Weekly Northern" },
|
|
145
145
|
});
|
|
146
146
|
fireEvent.click(screen.getByRole("button", { name: "Save" }));
|
|
147
|
-
await waitFor(() => expect(navigation.getLocation().params.report).toBe("Weekly Northern")
|
|
148
|
-
|
|
149
|
-
});
|
|
150
|
-
expect(
|
|
151
|
-
await screen.findByRole("button", { name: "Report: Weekly Northern" }, { timeout: 5000 }),
|
|
152
|
-
).toBeTruthy();
|
|
147
|
+
await waitFor(() => expect(navigation.getLocation().params.report).toBe("Weekly Northern"));
|
|
148
|
+
expect(await screen.findByRole("button", { name: "Report: Weekly Northern" })).toBeTruthy();
|
|
153
149
|
});
|
|
154
150
|
});
|
|
155
151
|
|
|
@@ -113,7 +113,7 @@ describe("QueryReportScreen refused run", () => {
|
|
|
113
113
|
stubRefusingBench();
|
|
114
114
|
renderRefused();
|
|
115
115
|
|
|
116
|
-
const state = await screen.findByTestId("frappe-report-not-permitted"
|
|
116
|
+
const state = await screen.findByTestId("frappe-report-not-permitted");
|
|
117
117
|
expect(state.textContent).toContain(`You can't run "Team Workload"`);
|
|
118
118
|
expect(state.textContent).toContain("You don't have access to Report: Team Workload");
|
|
119
119
|
expect(screen.queryByRole("button", { name: /retry|refresh/i })).toBeNull();
|
|
@@ -124,7 +124,7 @@ describe("QueryReportScreen refused run", () => {
|
|
|
124
124
|
stubRefusingBench();
|
|
125
125
|
renderRefused();
|
|
126
126
|
|
|
127
|
-
await screen.findByTestId("frappe-report-not-permitted"
|
|
127
|
+
await screen.findByTestId("frappe-report-not-permitted");
|
|
128
128
|
expect(screen.queryByRole("button", { name: /export csv/i })).toBeNull();
|
|
129
129
|
});
|
|
130
130
|
|
|
@@ -137,7 +137,7 @@ describe("QueryReportScreen refused run", () => {
|
|
|
137
137
|
);
|
|
138
138
|
renderRefused();
|
|
139
139
|
|
|
140
|
-
const state = await screen.findByTestId("frappe-report-not-permitted"
|
|
140
|
+
const state = await screen.findByTestId("frappe-report-not-permitted");
|
|
141
141
|
const lines = Array.from(state.querySelectorAll("p")).map((node) => node.textContent);
|
|
142
142
|
expect(lines).toEqual([
|
|
143
143
|
"You are not permitted to access this resource. Login to access",
|
|
@@ -175,9 +175,11 @@ describe("All DocTypes page", () => {
|
|
|
175
175
|
await waitFor(() => expect(moduleNames()).toHaveLength(3));
|
|
176
176
|
const search = screen.getByLabelText("Search DocTypes");
|
|
177
177
|
fireEvent.change(search, { target: { value: "train" } });
|
|
178
|
+
fireEvent.keyDown(search, { key: "Enter" });
|
|
178
179
|
await waitFor(() => expect(moduleNames()).toEqual(["Pokemon"]));
|
|
179
180
|
expect(rowsOf("Pokemon")).toEqual(["Trainer"]);
|
|
180
181
|
fireEvent.change(search, { target: { value: "zzz" } });
|
|
182
|
+
fireEvent.keyDown(search, { key: "Enter" });
|
|
181
183
|
expect(await screen.findByTestId("all-doctypes-no-match")).toBeTruthy();
|
|
182
184
|
});
|
|
183
185
|
|
|
@@ -189,6 +191,14 @@ describe("All DocTypes page", () => {
|
|
|
189
191
|
expect(navigation.getLocation().path).toBe("/backoffice/pokedex-settings/Pokedex%20Settings");
|
|
190
192
|
});
|
|
191
193
|
|
|
194
|
+
it("marks every row with a disclosure chevron at every width (LC-155)", async () => {
|
|
195
|
+
renderScreen();
|
|
196
|
+
await waitFor(() => expect(moduleNames()).toHaveLength(3));
|
|
197
|
+
const rows = screen.getAllByTestId("all-doctypes-row");
|
|
198
|
+
expect(rows.length).toBeGreaterThan(0);
|
|
199
|
+
for (const row of rows) expect(row.querySelector("svg")).not.toBeNull();
|
|
200
|
+
});
|
|
201
|
+
|
|
192
202
|
it("hides DocTypes the session can't read when the DocType list is refused", async () => {
|
|
193
203
|
const requested: string[] = [];
|
|
194
204
|
vi.stubGlobal("fetch", async (input: string | URL | Request) => {
|
|
@@ -240,6 +250,8 @@ describe("All DocTypes page", () => {
|
|
|
240
250
|
const prompt = await screen.findByTestId("all-doctypes-signed-out");
|
|
241
251
|
expect(screen.queryAllByTestId("all-doctypes-module")).toHaveLength(0);
|
|
242
252
|
expect(screen.queryByLabelText("Search DocTypes")).toBeNull();
|
|
253
|
+
expect(within(prompt).getByText("Sign in to browse DocTypes")).toBeTruthy();
|
|
254
|
+
expect(prompt.textContent).not.toMatch(/signed out|once you sign in/i);
|
|
243
255
|
fireEvent.click(within(prompt).getByRole("button", { name: "Sign in" }));
|
|
244
256
|
expect(login).toHaveBeenCalledTimes(1);
|
|
245
257
|
});
|
|
@@ -189,15 +189,13 @@ function DoctypeGroup({
|
|
|
189
189
|
onOpen: (doctype: AwesomebarDoctype) => void;
|
|
190
190
|
}) {
|
|
191
191
|
const { knobProps } = useResolvedKnobs();
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
/>
|
|
200
|
-
) : undefined;
|
|
192
|
+
const disclosure = (
|
|
193
|
+
<IconSlot
|
|
194
|
+
icon={CaretRightIcon}
|
|
195
|
+
size={Number(knobProps.controlIcon?.width) || 20}
|
|
196
|
+
color={knobProps.textAccentColor}
|
|
197
|
+
/>
|
|
198
|
+
);
|
|
201
199
|
return (
|
|
202
200
|
<YStack data-testid={testID} {...knobProps.gapSm} role="group" aria-label={label}>
|
|
203
201
|
<GroupHeading icon={icon} label={label} count={doctypes.length} />
|
|
@@ -305,8 +303,7 @@ export function AllDoctypesScreen() {
|
|
|
305
303
|
<EmptyState
|
|
306
304
|
testID="all-doctypes-signed-out"
|
|
307
305
|
icon={<SignInIcon />}
|
|
308
|
-
title={t("allDoctypes.signedOutTitle", "
|
|
309
|
-
description={t("allDoctypes.signedOutDescription", "DocTypes show here once you sign in")}
|
|
306
|
+
title={t("allDoctypes.signedOutTitle", "Sign in to browse DocTypes")}
|
|
310
307
|
action={
|
|
311
308
|
<Button icon={SignInIcon} onPress={signIn}>
|
|
312
309
|
{t("allDoctypes.signIn", "Sign in")}
|
|
@@ -167,9 +167,7 @@ describe("desk list (LC-101 ONE-SIDEBAR)", () => {
|
|
|
167
167
|
/>,
|
|
168
168
|
);
|
|
169
169
|
fireEvent.click(screen.getByRole("button", { name: "Toggle sidebar" }));
|
|
170
|
-
const panel = await screen.findByLabelText("List filters sidebar"
|
|
171
|
-
timeout: 8000,
|
|
172
|
-
});
|
|
170
|
+
const panel = await screen.findByLabelText("List filters sidebar");
|
|
173
171
|
const rail = screen.getByTestId("backoffice-sidebar-rail");
|
|
174
172
|
expect(rail.contains(panel)).toBe(true);
|
|
175
173
|
expect(screen.getAllByLabelText("List filters sidebar")).toHaveLength(1);
|
|
@@ -126,13 +126,10 @@ describe("useWorkspaces teardown", () => {
|
|
|
126
126
|
);
|
|
127
127
|
|
|
128
128
|
const first = renderHook(() => useWorkspaces(), { wrapper });
|
|
129
|
-
await waitFor(
|
|
130
|
-
()
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
{ timeout: 10000 },
|
|
135
|
-
);
|
|
129
|
+
await waitFor(() => {
|
|
130
|
+
expect(first.result.current.isLoading).toBe(false);
|
|
131
|
+
expect(first.result.current.workspaces.map((w) => w.name)).toEqual(["Home", "Users"]);
|
|
132
|
+
});
|
|
136
133
|
|
|
137
134
|
// Navigate away: the last consumer unmounts. Let the FULL natural
|
|
138
135
|
// wind-down run on real timers — TanStack's live-query idle-detach
|
|
@@ -144,13 +141,10 @@ describe("useWorkspaces teardown", () => {
|
|
|
144
141
|
// Navigate back: the hook must come up clean (no permanently-errored
|
|
145
142
|
// query wedging the loading gate — the "Loading workspaces…" stick).
|
|
146
143
|
const second = renderHook(() => useWorkspaces(), { wrapper });
|
|
147
|
-
await waitFor(
|
|
148
|
-
()
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
{ timeout: 10000 },
|
|
153
|
-
);
|
|
144
|
+
await waitFor(() => {
|
|
145
|
+
expect(second.result.current.isLoading).toBe(false);
|
|
146
|
+
expect(second.result.current.workspaces.map((w) => w.name)).toEqual(["Home", "Users"]);
|
|
147
|
+
});
|
|
154
148
|
expect(liveQueryErrors()).toHaveLength(0);
|
|
155
149
|
|
|
156
150
|
second.unmount();
|
|
@@ -169,20 +163,17 @@ describe("useWorkspaces teardown", () => {
|
|
|
169
163
|
);
|
|
170
164
|
|
|
171
165
|
const first = renderHook(() => useWorkspaces(), { wrapper });
|
|
172
|
-
await waitFor(() => expect(first.result.current.isLoading).toBe(false)
|
|
166
|
+
await waitFor(() => expect(first.result.current.isLoading).toBe(false));
|
|
173
167
|
|
|
174
168
|
// Bounce: unmount and remount well inside the 1s grace window (the
|
|
175
169
|
// list → form → list pattern of real shell navigation).
|
|
176
170
|
first.unmount();
|
|
177
171
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
178
172
|
const second = renderHook(() => useWorkspaces(), { wrapper });
|
|
179
|
-
await waitFor(
|
|
180
|
-
()
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
},
|
|
184
|
-
{ timeout: 10000 },
|
|
185
|
-
);
|
|
173
|
+
await waitFor(() => {
|
|
174
|
+
expect(second.result.current.isLoading).toBe(false);
|
|
175
|
+
expect(second.result.current.workspaces).toHaveLength(2);
|
|
176
|
+
});
|
|
186
177
|
|
|
187
178
|
// Long dwell afterwards — deferred GC must never error the live query.
|
|
188
179
|
await new Promise((resolve) => setTimeout(resolve, 2500));
|
|
@@ -155,14 +155,11 @@ function renderBenchCalendar(roles: string[]) {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
async function todayCell(): Promise<HTMLElement> {
|
|
158
|
-
return waitFor(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
{ timeout: 5000 },
|
|
165
|
-
);
|
|
158
|
+
return waitFor(() => {
|
|
159
|
+
const cell = document.querySelector(`[data-calendar-day="${today}"]`);
|
|
160
|
+
expect(cell).toBeTruthy();
|
|
161
|
+
return cell as HTMLElement;
|
|
162
|
+
});
|
|
166
163
|
}
|
|
167
164
|
|
|
168
165
|
function draggable(title: string): boolean {
|
|
@@ -183,19 +180,18 @@ async function settle(ms = 300) {
|
|
|
183
180
|
describe("<CalendarView />", () => {
|
|
184
181
|
it("lays events on the settings doc's axis and opens the form on press", async () => {
|
|
185
182
|
const navigation = renderFixtureCalendar("QaCalEvent");
|
|
186
|
-
expect(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
expect(await screen.findByLabelText("Choose calendar date field")).toHaveProperty(
|
|
184
|
+
"textContent",
|
|
185
|
+
"Scheduled At",
|
|
186
|
+
);
|
|
187
|
+
fireEvent.click(await screen.findByText("Team sync"));
|
|
190
188
|
expect(navigation.getLocation().path).toBe("/backoffice/qacalevent/QCE-001");
|
|
191
189
|
});
|
|
192
190
|
|
|
193
191
|
it("writes the picked date field into ?field=", async () => {
|
|
194
192
|
const navigation = renderFixtureCalendar("QaCalMulti");
|
|
195
|
-
fireEvent.click(
|
|
196
|
-
|
|
197
|
-
);
|
|
198
|
-
fireEvent.click(await screen.findByText("Follow Up On", {}, { timeout: 5000 }));
|
|
193
|
+
fireEvent.click(await screen.findByLabelText("Choose calendar date field"));
|
|
194
|
+
fireEvent.click(await screen.findByText("Follow Up On"));
|
|
199
195
|
await waitFor(() => expect(navigation.getLocation().params.field).toBe("follow_up_on"));
|
|
200
196
|
expect(navigation.getLocation().path).toBe("/backoffice/qacalmulti/view/calendar");
|
|
201
197
|
});
|
|
@@ -210,7 +206,7 @@ describe("<CalendarView />", () => {
|
|
|
210
206
|
|
|
211
207
|
it("offers the list back when the doctype has no date field", async () => {
|
|
212
208
|
const navigation = renderFixtureCalendar("QaCalNone");
|
|
213
|
-
expect(await screen.findByText("Calendar not available"
|
|
209
|
+
expect(await screen.findByText("Calendar not available")).toBeTruthy();
|
|
214
210
|
fireEvent.click(screen.getByRole("button", { name: "Back to list" }));
|
|
215
211
|
expect(navigation.getLocation().path).toBe("/backoffice/qacalnone");
|
|
216
212
|
});
|
|
@@ -218,8 +214,8 @@ describe("<CalendarView />", () => {
|
|
|
218
214
|
it("lets an editor move events and start a record from a day on a live bench", async () => {
|
|
219
215
|
const bench = renderBenchCalendar(["Pokemon Editor", "Guest"]);
|
|
220
216
|
const cell = await todayCell();
|
|
221
|
-
await screen.findByText("tackle"
|
|
222
|
-
await waitFor(() => expect(bench.rolesAnswered()).toBe(true)
|
|
217
|
+
await screen.findByText("tackle");
|
|
218
|
+
await waitFor(() => expect(bench.rolesAnswered()).toBe(true));
|
|
223
219
|
await waitFor(() => expect(draggable("tackle")).toBe(true));
|
|
224
220
|
fireEvent.click(cell);
|
|
225
221
|
await waitFor(() =>
|
|
@@ -230,7 +226,7 @@ describe("<CalendarView />", () => {
|
|
|
230
226
|
it("neither moves events nor starts a record for a reader on a live bench", async () => {
|
|
231
227
|
const bench = renderBenchCalendar(["Guest"]);
|
|
232
228
|
const cell = await todayCell();
|
|
233
|
-
await screen.findByText("tackle"
|
|
229
|
+
await screen.findByText("tackle");
|
|
234
230
|
await settle();
|
|
235
231
|
expect(draggable("tackle")).toBe(false);
|
|
236
232
|
fireEvent.click(cell);
|
|
@@ -87,21 +87,18 @@ function renderDashboard(doctype: string, scope?: FrappeFilters): MemoryNavigato
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
async function kpi(title: string, value: string) {
|
|
90
|
-
await waitFor(
|
|
91
|
-
()
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
node = node.parentElement;
|
|
90
|
+
await waitFor(() => {
|
|
91
|
+
let node: HTMLElement | null = screen.getAllByText(title)[0] ?? null;
|
|
92
|
+
for (let depth = 0; node && depth < 6; depth += 1) {
|
|
93
|
+
const text = node.textContent ?? "";
|
|
94
|
+
if (text !== title && /\d/.test(text.replace(title, ""))) {
|
|
95
|
+
expect(text.replace(title, "").trim()).toBe(value);
|
|
96
|
+
return;
|
|
100
97
|
}
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
);
|
|
98
|
+
node = node.parentElement;
|
|
99
|
+
}
|
|
100
|
+
throw new Error(`no value drawn next to ${title}`);
|
|
101
|
+
});
|
|
105
102
|
}
|
|
106
103
|
|
|
107
104
|
describe("<DashboardView />", () => {
|
|
@@ -137,8 +134,8 @@ describe("<DashboardView />", () => {
|
|
|
137
134
|
await kpi("Created (last 30 days)", "0");
|
|
138
135
|
await kpi("Done", "2");
|
|
139
136
|
await kpi("Working", "0");
|
|
140
|
-
expect(await screen.findByText("No recent activity"
|
|
141
|
-
await waitFor(() => expect(screen.getAllByText("Done")).toHaveLength(2)
|
|
137
|
+
expect(await screen.findByText("No recent activity")).toBeTruthy();
|
|
138
|
+
await waitFor(() => expect(screen.getAllByText("Done")).toHaveLength(2));
|
|
142
139
|
expect(screen.getAllByText("Working")).toHaveLength(1);
|
|
143
140
|
});
|
|
144
141
|
});
|
|
@@ -79,9 +79,7 @@ describe("<ImageView />", () => {
|
|
|
79
79
|
it("draws a photo per record named by its title and opens the form on press", async () => {
|
|
80
80
|
const navigation = renderImageView("QaImageDex");
|
|
81
81
|
expect(
|
|
82
|
-
(await screen.findByTestId("qaimagedex-card-bulbasaur"
|
|
83
|
-
"aria-label",
|
|
84
|
-
),
|
|
82
|
+
(await screen.findByTestId("qaimagedex-card-bulbasaur")).getAttribute("aria-label"),
|
|
85
83
|
).toBe("bulbasaur");
|
|
86
84
|
expect(screen.queryByTestId("qaimagedex-name-bulbasaur")).toBeNull();
|
|
87
85
|
expect(screen.queryByTestId("qaimagedex-subtitle-charmander")).toBeNull();
|
|
@@ -91,19 +89,19 @@ describe("<ImageView />", () => {
|
|
|
91
89
|
|
|
92
90
|
it("shows only the records inside the desk scope", async () => {
|
|
93
91
|
renderImageView("QaImageDex", [["poke_type", "=", "fire"]]);
|
|
94
|
-
await screen.findByTestId("qaimagedex-card-charmander"
|
|
92
|
+
await screen.findByTestId("qaimagedex-card-charmander");
|
|
95
93
|
expect(screen.queryByTestId("qaimagedex-card-bulbasaur")).toBeNull();
|
|
96
94
|
expect(screen.queryByTestId("qaimagedex-card-squirtle")).toBeNull();
|
|
97
95
|
});
|
|
98
96
|
|
|
99
97
|
it("says so when an image doctype has no records", async () => {
|
|
100
98
|
renderImageView("QaImageEmpty");
|
|
101
|
-
expect(await screen.findByText("No items found"
|
|
99
|
+
expect(await screen.findByText("No items found")).toBeTruthy();
|
|
102
100
|
});
|
|
103
101
|
|
|
104
102
|
it("offers the list back when the doctype has no image field", async () => {
|
|
105
103
|
const navigation = renderImageView("QaImagePlain");
|
|
106
|
-
expect(await screen.findByText("Image view not available"
|
|
104
|
+
expect(await screen.findByText("Image view not available")).toBeTruthy();
|
|
107
105
|
expect(screen.getByText("QaImagePlain has no image field.")).toBeTruthy();
|
|
108
106
|
fireEvent.click(screen.getByRole("button", { name: "Back to list" }));
|
|
109
107
|
expect(navigation.getLocation().path).toBe("/backoffice/qaimageplain");
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { InMemoryFixtureProvider } from "@multiplatform.one/frappe";
|
|
8
8
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
9
|
-
import { act, fireEvent, screen, waitFor } from "@testing-library/react";
|
|
9
|
+
import { act, cleanup, fireEvent, screen, waitFor } from "@testing-library/react";
|
|
10
10
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
11
11
|
import { BackofficeProvider } from "../config/BackofficeProvider";
|
|
12
12
|
import { createMemoryNavigator } from "../navigation/navigator";
|
|
@@ -159,6 +159,7 @@ const moveMeta = {
|
|
|
159
159
|
let run = 0;
|
|
160
160
|
|
|
161
161
|
afterEach(() => {
|
|
162
|
+
cleanup();
|
|
162
163
|
vi.restoreAllMocks();
|
|
163
164
|
vi.unstubAllGlobals();
|
|
164
165
|
});
|
|
@@ -243,7 +244,7 @@ function precedes(first: HTMLElement, second: HTMLElement): boolean {
|
|
|
243
244
|
describe("<KanbanView />", () => {
|
|
244
245
|
it("draws the saved board's active columns in its order and opens a card's form", async () => {
|
|
245
246
|
const { navigation } = renderFixtureKanban("QaBoardTask");
|
|
246
|
-
const card = await screen.findByText("ship release"
|
|
247
|
+
const card = await screen.findByText("ship release");
|
|
247
248
|
const done = screen.getByLabelText("Add card to Done");
|
|
248
249
|
const open = screen.getByLabelText("Add card to Open");
|
|
249
250
|
const working = screen.getByLabelText("Add card to Working");
|
|
@@ -257,24 +258,24 @@ describe("<KanbanView />", () => {
|
|
|
257
258
|
|
|
258
259
|
it("opens a new record prefilled with the column from its +", async () => {
|
|
259
260
|
const { navigation } = renderFixtureKanban("QaBoardTask");
|
|
260
|
-
fireEvent.click(await screen.findByLabelText("Add card to Working"
|
|
261
|
+
fireEvent.click(await screen.findByLabelText("Add card to Working"));
|
|
261
262
|
expect(navigation.getLocation().path).toBe("/backoffice/qaboardtask/new");
|
|
262
263
|
expect(JSON.parse(String(navigation.getLocation().params.d))).toEqual({ status: "Working" });
|
|
263
264
|
});
|
|
264
265
|
|
|
265
266
|
it("switches to another saved board from the picker", async () => {
|
|
266
267
|
const { navigation } = renderFixtureKanban("QaBoardTask");
|
|
267
|
-
fireEvent.click(await screen.findByLabelText("Switch board"
|
|
268
|
-
fireEvent.click(await screen.findByText("Priority Lane"
|
|
268
|
+
fireEvent.click(await screen.findByLabelText("Switch board"));
|
|
269
|
+
fireEvent.click(await screen.findByText("Priority Lane"));
|
|
269
270
|
await waitFor(() => expect(navigation.getLocation().params.board).toBe("Priority Lane"));
|
|
270
271
|
expect(navigation.getLocation().path).toBe("/backoffice/qaboardtask/view/kanban");
|
|
271
272
|
});
|
|
272
273
|
|
|
273
274
|
it("creates a board from the picker's New board dialog and switches to it", async () => {
|
|
274
275
|
const { navigation, fixtures } = renderFixtureKanban("QaBoardTask");
|
|
275
|
-
fireEvent.click(await screen.findByLabelText("Switch board"
|
|
276
|
-
fireEvent.click(await screen.findByText("New board…"
|
|
277
|
-
expect(await screen.findByText("New kanban board"
|
|
276
|
+
fireEvent.click(await screen.findByLabelText("Switch board"));
|
|
277
|
+
fireEvent.click(await screen.findByText("New board…"));
|
|
278
|
+
expect(await screen.findByText("New kanban board")).toBeTruthy();
|
|
278
279
|
fireEvent.change(screen.getByRole("textbox", { name: /board name/i }), {
|
|
279
280
|
target: { value: "Release Train" },
|
|
280
281
|
});
|
|
@@ -286,25 +287,21 @@ describe("<KanbanView />", () => {
|
|
|
286
287
|
|
|
287
288
|
it("falls back to the status Select with a create-board call to action", async () => {
|
|
288
289
|
renderFixtureKanban("QaBoardLoose");
|
|
289
|
-
expect(
|
|
290
|
-
await screen.findByText("No kanban board configured", {}, { timeout: 5000 }),
|
|
291
|
-
).toBeTruthy();
|
|
290
|
+
expect(await screen.findByText("No kanban board configured")).toBeTruthy();
|
|
292
291
|
expect(screen.getByRole("button", { name: "Create board" })).toBeTruthy();
|
|
293
|
-
expect(await screen.findByLabelText("Add card to Open"
|
|
292
|
+
expect(await screen.findByLabelText("Add card to Open")).toBeTruthy();
|
|
294
293
|
});
|
|
295
294
|
|
|
296
295
|
it("offers the list back when there is no board and no Select field", async () => {
|
|
297
296
|
const { navigation } = renderFixtureKanban("QaBoardNone");
|
|
298
|
-
expect(
|
|
299
|
-
await screen.findByText("No Select field to board by", {}, { timeout: 5000 }),
|
|
300
|
-
).toBeTruthy();
|
|
297
|
+
expect(await screen.findByText("No Select field to board by")).toBeTruthy();
|
|
301
298
|
fireEvent.click(screen.getByRole("button", { name: "Back to list" }));
|
|
302
299
|
expect(navigation.getLocation().path).toBe("/backoffice/qaboardnone");
|
|
303
300
|
});
|
|
304
301
|
|
|
305
302
|
it("writes a card's title, its name when the title is missing, and its non-empty extras, rows by title or name and other objects as JSON", async () => {
|
|
306
303
|
renderFixtureKanban("QaBoardMixed");
|
|
307
|
-
const titled = await screen.findByText("plain title"
|
|
304
|
+
const titled = await screen.findByText("plain title");
|
|
308
305
|
const titledCard = titled.parentElement as HTMLElement;
|
|
309
306
|
expect(Array.from(titledCard.children, (child) => child.textContent)).toEqual([
|
|
310
307
|
"plain title",
|
|
@@ -328,18 +325,18 @@ describe("<KanbanView />", () => {
|
|
|
328
325
|
|
|
329
326
|
it("lets an editor move and add cards on a live bench", async () => {
|
|
330
327
|
const bench = renderBenchKanban(["Pokemon Editor", "Guest"]);
|
|
331
|
-
await screen.findByText("tackle"
|
|
332
|
-
await waitFor(() => expect(bench.rolesAnswered()).toBe(true)
|
|
328
|
+
await screen.findByText("tackle");
|
|
329
|
+
await waitFor(() => expect(bench.rolesAnswered()).toBe(true));
|
|
333
330
|
await waitFor(() => expect(draggable("tackle")).toBe(true));
|
|
334
331
|
expect(screen.getByLabelText("Add card to Physical")).toBeTruthy();
|
|
335
332
|
});
|
|
336
333
|
|
|
337
334
|
it("lets a reader neither move nor add cards on a live bench", async () => {
|
|
338
335
|
const bench = renderBenchKanban(["Guest"]);
|
|
339
|
-
await screen.findByText("tackle"
|
|
336
|
+
await screen.findByText("tackle");
|
|
337
|
+
await waitFor(() => expect(bench.rolesAnswered()).toBe(true));
|
|
340
338
|
await settle();
|
|
341
339
|
expect(draggable("tackle")).toBe(false);
|
|
342
340
|
expect(screen.queryByLabelText("Add card to Physical")).toBeNull();
|
|
343
|
-
expect(bench.rolesAnswered()).toBe(true);
|
|
344
341
|
});
|
|
345
342
|
});
|
|
@@ -75,7 +75,7 @@ function rowNames(): string[] {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
async function rowsAre(names: string[]) {
|
|
78
|
-
await waitFor(() => expect(rowNames().sort()).toEqual([...names].sort())
|
|
78
|
+
await waitFor(() => expect(rowNames().sort()).toEqual([...names].sort()));
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
describe("<ReportView />", () => {
|
|
@@ -113,8 +113,8 @@ function renderBenchHeader(roles: string[]) {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
async function openSwitcher() {
|
|
116
|
-
fireEvent.click(await screen.findByTestId("list-view-switcher"
|
|
117
|
-
await screen.findByRole("menu"
|
|
116
|
+
fireEvent.click(await screen.findByTestId("list-view-switcher"));
|
|
117
|
+
await screen.findByRole("menu");
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
function offeredViews(): string[] {
|
|
@@ -162,7 +162,7 @@ describe("<ViewHeader />", () => {
|
|
|
162
162
|
|
|
163
163
|
it("opens a new record from New, and hides New when the newDoc capability is off", async () => {
|
|
164
164
|
const navigation = renderFixtureHeader("QaHeaderNote", "report");
|
|
165
|
-
fireEvent.click(await screen.findByLabelText("New QaHeaderNote"
|
|
165
|
+
fireEvent.click(await screen.findByLabelText("New QaHeaderNote"));
|
|
166
166
|
expect(navigation.getLocation().path).toBe("/backoffice/qaheadernote/new");
|
|
167
167
|
|
|
168
168
|
renderFixtureHeader("QaHeaderProduct", "report", { newDoc: false });
|
|
@@ -172,7 +172,7 @@ describe("<ViewHeader />", () => {
|
|
|
172
172
|
|
|
173
173
|
it("offers an editor New on a live bench", async () => {
|
|
174
174
|
renderBenchHeader(["Pokemon Editor", "Guest"]);
|
|
175
|
-
expect(await screen.findByLabelText("New Poke Move"
|
|
175
|
+
expect(await screen.findByLabelText("New Poke Move")).toBeTruthy();
|
|
176
176
|
});
|
|
177
177
|
|
|
178
178
|
it("offers a reader no New on a live bench", async () => {
|
|
@@ -195,10 +195,10 @@ describe("<ViewHeader /> on a phone (FZ-7684)", () => {
|
|
|
195
195
|
|
|
196
196
|
it("leaves the title to the top bar, puts the views in the menu and keeps Open in Desk a glyph (LC-262)", async () => {
|
|
197
197
|
const bench = renderBenchHeader(["Guest"]);
|
|
198
|
-
const desk = await screen.findByRole("button", { name: "Open in Desk" }
|
|
198
|
+
const desk = await screen.findByRole("button", { name: "Open in Desk" });
|
|
199
199
|
expect(desk.textContent).toBe("");
|
|
200
|
-
fireEvent.click(await screen.findByTestId("view-header-more"
|
|
201
|
-
await screen.findByRole("menu"
|
|
200
|
+
fireEvent.click(await screen.findByTestId("view-header-more"));
|
|
201
|
+
await screen.findByRole("menu");
|
|
202
202
|
await waitFor(() => expect(offeredViews()).toContain("List"));
|
|
203
203
|
expect(screen.queryByRole("menuitem", { name: "Open in Desk" })).toBeNull();
|
|
204
204
|
await bench.settle();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllDoctypesScreen.d.ts","sourceRoot":"","sources":["../../src/shell/AllDoctypesScreen.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAWnC,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,EACtC,KAAK,SAAK,GACT,kBAAkB,EAAE,CAuBtB;AAKD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,OAAO,EAAE,SAAS,iBAAiB,EAAE,EACrC,KAAK,SAAa,GACjB,iBAAiB,EAAE,CAarB;
|
|
1
|
+
{"version":3,"file":"AllDoctypesScreen.d.ts","sourceRoot":"","sources":["../../src/shell/AllDoctypesScreen.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAWnC,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,EACtC,KAAK,SAAK,GACT,kBAAkB,EAAE,CAuBtB;AAKD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,OAAO,EAAE,SAAS,iBAAiB,EAAE,EACrC,KAAK,SAAa,GACjB,iBAAiB,EAAE,CAarB;AA8HD,wBAAgB,iBAAiB,4CA6IhC"}
|