Files

104 lines
3.8 KiB
Gherkin

Feature: Whole-hour work tracking
@WJ-043 @service
Scenario: Save several entries for one customer on the same day
Given Alice has a customer with an active project
When Alice saves entries of 2 and 3 hours for today with no descriptions
Then both entries exist
And the daily total is 5 hours
And the monthly customer total includes 5 hours
@WJ-044 @service
Scenario Outline: Reject invalid work durations
When Alice submits a work entry with <hours> hours
Then the entry is rejected without changing stored totals
Examples:
| hours |
| 0 |
| -1 |
| 1.5 |
| 13 |
@WJ-045 @service
Scenario: Enforce the daily limit across concurrent insertions
Given Alice has 10 hours recorded on a date
When two devices concurrently add 2 hours on that date
Then exactly one addition succeeds
And the final daily total is 12 hours
@WJ-046 @service
Scenario: Reject a future date in the current device timezone
Given the server has calculated today from the supplied valid device timezone
When Alice submits work for tomorrow
Then the entry is rejected
@WJ-047 @service
Scenario: Keep calendar dates stable during travel
Given Alice recorded work dated 2026-09-08
When she opens the app in another timezone
Then that entry is still dated 2026-09-08
@WJ-048 @browser
Scenario: Require an explicit catalog creation action
Given Alice types an unknown customer name into the combobox
Then no customer is created merely by typing
When Alice selects the offered create action
Then her customer is created and selected
@WJ-049 @service
Scenario: Reject a project belonging to a different customer
Given project M belongs to customer A
When Alice submits an entry for customer B with project M
Then the entry is rejected
@WJ-050 @service
Scenario: Archive and rename catalog entries without losing work
Given Alice has work recorded for a customer and project
When she renames the customer and archives the project
Then historical work displays the new customer name
And the hours remain in monthly totals
And the project is not offered for new entries
@WJ-051 @browser
Scenario: Detect conflicting work edits
Given two devices have loaded the same work entry version
When the first device saves a change
And the second device saves its different change
Then the second save reports a conflict
And the first change remains stored
And the second device retains its unsaved draft
@WJ-052 @service
Scenario: Require both customer and project
Given Alice is authenticated
When she submits work without a customer or without a project
Then the entry is rejected
@WJ-053 @service
Scenario: Edit a work date without exceeding the destination total
Given Alice has 12 hours on yesterday and 1 hour today
When she moves today's entry to yesterday
Then the change is rejected
And both daily totals remain unchanged
@WJ-054 @browser
Scenario: Delete work only after confirmation
Given Alice has a saved work entry
When she cancels the delete confirmation
Then the entry remains stored
When she confirms deletion of the current version
Then the entry is removed and the totals are updated
@WJ-055 @service
Scenario: Restore an archived project
Given Alice has archived a project of an active customer
When she restores that project
Then it is offered for new entries again
@WJ-061 @browser
Scenario: Open today's exact entry and adjust hours directly
Given Alice has two work entries today
When Alice opens one entry from Today's entries
Then that exact entry is highlighted on the work page
And its hour buttons change only that entry within the daily limits
And closing its editor keeps the draft while discarding removes it