chenlica commented on code in PR #5071:
URL: https://github.com/apache/texera/pull/5071#discussion_r3251193428
##########
frontend/src/app/workspace/service/joint-ui/joint-ui.service.spec.ts:
##########
@@ -327,9 +327,32 @@
// });
// });
+import { JointUIService } from "./joint-ui.service";
+
describe("JointUIService", () => {
// Pre-existing spec body is commented out. Placeholder keeps Vitest's
// discovery happy; rewriting the real tests against the new test
// runner is tracked in #4861.
it.todo("add unit tests for JointUIService");
+
+ describe("truncateOperatorDisplayName", () => {
+ const max = JointUIService.MAX_OPERATOR_NAME_LENGTH;
+
+ it("returns the name unchanged when it is within the limit", () => {
+ const name = "a".repeat(max);
+ expect(JointUIService.truncateOperatorDisplayName(name)).toBe(name);
+ });
+
+ it("truncates and appends an ellipsis when the name exceeds the limit", ()
=> {
Review Comment:
Fixed by using the number of pixels to define the threshold.
--
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]