aglinxinyuan opened a new issue, #5397: URL: https://github.com/apache/texera/issues/5397
The `org.apache.texera.web.resource.dashboard.hub` package contains the data types the Hub dashboard dispatches against (action kinds, entity kinds, jOOQ table lookups by entity). Nothing in the package is unit-tested today. Add a single `HubEntityModelSpec` covering: | File | Behavior to pin | | --- | --- | | `ActionType.scala` | Sealed-trait subtypes `View` / `Like` / `Clone` / `Unlike` expose `value = "view"` / `"like"` / `"clone"` / `"unlike"`; `toString` equals `value`. `fromString` matches case-insensitively. `fromString` throws `IllegalArgumentException` with a message mentioning the unsupported input. Jackson `@JsonCreator` + `@JsonValue` produce string-form JSON dispatch (round-trip via `objectMapper.writeValueAsString` / `readValue`). | | `EntityType.scala` | Same shape — `Workflow` / `Dataset` carry `value = "workflow"` / `"dataset"`; `toString == value`; case-insensitive `fromString`; unsupported input throws `IllegalArgumentException`; Jackson round-trip preserves the kind. | | `EntityTables.scala` | `BaseEntityTable.apply(Workflow)` returns `WorkflowTable`, `apply(Dataset)` returns `DatasetTable`; ditto for `LikeTable` and `ViewCountTable`. `CloneTable.apply(Workflow)` returns `WorkflowCloneTable`; `CloneTable.apply(Dataset)` throws `IllegalArgumentException` (clone is workflow-only today). Every `case object` exposes its `table` / `idColumn` / `isPublicColumn` / `uidColumn` / `viewCountColumn` from the generated jOOQ tables. | ### Priority P3 - Low ### Task Type - [x] Testing / QA -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
