69 lines
2.5 KiB
Gherkin
69 lines
2.5 KiB
Gherkin
Feature: Convenience Methods
|
|
As a developer
|
|
I want convenient methods for common operations
|
|
So that status updates are simple and clear
|
|
|
|
Background:
|
|
Given an authenticated sheets tracker
|
|
And a sheet with the following datasets
|
|
| Dataset Name | Status | Error |
|
|
| wordnet | NOT STARTED | |
|
|
| yago | IN PROGRESS | |
|
|
| dbpedia | DONE | |
|
|
|
|
Scenario: Mark dataset as in progress using convenience method
|
|
When I mark "wordnet" as in progress
|
|
Then the status should be updated to "IN PROGRESS"
|
|
And the update should succeed
|
|
|
|
Scenario: Mark dataset as completed using convenience method
|
|
When I mark "yago" as completed
|
|
Then the status should be updated to "DONE"
|
|
And the update should succeed
|
|
|
|
Scenario: Mark dataset with error using convenience method
|
|
When I mark "wordnet" with error "Download failed"
|
|
Then the status should be updated to "NOT STARTED"
|
|
And the error message should be set to "Download failed"
|
|
And the update should succeed
|
|
|
|
Scenario: Reset dataset to not started using convenience method
|
|
When I reset "yago" to not started with error "Processing interrupted"
|
|
Then the status should be updated to "NOT STARTED"
|
|
And the error message should be set to "Processing interrupted"
|
|
And the update should succeed
|
|
|
|
Scenario: Reset dataset to not started without error message
|
|
When I reset "yago" to not started without error message
|
|
Then the status should be updated to "NOT STARTED"
|
|
And the error message should be cleared
|
|
And the update should succeed
|
|
|
|
Scenario: Convenience methods return success status
|
|
When I mark "wordnet" as in progress
|
|
Then the mark_in_progress method should return True
|
|
|
|
When I mark "wordnet" as completed
|
|
Then the mark_completed method should return True
|
|
|
|
When I mark "wordnet" with error "Test error"
|
|
Then the mark_error method should return True
|
|
|
|
When I reset "wordnet" to not started
|
|
Then the reset_to_not_started method should return True
|
|
|
|
Scenario: Convenience methods fail for non-existent datasets
|
|
When I attempt to mark "nonexistent" as in progress
|
|
Then the mark_in_progress method should return False
|
|
|
|
When I attempt to mark "nonexistent" as completed
|
|
Then the mark_completed method should return False
|
|
|
|
When I attempt to mark "nonexistent" with error "Test"
|
|
Then the mark_error method should return False
|
|
|
|
When I attempt to reset "nonexistent" to not started
|
|
Then the reset_to_not_started method should return False
|
|
|
|
|