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 09:20:22 UTC
[I] Add spec coverage for share-access.component.ts [texera]
Ma77Ball opened a new issue, #5223:
URL: https://github.com/apache/texera/issues/5223
### Task Summary
Create share-access.component.spec.ts covering form validation, email sending, and the access-grant flow.
Behavior to cover:
- ngOnInit — loads access list and owner via ShareAccessService; for type === "workflow" loads publish state via WorkflowPersistService.getWorkflowIsPublished, for type === "dataset" via DatasetService.getDataset.
- handleInputConfirm — splits email input on /[\s,;]+/, validates each via Validators.email, pushes valid unique addresses into emailTags, surfaces NzMessageService.error for duplicates and invalid
- onPaste — concatenates clipboard text to the current email value and re-runs handleInputConfirm.
- grantAccess — for each tag calls ShareAccessService.grantAccess(type, id, email, accessLevel), then GmailService.sendEmail with the correct subject and route-aware body (workflow/dataset/project link uses DASHBOARD_USER_* constants; computing-unit omits link), shows success notification, clears emailTags, and on HttpErrorResponse calls NotificationService.error.
- hasWriteAccess getter — true when current email matches owner, true when access entry is Privilege.WRITE, false otherwise.
- verifyRevokeAccess / revokeAccess — opens a modal with the right title/content for self-revoke vs. other-revoke; on confirm calls revokeAccess, closes the modal with { userRevokedOwnAccess: true } if revoking self, and sets shouldRefresh so ngOnDestroy emits refresh.
- changeAccessLevel — confirms via modal when the current user downgrades themselves from WRITE to READ, otherwise calls applyAccessLevelChange directly.
- verifyPublish / verifyUnpublish — show a confirmation modal; on confirm, dispatch to publishWorkflow/unpublishWorkflow (also calling WorkflowActionService.setWorkflowIsPublished when inWorkspace) or publishDataset/unpublishDataset.
- Publish/unpublish methods — call the respective service, flip isPublic, show success notification, and surface HttpErrorResponse errors.
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add spec coverage for share-access.component.ts [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang closed issue #5223: Add spec coverage for share-access.component.ts
URL: https://github.com/apache/texera/issues/5223
--
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: [I] Add spec coverage for share-access.component.ts [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on issue #5223:
URL: https://github.com/apache/texera/issues/5223#issuecomment-4542828307
/take
--
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: [I] Add spec coverage for share-access.component.ts [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on issue #5223:
URL: https://github.com/apache/texera/issues/5223#issuecomment-4549219056
/request-review @Yicong-Huang
--
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