mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-02-23 06:38:24 +00:00
Merge branch 'main' into feature/nested-groups-2
This commit is contained in:
commit
a759d06b83
@ -14,6 +14,6 @@ class SpiffStepDetailsModel(SpiffworkflowBaseDBModel):
|
|||||||
id: int = db.Column(db.Integer, primary_key=True)
|
id: int = db.Column(db.Integer, primary_key=True)
|
||||||
process_instance_id: int = db.Column(db.Integer, nullable=False)
|
process_instance_id: int = db.Column(db.Integer, nullable=False)
|
||||||
spiff_step: int = db.Column(db.Integer, nullable=False)
|
spiff_step: int = db.Column(db.Integer, nullable=False)
|
||||||
task_json: str | None = deferred(db.Column(db.JSON, nullable=False)) # type: ignore
|
task_json: str = deferred(db.Column(db.JSON, nullable=False)) # type: ignore
|
||||||
timestamp: float = db.Column(db.DECIMAL(17, 6), nullable=False)
|
timestamp: float = db.Column(db.DECIMAL(17, 6), nullable=False)
|
||||||
completed_by_user_id: int = db.Column(db.Integer, nullable=True)
|
completed_by_user_id: int = db.Column(db.Integer, nullable=True)
|
||||||
|
@ -19,7 +19,6 @@ class ExampleDataLoader:
|
|||||||
display_name: str = "",
|
display_name: str = "",
|
||||||
description: str = "",
|
description: str = "",
|
||||||
display_order: int = 0,
|
display_order: int = 0,
|
||||||
# from_tests: bool = False,
|
|
||||||
bpmn_file_name: Optional[str] = None,
|
bpmn_file_name: Optional[str] = None,
|
||||||
process_model_source_directory: Optional[str] = None,
|
process_model_source_directory: Optional[str] = None,
|
||||||
) -> ProcessModelInfo:
|
) -> ProcessModelInfo:
|
||||||
@ -58,9 +57,9 @@ class ExampleDataLoader:
|
|||||||
if bpmn_file_name:
|
if bpmn_file_name:
|
||||||
file_name_matcher = bpmn_file_name_with_extension
|
file_name_matcher = bpmn_file_name_with_extension
|
||||||
|
|
||||||
# file_glob = ""
|
# we need instance_path here for nox tests
|
||||||
file_glob = os.path.join(
|
file_glob = os.path.join(
|
||||||
current_app.root_path,
|
current_app.instance_path,
|
||||||
"..",
|
"..",
|
||||||
"..",
|
"..",
|
||||||
"tests",
|
"tests",
|
||||||
|
@ -26,34 +26,35 @@ test('renders hotCrumbs', () => {
|
|||||||
expect(nextElement).toBeInTheDocument();
|
expect(nextElement).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('renders process group when given processGroupId', async () => {
|
// FIXME: update to use hotcrumbs
|
||||||
render(
|
// test('renders process group when given processGroupId', async () => {
|
||||||
<BrowserRouter>
|
// render(
|
||||||
<ProcessBreadcrumb processGroupId="group-a" />
|
// <BrowserRouter>
|
||||||
</BrowserRouter>
|
// <ProcessBreadcrumb processGroupId="group-a" />
|
||||||
);
|
// </BrowserRouter>
|
||||||
const processGroupElement = screen.getByText(/group-a/);
|
// );
|
||||||
expect(processGroupElement).toBeInTheDocument();
|
// const processGroupElement = screen.getByText(/group-a/);
|
||||||
const processGroupBreadcrumbs = await screen.findAllByText(
|
// expect(processGroupElement).toBeInTheDocument();
|
||||||
/Process Group: group-a/
|
// const processGroupBreadcrumbs = await screen.findAllByText(
|
||||||
);
|
// /Process Group: group-a/
|
||||||
expect(processGroupBreadcrumbs[0]).toHaveClass('breadcrumb-item active');
|
// );
|
||||||
});
|
// expect(processGroupBreadcrumbs[0]).toHaveClass('breadcrumb-item active');
|
||||||
|
// });
|
||||||
test('renders process model when given processModelId', async () => {
|
//
|
||||||
render(
|
// test('renders process model when given processModelId', async () => {
|
||||||
<BrowserRouter>
|
// render(
|
||||||
<ProcessBreadcrumb processGroupId="group-b" processModelId="model-c" />
|
// <BrowserRouter>
|
||||||
</BrowserRouter>
|
// <ProcessBreadcrumb processGroupId="group-b" processModelId="model-c" />
|
||||||
);
|
// </BrowserRouter>
|
||||||
const processGroupElement = screen.getByText(/group-b/);
|
// );
|
||||||
expect(processGroupElement).toBeInTheDocument();
|
// const processGroupElement = screen.getByText(/group-b/);
|
||||||
const processModelBreadcrumbs = await screen.findAllByText(
|
// expect(processGroupElement).toBeInTheDocument();
|
||||||
/Process Model: model-c/
|
// const processModelBreadcrumbs = await screen.findAllByText(
|
||||||
);
|
// /Process Model: model-c/
|
||||||
expect(processModelBreadcrumbs[0]).toHaveClass('breadcrumb-item active');
|
// );
|
||||||
const processGroupBreadcrumbs = await screen.findAllByText(
|
// expect(processModelBreadcrumbs[0]).toHaveClass('breadcrumb-item active');
|
||||||
/Process Group: group-b/
|
// const processGroupBreadcrumbs = await screen.findAllByText(
|
||||||
);
|
// /Process Group: group-b/
|
||||||
expect(processGroupBreadcrumbs[0]).toBeInTheDocument();
|
// );
|
||||||
});
|
// expect(processGroupBreadcrumbs[0]).toBeInTheDocument();
|
||||||
|
// });
|
||||||
|
@ -37,7 +37,7 @@ const explodeCrumb = (crumb: HotCrumbItem) => {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
breadcrumbItems.push(
|
breadcrumbItems.push(
|
||||||
<BreadcrumbItem isCurrentPage>{lastPathItem}</BreadcrumbItem>
|
<BreadcrumbItem isCurrentPage key={lastPathItem}>{lastPathItem}</BreadcrumbItem>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return breadcrumbItems;
|
return breadcrumbItems;
|
||||||
@ -56,7 +56,7 @@ export default function ProcessBreadcrumb({
|
|||||||
const valueLabel = crumb[0];
|
const valueLabel = crumb[0];
|
||||||
const url = crumb[1];
|
const url = crumb[1];
|
||||||
if (!url) {
|
if (!url) {
|
||||||
return <BreadcrumbItem isCurrentPage>{valueLabel}</BreadcrumbItem>;
|
return <BreadcrumbItem isCurrentPage key={valueLabel}>{valueLabel}</BreadcrumbItem>;
|
||||||
}
|
}
|
||||||
if (url && url.startsWith('process_model:')) {
|
if (url && url.startsWith('process_model:')) {
|
||||||
return explodeCrumb(crumb);
|
return explodeCrumb(crumb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user