You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "mengw15 (via GitHub)" <gi...@apache.org> on 2026/07/13 06:22:47 UTC
[PR] test(frontend): add unit test coverage for HubService [texera]
mengw15 opened a new pull request, #6390:
URL: https://github.com/apache/texera/pull/6390
### What changes were proposed in this PR?
Adds a Vitest unit-test suite for `frontend/src/app/hub/service/hub.service.ts`
(`HubService`), which previously had no spec (~30% coverage). `HubService` is a
thin `HttpClient` wrapper with ~10 `Observable`-returning methods; the suite
asserts each issues the expected request (method, URL, query params / body,
headers) and maps the response, using `HttpClientTestingModule` +
`HttpTestingController` — no backend.
15 tests cover:
- `getCount` — GET `/count` with the `entityType` param → emits the count.
- `cloneWorkflow` — POST `/workflow/clone/:wid` with a null body → emits the new wid.
- `isLiked` — GET `/isLiked` appending every id/type → emits `LikedStatus[]`.
- `postLike` / `postUnlike` — POST `/like` / `/unlike` with the json body/header → emit the boolean.
- `toggleLike` — three cases: not-liked → likes then re-fetches the count; liked → unlikes then re-fetches; action returns `false` → state unchanged and the count defaults to 0.
- `postView` — POST `/view` with the json body → emits the view count.
- `getTops` — GET `/getTops` with `entityType`/`uid`/`limit`/appended `actionTypes`, plus the `uid` = -1 default and `limit`-omitted path.
- `getCounts` — GET `/counts` appending types/ids/actionTypes, plus the empty-`actionTypes` (param omitted) path.
- `getUserAccess` — GET `/user-access` appending types/ids → emits `AccessResponse[]`.
No production code was changed.
### Any related issues, documentation, discussions?
Closes #6387
### How was this PR tested?
New unit tests, run locally in `frontend/` (all green; the failure path was
verified by deliberately breaking an assertion to confirm the suite goes red):
```
ng test --watch=false --include src/app/hub/service/hub.service.spec.ts
# Test Files 1 passed (1) | Tests 15 passed (15)
prettier --write src/app/hub/service/hub.service.spec.ts # unchanged
eslint src/app/hub/service/hub.service.spec.ts # clean
```
The suite uses `HttpClientTestingModule` / `HttpTestingController` (see
`frontend/TESTING.md` Recipe E), so it makes no real network calls.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): add unit test coverage for HubService [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #6390:
URL: https://github.com/apache/texera/pull/6390#discussion_r3568487882
##########
frontend/src/app/hub/service/hub.service.spec.ts:
##########
@@ -0,0 +1,240 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { TestBed } from "@angular/core/testing";
+import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing";
+import {
+ AccessResponse,
+ ActionType,
+ CountResponse,
+ EntityType,
+ HubService,
+ LikedStatus,
+ WORKFLOW_BASE_URL,
+} from "./hub.service";
+
+describe("HubService", () => {
+ let service: HubService;
+ let httpMock: HttpTestingController;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [HubService],
+ });
+ service = TestBed.inject(HubService);
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+
+ afterEach(() => {
+ httpMock.verify();
+ });
+
+ it("should be created", () => {
+ expect(service).toBeTruthy();
+ });
+
+ it("getCount GETs /count with the entityType param and emits the count", () => {
+ let result: number | undefined;
+ service.getCount(EntityType.Workflow).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/count`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.get("entityType")).toBe("workflow");
+
+ req.flush(5);
+ expect(result).toBe(5);
+ });
+
+ it("cloneWorkflow POSTs to /workflow/clone/:wid with a null body and emits the new wid", () => {
+ let result: number | undefined;
+ service.cloneWorkflow(42).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(`${WORKFLOW_BASE_URL}/clone/42`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toBeNull();
+
+ req.flush(99);
+ expect(result).toBe(99);
+ });
+
+ it("isLiked GETs /isLiked appending every id and type, and emits the statuses", () => {
+ const statuses: LikedStatus[] = [
+ { entityId: 1, entityType: EntityType.Workflow, isLiked: true },
+ { entityId: 2, entityType: EntityType.Dataset, isLiked: false },
+ ];
+ let result: LikedStatus[] | undefined;
+ service.isLiked([1, 2], [EntityType.Workflow, EntityType.Dataset]).subscribe(s => (result = s));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/isLiked`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.getAll("entityId")).toEqual(["1", "2"]);
+ expect(req.request.params.getAll("entityType")).toEqual(["workflow", "dataset"]);
+
+ req.flush(statuses);
+ expect(result).toEqual(statuses);
+ });
+
+ it("postLike POSTs /like with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postLike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/like`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+ expect(req.request.headers.get("Content-Type")).toBe("application/json");
+
+ req.flush(true);
+ expect(result).toBe(true);
+ });
+
+ it("postUnlike POSTs /unlike with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postUnlike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/unlike`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+
+ req.flush(false);
+ expect(result).toBe(false);
+ });
+
+ it("toggleLike likes (not currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, false).subscribe(r => (result = r));
+
+ // First request: the like POST.
+ const likeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/like`);
+ expect(likeReq.request.method).toBe("POST");
+ likeReq.flush(true);
+
+ // Second request: the counts GET fired by switchMap.
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ expect(countsReq.request.method).toBe("GET");
+ expect(countsReq.request.params.getAll("actionType")).toEqual(["like"]);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 7 } }] as CountResponse[]);
Review Comment:
Addressed — the like path now asserts the POST body `{ entityId, entityType }` and the counts GET's `entityType` / `entityId` / `actionType` params, so a wrong id/type routed to either endpoint now fails the test (verified by mutating the id to a wrong value → red).
##########
frontend/src/app/hub/service/hub.service.spec.ts:
##########
@@ -0,0 +1,240 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { TestBed } from "@angular/core/testing";
+import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing";
+import {
+ AccessResponse,
+ ActionType,
+ CountResponse,
+ EntityType,
+ HubService,
+ LikedStatus,
+ WORKFLOW_BASE_URL,
+} from "./hub.service";
+
+describe("HubService", () => {
+ let service: HubService;
+ let httpMock: HttpTestingController;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [HubService],
+ });
+ service = TestBed.inject(HubService);
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+
+ afterEach(() => {
+ httpMock.verify();
+ });
+
+ it("should be created", () => {
+ expect(service).toBeTruthy();
+ });
+
+ it("getCount GETs /count with the entityType param and emits the count", () => {
+ let result: number | undefined;
+ service.getCount(EntityType.Workflow).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/count`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.get("entityType")).toBe("workflow");
+
+ req.flush(5);
+ expect(result).toBe(5);
+ });
+
+ it("cloneWorkflow POSTs to /workflow/clone/:wid with a null body and emits the new wid", () => {
+ let result: number | undefined;
+ service.cloneWorkflow(42).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(`${WORKFLOW_BASE_URL}/clone/42`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toBeNull();
+
+ req.flush(99);
+ expect(result).toBe(99);
+ });
+
+ it("isLiked GETs /isLiked appending every id and type, and emits the statuses", () => {
+ const statuses: LikedStatus[] = [
+ { entityId: 1, entityType: EntityType.Workflow, isLiked: true },
+ { entityId: 2, entityType: EntityType.Dataset, isLiked: false },
+ ];
+ let result: LikedStatus[] | undefined;
+ service.isLiked([1, 2], [EntityType.Workflow, EntityType.Dataset]).subscribe(s => (result = s));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/isLiked`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.getAll("entityId")).toEqual(["1", "2"]);
+ expect(req.request.params.getAll("entityType")).toEqual(["workflow", "dataset"]);
+
+ req.flush(statuses);
+ expect(result).toEqual(statuses);
+ });
+
+ it("postLike POSTs /like with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postLike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/like`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+ expect(req.request.headers.get("Content-Type")).toBe("application/json");
+
+ req.flush(true);
+ expect(result).toBe(true);
+ });
+
+ it("postUnlike POSTs /unlike with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postUnlike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/unlike`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+
+ req.flush(false);
+ expect(result).toBe(false);
+ });
+
+ it("toggleLike likes (not currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, false).subscribe(r => (result = r));
+
+ // First request: the like POST.
+ const likeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/like`);
+ expect(likeReq.request.method).toBe("POST");
+ likeReq.flush(true);
+
+ // Second request: the counts GET fired by switchMap.
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ expect(countsReq.request.method).toBe("GET");
+ expect(countsReq.request.params.getAll("actionType")).toEqual(["like"]);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 7 } }] as CountResponse[]);
+
+ expect(result).toEqual({ liked: true, likeCount: 7 });
+ });
+
+ it("toggleLike unlikes (currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, true).subscribe(r => (result = r));
+
+ const unlikeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/unlike`);
+ expect(unlikeReq.request.method).toBe("POST");
+ unlikeReq.flush(true);
+
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 3 } }] as CountResponse[]);
Review Comment:
Addressed — the unlike test now asserts the unlike POST body and the counts GET method plus its `entityType` / `entityId` / `actionType` params.
##########
frontend/src/app/hub/service/hub.service.spec.ts:
##########
@@ -0,0 +1,240 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { TestBed } from "@angular/core/testing";
+import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing";
+import {
+ AccessResponse,
+ ActionType,
+ CountResponse,
+ EntityType,
+ HubService,
+ LikedStatus,
+ WORKFLOW_BASE_URL,
+} from "./hub.service";
+
+describe("HubService", () => {
+ let service: HubService;
+ let httpMock: HttpTestingController;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [HubService],
+ });
+ service = TestBed.inject(HubService);
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+
+ afterEach(() => {
+ httpMock.verify();
+ });
+
+ it("should be created", () => {
+ expect(service).toBeTruthy();
+ });
+
+ it("getCount GETs /count with the entityType param and emits the count", () => {
+ let result: number | undefined;
+ service.getCount(EntityType.Workflow).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/count`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.get("entityType")).toBe("workflow");
+
+ req.flush(5);
+ expect(result).toBe(5);
+ });
+
+ it("cloneWorkflow POSTs to /workflow/clone/:wid with a null body and emits the new wid", () => {
+ let result: number | undefined;
+ service.cloneWorkflow(42).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(`${WORKFLOW_BASE_URL}/clone/42`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toBeNull();
+
+ req.flush(99);
+ expect(result).toBe(99);
+ });
+
+ it("isLiked GETs /isLiked appending every id and type, and emits the statuses", () => {
+ const statuses: LikedStatus[] = [
+ { entityId: 1, entityType: EntityType.Workflow, isLiked: true },
+ { entityId: 2, entityType: EntityType.Dataset, isLiked: false },
+ ];
+ let result: LikedStatus[] | undefined;
+ service.isLiked([1, 2], [EntityType.Workflow, EntityType.Dataset]).subscribe(s => (result = s));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/isLiked`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.getAll("entityId")).toEqual(["1", "2"]);
+ expect(req.request.params.getAll("entityType")).toEqual(["workflow", "dataset"]);
+
+ req.flush(statuses);
+ expect(result).toEqual(statuses);
+ });
+
+ it("postLike POSTs /like with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postLike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/like`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+ expect(req.request.headers.get("Content-Type")).toBe("application/json");
+
+ req.flush(true);
+ expect(result).toBe(true);
+ });
+
+ it("postUnlike POSTs /unlike with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postUnlike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/unlike`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+
+ req.flush(false);
+ expect(result).toBe(false);
+ });
+
+ it("toggleLike likes (not currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, false).subscribe(r => (result = r));
+
+ // First request: the like POST.
+ const likeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/like`);
+ expect(likeReq.request.method).toBe("POST");
+ likeReq.flush(true);
+
+ // Second request: the counts GET fired by switchMap.
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ expect(countsReq.request.method).toBe("GET");
+ expect(countsReq.request.params.getAll("actionType")).toEqual(["like"]);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 7 } }] as CountResponse[]);
+
+ expect(result).toEqual({ liked: true, likeCount: 7 });
+ });
+
+ it("toggleLike unlikes (currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, true).subscribe(r => (result = r));
+
+ const unlikeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/unlike`);
+ expect(unlikeReq.request.method).toBe("POST");
+ unlikeReq.flush(true);
+
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 3 } }] as CountResponse[]);
+
+ expect(result).toEqual({ liked: false, likeCount: 3 });
+ });
+
+ it("toggleLike keeps the current state when the action fails and defaults the count to 0", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, false).subscribe(r => (result = r));
+
+ httpMock.expectOne(r => r.url === `${service.BASE_URL}/like`).flush(false);
+ httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`).flush([] as CountResponse[]);
Review Comment:
Addressed — the failure-path test now asserts the like POST method/body and the counts GET method + `entityId` before flushing, instead of flushing immediately.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): add unit test coverage for HubService [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #6390:
URL: https://github.com/apache/texera/pull/6390
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): add unit test coverage for HubService [texera]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6390:
URL: https://github.com/apache/texera/pull/6390#discussion_r3568454511
##########
frontend/src/app/hub/service/hub.service.spec.ts:
##########
@@ -0,0 +1,240 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { TestBed } from "@angular/core/testing";
+import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing";
+import {
+ AccessResponse,
+ ActionType,
+ CountResponse,
+ EntityType,
+ HubService,
+ LikedStatus,
+ WORKFLOW_BASE_URL,
+} from "./hub.service";
+
+describe("HubService", () => {
+ let service: HubService;
+ let httpMock: HttpTestingController;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [HubService],
+ });
+ service = TestBed.inject(HubService);
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+
+ afterEach(() => {
+ httpMock.verify();
+ });
+
+ it("should be created", () => {
+ expect(service).toBeTruthy();
+ });
+
+ it("getCount GETs /count with the entityType param and emits the count", () => {
+ let result: number | undefined;
+ service.getCount(EntityType.Workflow).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/count`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.get("entityType")).toBe("workflow");
+
+ req.flush(5);
+ expect(result).toBe(5);
+ });
+
+ it("cloneWorkflow POSTs to /workflow/clone/:wid with a null body and emits the new wid", () => {
+ let result: number | undefined;
+ service.cloneWorkflow(42).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(`${WORKFLOW_BASE_URL}/clone/42`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toBeNull();
+
+ req.flush(99);
+ expect(result).toBe(99);
+ });
+
+ it("isLiked GETs /isLiked appending every id and type, and emits the statuses", () => {
+ const statuses: LikedStatus[] = [
+ { entityId: 1, entityType: EntityType.Workflow, isLiked: true },
+ { entityId: 2, entityType: EntityType.Dataset, isLiked: false },
+ ];
+ let result: LikedStatus[] | undefined;
+ service.isLiked([1, 2], [EntityType.Workflow, EntityType.Dataset]).subscribe(s => (result = s));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/isLiked`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.getAll("entityId")).toEqual(["1", "2"]);
+ expect(req.request.params.getAll("entityType")).toEqual(["workflow", "dataset"]);
+
+ req.flush(statuses);
+ expect(result).toEqual(statuses);
+ });
+
+ it("postLike POSTs /like with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postLike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/like`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+ expect(req.request.headers.get("Content-Type")).toBe("application/json");
+
+ req.flush(true);
+ expect(result).toBe(true);
+ });
+
+ it("postUnlike POSTs /unlike with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postUnlike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/unlike`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+
+ req.flush(false);
+ expect(result).toBe(false);
+ });
+
+ it("toggleLike likes (not currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, false).subscribe(r => (result = r));
+
+ // First request: the like POST.
+ const likeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/like`);
+ expect(likeReq.request.method).toBe("POST");
+ likeReq.flush(true);
+
+ // Second request: the counts GET fired by switchMap.
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ expect(countsReq.request.method).toBe("GET");
+ expect(countsReq.request.params.getAll("actionType")).toEqual(["like"]);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 7 } }] as CountResponse[]);
+
+ expect(result).toEqual({ liked: true, likeCount: 7 });
+ });
+
+ it("toggleLike unlikes (currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, true).subscribe(r => (result = r));
+
+ const unlikeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/unlike`);
+ expect(unlikeReq.request.method).toBe("POST");
+ unlikeReq.flush(true);
+
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 3 } }] as CountResponse[]);
Review Comment:
The toggleLike "unlikes" test doesn't assert the unlike request body/headers or any of the /counts query params. This leaves a gap where toggleLike could call postUnlike/getCounts with the wrong entityId/entityType and the test would still pass.
##########
frontend/src/app/hub/service/hub.service.spec.ts:
##########
@@ -0,0 +1,240 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { TestBed } from "@angular/core/testing";
+import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing";
+import {
+ AccessResponse,
+ ActionType,
+ CountResponse,
+ EntityType,
+ HubService,
+ LikedStatus,
+ WORKFLOW_BASE_URL,
+} from "./hub.service";
+
+describe("HubService", () => {
+ let service: HubService;
+ let httpMock: HttpTestingController;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [HubService],
+ });
+ service = TestBed.inject(HubService);
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+
+ afterEach(() => {
+ httpMock.verify();
+ });
+
+ it("should be created", () => {
+ expect(service).toBeTruthy();
+ });
+
+ it("getCount GETs /count with the entityType param and emits the count", () => {
+ let result: number | undefined;
+ service.getCount(EntityType.Workflow).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/count`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.get("entityType")).toBe("workflow");
+
+ req.flush(5);
+ expect(result).toBe(5);
+ });
+
+ it("cloneWorkflow POSTs to /workflow/clone/:wid with a null body and emits the new wid", () => {
+ let result: number | undefined;
+ service.cloneWorkflow(42).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(`${WORKFLOW_BASE_URL}/clone/42`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toBeNull();
+
+ req.flush(99);
+ expect(result).toBe(99);
+ });
+
+ it("isLiked GETs /isLiked appending every id and type, and emits the statuses", () => {
+ const statuses: LikedStatus[] = [
+ { entityId: 1, entityType: EntityType.Workflow, isLiked: true },
+ { entityId: 2, entityType: EntityType.Dataset, isLiked: false },
+ ];
+ let result: LikedStatus[] | undefined;
+ service.isLiked([1, 2], [EntityType.Workflow, EntityType.Dataset]).subscribe(s => (result = s));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/isLiked`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.getAll("entityId")).toEqual(["1", "2"]);
+ expect(req.request.params.getAll("entityType")).toEqual(["workflow", "dataset"]);
+
+ req.flush(statuses);
+ expect(result).toEqual(statuses);
+ });
+
+ it("postLike POSTs /like with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postLike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/like`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+ expect(req.request.headers.get("Content-Type")).toBe("application/json");
+
+ req.flush(true);
+ expect(result).toBe(true);
+ });
+
+ it("postUnlike POSTs /unlike with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postUnlike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/unlike`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+
+ req.flush(false);
+ expect(result).toBe(false);
+ });
+
+ it("toggleLike likes (not currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, false).subscribe(r => (result = r));
+
+ // First request: the like POST.
+ const likeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/like`);
+ expect(likeReq.request.method).toBe("POST");
+ likeReq.flush(true);
+
+ // Second request: the counts GET fired by switchMap.
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ expect(countsReq.request.method).toBe("GET");
+ expect(countsReq.request.params.getAll("actionType")).toEqual(["like"]);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 7 } }] as CountResponse[]);
+
+ expect(result).toEqual({ liked: true, likeCount: 7 });
+ });
+
+ it("toggleLike unlikes (currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, true).subscribe(r => (result = r));
+
+ const unlikeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/unlike`);
+ expect(unlikeReq.request.method).toBe("POST");
+ unlikeReq.flush(true);
+
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 3 } }] as CountResponse[]);
+
+ expect(result).toEqual({ liked: false, likeCount: 3 });
+ });
+
+ it("toggleLike keeps the current state when the action fails and defaults the count to 0", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, false).subscribe(r => (result = r));
+
+ httpMock.expectOne(r => r.url === `${service.BASE_URL}/like`).flush(false);
+ httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`).flush([] as CountResponse[]);
Review Comment:
In the toggleLike failure-path test, the requests are immediately flushed without asserting method/body/headers or query params. That means the test can’t catch regressions like calling the wrong endpoint or omitting required params when the action fails.
##########
frontend/src/app/hub/service/hub.service.spec.ts:
##########
@@ -0,0 +1,240 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { TestBed } from "@angular/core/testing";
+import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing";
+import {
+ AccessResponse,
+ ActionType,
+ CountResponse,
+ EntityType,
+ HubService,
+ LikedStatus,
+ WORKFLOW_BASE_URL,
+} from "./hub.service";
+
+describe("HubService", () => {
+ let service: HubService;
+ let httpMock: HttpTestingController;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [HubService],
+ });
+ service = TestBed.inject(HubService);
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+
+ afterEach(() => {
+ httpMock.verify();
+ });
+
+ it("should be created", () => {
+ expect(service).toBeTruthy();
+ });
+
+ it("getCount GETs /count with the entityType param and emits the count", () => {
+ let result: number | undefined;
+ service.getCount(EntityType.Workflow).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/count`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.get("entityType")).toBe("workflow");
+
+ req.flush(5);
+ expect(result).toBe(5);
+ });
+
+ it("cloneWorkflow POSTs to /workflow/clone/:wid with a null body and emits the new wid", () => {
+ let result: number | undefined;
+ service.cloneWorkflow(42).subscribe(n => (result = n));
+
+ const req = httpMock.expectOne(`${WORKFLOW_BASE_URL}/clone/42`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toBeNull();
+
+ req.flush(99);
+ expect(result).toBe(99);
+ });
+
+ it("isLiked GETs /isLiked appending every id and type, and emits the statuses", () => {
+ const statuses: LikedStatus[] = [
+ { entityId: 1, entityType: EntityType.Workflow, isLiked: true },
+ { entityId: 2, entityType: EntityType.Dataset, isLiked: false },
+ ];
+ let result: LikedStatus[] | undefined;
+ service.isLiked([1, 2], [EntityType.Workflow, EntityType.Dataset]).subscribe(s => (result = s));
+
+ const req = httpMock.expectOne(r => r.url === `${service.BASE_URL}/isLiked`);
+ expect(req.request.method).toBe("GET");
+ expect(req.request.params.getAll("entityId")).toEqual(["1", "2"]);
+ expect(req.request.params.getAll("entityType")).toEqual(["workflow", "dataset"]);
+
+ req.flush(statuses);
+ expect(result).toEqual(statuses);
+ });
+
+ it("postLike POSTs /like with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postLike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/like`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+ expect(req.request.headers.get("Content-Type")).toBe("application/json");
+
+ req.flush(true);
+ expect(result).toBe(true);
+ });
+
+ it("postUnlike POSTs /unlike with a json body and emits the boolean result", () => {
+ let result: boolean | undefined;
+ service.postUnlike(1, EntityType.Workflow).subscribe(b => (result = b));
+
+ const req = httpMock.expectOne(`${service.BASE_URL}/unlike`);
+ expect(req.request.method).toBe("POST");
+ expect(req.request.body).toEqual({ entityId: 1, entityType: EntityType.Workflow });
+
+ req.flush(false);
+ expect(result).toBe(false);
+ });
+
+ it("toggleLike likes (not currently liked) then re-fetches the like count", () => {
+ let result: { liked: boolean; likeCount: number } | undefined;
+ service.toggleLike(1, EntityType.Workflow, false).subscribe(r => (result = r));
+
+ // First request: the like POST.
+ const likeReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/like`);
+ expect(likeReq.request.method).toBe("POST");
+ likeReq.flush(true);
+
+ // Second request: the counts GET fired by switchMap.
+ const countsReq = httpMock.expectOne(r => r.url === `${service.BASE_URL}/counts`);
+ expect(countsReq.request.method).toBe("GET");
+ expect(countsReq.request.params.getAll("actionType")).toEqual(["like"]);
+ countsReq.flush([{ entityId: 1, entityType: EntityType.Workflow, counts: { like: 7 } }] as CountResponse[]);
Review Comment:
The toggleLike "likes" test only asserts the POST method and a single counts query param. As written, it would still pass even if toggleLike sends the wrong entityId/entityType (or misses them) to the like/count endpoints, which is one of the core behaviors this suite is meant to validate.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): add unit test coverage for HubService [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6390:
URL: https://github.com/apache/texera/pull/6390#issuecomment-4955074703
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6390?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 68.52%. Comparing base ([`8dee1c7`](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`9e4e325`](https://app.codecov.io/gh/apache/texera/commit/9e4e325ef5ede3af8e86f038c9809b905210c080?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #6390 +/- ##
============================================
+ Coverage 68.44% 68.52% +0.08%
Complexity 3382 3382
============================================
Files 1142 1142
Lines 44828 44828
Branches 4948 4948
============================================
+ Hits 30681 30720 +39
+ Misses 12507 12467 -40
- Partials 1640 1641 +1
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [8dee1c7](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.76% <ø> (ø)` | | Carriedforward from [8dee1c7](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.58% <ø> (ø)` | | Carriedforward from [8dee1c7](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `9.97% <ø> (ø)` | | Carriedforward from [8dee1c7](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.30% <ø> (ø)` | | Carriedforward from [8dee1c7](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.97% <ø> (ø)` | | Carriedforward from [8dee1c7](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.21% <ø> (+0.20%)` | :arrow_up: | |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.94% <ø> (ø)` | | Carriedforward from [8dee1c7](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.18% <ø> (ø)` | | Carriedforward from [8dee1c7](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/6390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.14% <ø> (ø)` | | Carriedforward from [8dee1c7](https://app.codecov.io/gh/apache/texera/commit/8dee1c71adfc3a730fe9fd613643cd3bb9123ad5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/6390?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): add unit test coverage for HubService [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6390:
URL: https://github.com/apache/texera/pull/6390#issuecomment-4955030156
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- No candidates found from `git blame` history.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org