Copilot commented on code in PR #6320:
URL: https://github.com/apache/texera/pull/6320#discussion_r3562248253
##########
frontend/src/app/dashboard/component/user/sort-button/sort-button.component.spec.ts:
##########
@@ -76,4 +76,17 @@ describe("SortButtonComponent", () => {
expect(component.sortMethod).toBe(SortMethod.ExecutionTimeDesc);
expect(emitSpy).toHaveBeenCalledWith(SortMethod.ExecutionTimeDesc);
});
+
+ it("shows the edit-time and execution-time options by default (e.g. for
workflows)", () => {
+ expect(component.showEditTime).toBe(true);
+ expect(component.showExecutionTime).toBe(true);
+ });
+
+ it("can hide edit-time and execution-time options (e.g. for datasets, which
have neither)", () => {
+ component.showEditTime = false;
+ component.showExecutionTime = false;
+ fixture.detectChanges();
+ expect(component.showEditTime).toBe(false);
+ expect(component.showExecutionTime).toBe(false);
+ });
Review Comment:
The new tests for `showEditTime` / `showExecutionTime` only assert the
component fields, but they don’t verify that the template actually hides/shows
the corresponding menu items. Since hiding these options is the behavioral
change that prevents users from re-selecting NULL-based sorts for datasets, the
spec should assert on rendered DOM text/content.
--
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]