Copilot commented on code in PR #7415:
URL: https://github.com/apache/texera/pull/7415#discussion_r3739736767


##########
frontend/src/app/dashboard/component/user/user-project/user-project-list-item/user-project-list-item.component.spec.ts:
##########
@@ -218,4 +220,98 @@ describe("UserProjectListItemComponent", () => {
       expect(refreshSpy).toHaveBeenCalled();
     });
   });
+  /**
+   * The list item decides in its template what a viewer is allowed to touch 
and how much of a long
+   * description to show. The specs above call the save/colour methods 
directly, so none of the
+   * rendered gating had been pinned.
+   */
+  describe("rendered item", () => {
+    /** Re-renders the host with the given entry/editable combination. */
+    function render(over: Partial<DashboardProject> = {}, editable = true): 
HTMLElement {
+      hostFixture.componentInstance.entry = { ...testProject, ...over };
+      hostFixture.componentInstance.editable = editable;
+      hostFixture.detectChanges();
+      return hostFixture.nativeElement as HTMLElement;
+    }
+
+    it("shows the project name and its creation date", () => {
+      const el = render({ name: "quarterly", creationTime: januaryFirst1970 });
+
+      expect(el.textContent).toContain("quarterly");
+      expect(el.textContent).toContain("1970-01-01");
+    });

Review Comment:
   The creation-date assertion only checks for the "1970-01-01" substring, so 
it doesn’t pin the full `yyyy-MM-dd HH:mm` format (and can become 
timezone-fragile). Consider asserting the full rendered "Created:" string in 
the same format as the template.
   
   This issue also appears in the following locations of the same file:
   - line 254
   - line 298



-- 
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]

Reply via email to