You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Ma77Ball (via GitHub)" <gi...@apache.org> on 2026/05/26 10:17:54 UTC

[PR] test: cover ShareAccessComponent behaviors in spec [texera]

Ma77Ball opened a new pull request, #5233:
URL: https://github.com/apache/texera/pull/5233

   ### What changes were proposed in this PR?
   - Expand `share-access.component.spec.ts` from 4 routing-only tests to 44 tests grouped by behavior: `ngOnInit`, `handleInputConfirm`, `onPaste`, `grantAccess`, `hasWriteAccess`, `verifyRevokeAccess`/`revokeAccess`, `changeAccessLevel`, `verifyPublish`/`verifyUnpublish`, and the individual publish/unpublish methods.
   - Drive modal-confirmation flows by capturing the config passed to `NzModalService.create` and invoking the relevant `nzFooter` button's `onClick`, so each test asserts against the specific Confirm/Cancel path it cares about.
   - Parameterize the `setupComponent` helper with `type`, `id`, `inWorkspace`, and `currentEmail` overrides, and reset the TestBed in `beforeEach` so each test reconfigures providers (e.g., a WRITE access entry for `hasWriteAccess`, an already-published item for `verifyPublish`) without bleed-over.
   ### Any related issues, documentation, or discussions?
   Closes: #5223
   ### How was this PR tested?
   - Ran `yarn format:fix` (touched the new spec only).
   - Ran `yarn test --include="src/app/dashboard/component/user/share-access/share-access.component.spec.ts"`: 44/44 passing.
   ### Was this PR authored or co-authored using generative AI tooling?
   Co-authored with Claude Opus 4.7 in compliance with ASF


-- 
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: cover ShareAccessComponent behaviors in spec [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5233:
URL: https://github.com/apache/texera/pull/5233#issuecomment-4550708111

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5233?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 48.78%. Comparing base ([`8a7366f`](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`48ecd1f`](https://app.codecov.io/gh/apache/texera/commit/48ecd1fc57aac841ac583800fce2dcb58b1be726?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    #5233      +/-   ##
   ============================================
   + Coverage     48.57%   48.78%   +0.21%     
     Complexity     2379     2379              
   ============================================
     Files          1042     1042              
     Lines         39971    39971              
     Branches       4252     4252              
   ============================================
   + Hits          19415    19501      +86     
   + Misses        19410    19318      -92     
   - Partials       1146     1152       +6     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/5233/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/5233/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.53% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5233/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 [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5233/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `51.58% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5233/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5233/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5233/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.99% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5233/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.55% <ø> (+0.52%)` | :arrow_up: | |
   | [python](https://app.codecov.io/gh/apache/texera/pull/5233/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.46% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5233/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.81% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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 Sentry](https://app.codecov.io/gh/apache/texera/pull/5233?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: cover ShareAccessComponent behaviors in spec [texera]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #5233:
URL: https://github.com/apache/texera/pull/5233#issuecomment-4549229655

   /request-review @aglinxinyuan 


-- 
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: cover ShareAccessComponent behaviors in spec [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang merged PR #5233:
URL: https://github.com/apache/texera/pull/5233


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