-
Notifications
You must be signed in to change notification settings - Fork 32
[PB-5542]: File version history tests #1784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/file-version-history-v4
Are you sure you want to change the base?
[PB-5542]: File version history tests #1784
Conversation
c356206 to
af92c23
Compare
Add unit tests for date service, version history hooks, and file version service to ensure reliability of the file versioning functionality. Tests cover dropdown positioning logic, version history menu configuration, file version operations, and date utility functions including expiration calculations.
af92c23 to
700735a
Compare
CandelR
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests seems okay, but it will need minor changes to follow the test structure that we are using now.
Avoid using technical names like function or variable names (getDaysUntilExpiration, useDropdownPositioning, etc.), use natural language instead that describes what's happening from a user perspective.
Use the "when X, then Y" format, this makes tests read like specifications. It clearly separates the condition from the expected outcome, making tests easier to understand and maintain.
These days I will try to upload the guidelines so that everything is well explained in the project itself :)
| }); | ||
|
|
||
| it('opens below when there is room', async () => { | ||
| it('when there is room below the item, then the menu opens below', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what means with room?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It means “if there’s space.” I’ve changed it for clarity
| }); | ||
| }); | ||
|
|
||
| it('returns unlocked config when versioning is enabled and extension allowed', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to change this tests descriptions
|



Description
Add unit tests for date service, version history hooks, and file version service to ensure
reliability of the file versioning functionality. Tests cover dropdown positioning logic, version
history menu configuration, file version operations, and date utility functions including expiration
calculations.
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes