Skip to content

Implement feature user block - #14

Merged
alupcosta merged 18 commits into
developfrom
feature/user-block
Sep 21, 2026
Merged

alupcosta merged 18 commits into
developfrom
feature/user-block

Conversation

@alupcosta

Copy link
Copy Markdown
Collaborator

Description

Implements the User block of the domain layer: Voter and Administrator, plus two context-specific administrator subclasses (CondominiumAdministrator, OnuAdministrator) that store data relevant to vote weighting.

Type of Change

  • New feature (non-breaking change which adds functionality)

Changes Made

  • Voter: id and name, validated on creation
  • Administrator (base): registers voters with duplicate-id protection; controls voting open/close state
  • CondominiumAdministrator: registers a condo member and stores their ideal fraction
  • OnuAdministrator: registers a member and stores permanent member status
  • Unit tests for all classes above (16 tests), 100% coverage on this block's files

How to Test

  1. npm install
  2. npm run lint
  3. npm run test:coverage

Related Issues

Closes #4

Checklist

  • Self-reviewed my code
  • Added tests that prove the fix is effective or that the feature works
  • Existing local tests pass successfully

@yaesetti yaesetti linked an issue Sep 20, 2026 that may be closed by this pull request
Comment thread src/domain/administrator.ts
Comment thread src/domain/voter.ts
@yaesetti
yaesetti self-requested a review September 21, 2026 01:38
@alupcosta
alupcosta merged commit ab53fed into develop Sep 21, 2026
1 check passed
@yaesetti
yaesetti deleted the feature/user-block branch September 21, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement the User block

2 participants