You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Neilk1021 (via GitHub)" <gi...@apache.org> on 2026/06/09 00:23:20 UTC
[PR] test: add unit tests for SortButtonComponent (#5463) [texera]
Neilk1021 opened a new pull request, #5578:
URL: https://github.com/apache/texera/pull/5578
Closes #5463
Adds a unit test suite (sort-button.component.spec.ts) for SortButtonComponent.
The test cases verify that:
- The component instantiates successfully with the correct default sorting method.
- The execution of lastSort(), dateSort(), ascSort(), and dscSort() updates the internal sortMethod state correctly and fires the expected payload through the sortMethodChange event emitter.
--
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: add unit tests for SortButtonComponent (#5463) [texera]
Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #5578:
URL: https://github.com/apache/texera/pull/5578#issuecomment-4656000060
@xuang7 Can you review this PR?
--
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: add unit tests for SortButtonComponent (#5463) [texera]
Posted by "Neilk1021 (via GitHub)" <gi...@apache.org>.
Neilk1021 commented on code in PR #5578:
URL: https://github.com/apache/texera/pull/5578#discussion_r3378423581
##########
frontend/src/app/dashboard/component/user/sort-button/sort-button.component.spec.ts:
##########
@@ -0,0 +1,73 @@
+/**
+ * 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 { ComponentFixture, TestBed } from "@angular/core/testing";
+import { SortButtonComponent } from "./sort-button.component";
+import { SortMethod } from "../../../type/sort-method";
+import { describe, beforeEach, it, expect, vi } from "vitest";
Review Comment:
Done! Removed the redundant imports and the UTF-8 BOM in the latest commit. Thanks!
--
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: add unit tests for SortButtonComponent (#5463) [texera]
Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 commented on code in PR #5578:
URL: https://github.com/apache/texera/pull/5578#discussion_r3378254428
##########
frontend/src/app/dashboard/component/user/sort-button/sort-button.component.spec.ts:
##########
@@ -0,0 +1,73 @@
+/**
+ * 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 { ComponentFixture, TestBed } from "@angular/core/testing";
+import { SortButtonComponent } from "./sort-button.component";
+import { SortMethod } from "../../../type/sort-method";
+import { describe, beforeEach, it, expect, vi } from "vitest";
Review Comment:
This import can be removed since vitest.config.ts has globals: true, so describe, it, expect, vi, and beforeEach are available globally.
--
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: add unit tests for SortButtonComponent (#5463) [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5578:
URL: https://github.com/apache/texera/pull/5578#issuecomment-4662159189
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5578?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 52.25%. Comparing base ([`48e800e`](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2f2cfb2`](https://app.codecov.io/gh/apache/texera/commit/2f2cfb27f146ebe5aa8ac6a9dcab2abadc800e92?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on main.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #5578 +/- ##
============================================
+ Coverage 52.21% 52.25% +0.03%
Complexity 2488 2488
============================================
Files 1067 1068 +1
Lines 41306 41311 +5
Branches 4438 4439 +1
============================================
+ Hits 21569 21586 +17
+ Misses 18479 18463 -16
- Partials 1258 1262 +4
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/5578/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/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `64.61% <ø> (ø)` | | Carriedforward from [48e800e](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?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/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `33.76% <ø> (ø)` | | Carriedforward from [48e800e](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?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/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.39% <ø> (ø)` | | Carriedforward from [48e800e](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?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/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `1.65% <ø> (ø)` | | Carriedforward from [48e800e](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?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/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.06% <ø> (ø)` | | Carriedforward from [48e800e](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?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/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.32% <ø> (ø)` | | Carriedforward from [48e800e](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?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/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `46.49% <ø> (+0.09%)` | :arrow_up: | |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.72% <ø> (ø)` | | Carriedforward from [48e800e](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [python](https://app.codecov.io/gh/apache/texera/pull/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.75% <ø> (ø)` | | Carriedforward from [48e800e](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?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/5578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.69% <ø> (ø)` | | Carriedforward from [48e800e](https://app.codecov.io/gh/apache/texera/commit/48e800e4458a74cc7bac5c41d8ac3e5eb0e2c7ea?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/5578?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: add unit tests for SortButtonComponent (#5463) [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5578:
URL: https://github.com/apache/texera/pull/5578#issuecomment-4654766252
<!-- texera:welcome-first-time-contributor -->
👋 Thanks for your first contribution to Texera, @Neilk1021!
You can drive common housekeeping tasks just by leaving a comment. Type the command on its own line.
### On issues
| Command | What it does |
|---|---|
| `/take` | Assign the issue to yourself (self-claim it) |
| `/untake` | Remove yourself as assignee |
To find unclaimed work, search `is:issue is:open no:assignee` — there's no "triage" label; the search filter *is* the triage state.
### Linking sub-issues
| Command | Where to run it | What it does |
|---|---|---|
| `/sub-issue #12 #13` | On the **parent** | Links #12 and #13 as children of this issue |
| `/unsub-issue #12 #13` | On the **parent** | Unlinks those children |
| `/parent-issue #5` | On the **child** | Sets #5 as this issue's parent |
| `/unparent-issue` | On the **child** | Removes this issue's parent (auto-detected) |
| `/unparent-issue #5` | On the **child** | Removes parent #5 explicitly |
You can write references as `#12` or bare `12`. Cross-repo references like `owner/repo#12` aren't supported and are ignored.
### On pull requests (author only)
| Command | What it does |
|---|---|
| `/request-review @user [@user ...]` | Request reviews from those users |
| `/unrequest-review @user [@user ...]` | Cancel those review requests |
You can mention teams as `@org/team`, and `@copilot` works too. Only the PR **author** can use these commands.
> **Note:** Commands must match exactly — `/take this` won't work, only `/take`. Bots are ignored, and you can't self-link an issue or set an issue as its own parent.
For the full contribution flow, see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md).
--
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: add unit tests for SortButtonComponent [texera]
Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 merged PR #5578:
URL: https://github.com/apache/texera/pull/5578
--
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