60 lines
2.5 KiB
Gherkin
60 lines
2.5 KiB
Gherkin
Feature: Error Message Handling
|
|
As a developer
|
|
I want error messages to be handled correctly
|
|
So that useful error information is preserved without breaking the sheet
|
|
|
|
Background:
|
|
Given an authenticated sheets tracker
|
|
And a sheet with the following datasets
|
|
| Dataset Name | Status | Error |
|
|
| wordnet | NOT STARTED | |
|
|
|
|
Scenario: Truncate error message longer than 500 characters
|
|
Given an error message longer than 500 characters
|
|
When I mark "wordnet" with the long error message
|
|
Then the error message should be truncated to 500 characters
|
|
And the update should succeed
|
|
|
|
Scenario: Preserve error message shorter than 500 characters
|
|
Given an error message of 200 characters
|
|
When I mark "wordnet" with the error message
|
|
Then the error message should be preserved exactly
|
|
And the update should succeed
|
|
|
|
Scenario: Handle error message exactly 500 characters
|
|
Given an error message exactly 500 characters long
|
|
When I mark "wordnet" with the error message
|
|
Then the error message should be preserved exactly
|
|
And the update should succeed
|
|
|
|
Scenario: Handle error message with special characters
|
|
Given an error message with special characters "Error: 'test' & \"quotes\" <tags>"
|
|
When I mark "wordnet" with the error message
|
|
Then the error message should be preserved correctly
|
|
And special characters should be handled properly
|
|
|
|
Scenario: Handle error message with newlines
|
|
Given an error message with newline characters
|
|
When I mark "wordnet" with the error message
|
|
Then the error message should be stored correctly
|
|
And newlines should be preserved or handled appropriately
|
|
|
|
Scenario: Clear error message when marking as completed
|
|
Given "wordnet" has error "Previous error message"
|
|
When I mark "wordnet" as completed
|
|
Then the error message should be cleared
|
|
And the status should be "DONE"
|
|
|
|
Scenario: Clear error message when resetting to NOT STARTED without error
|
|
Given "wordnet" has error "Previous error message"
|
|
When I reset "wordnet" to not started without error message
|
|
Then the error message should be cleared
|
|
And the status should be "NOT STARTED"
|
|
|
|
Scenario: Update error message when resetting to NOT STARTED with error
|
|
Given "wordnet" has error "Old error message"
|
|
When I reset "wordnet" to not started with error "New error message"
|
|
Then the error message should be updated to "New error message"
|
|
And the status should be "NOT STARTED"
|
|
|