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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to