forked from cleveragents/cleveragents-core
55 lines
2.0 KiB
Gherkin
55 lines
2.0 KiB
Gherkin
Feature: Domain Models Validation
|
|
As a developer
|
|
I want to ensure domain models are properly validated
|
|
So that data integrity is maintained
|
|
|
|
Scenario: Create valid Project model
|
|
Given I have valid project data
|
|
When I create a Project model
|
|
Then the project model should be created successfully
|
|
And the project name should be validated
|
|
And the project path should be absolute
|
|
|
|
Scenario: Project name validation
|
|
Given I have project data with invalid name "123!@#"
|
|
When I try to create a Project model
|
|
Then a validation error should be raised
|
|
And the error should mention "Name must be alphanumeric"
|
|
|
|
Scenario: Create valid Plan model
|
|
Given I have valid plan data
|
|
When I create a Plan model
|
|
Then the plan model should be created successfully
|
|
And the plan status should be "pending"
|
|
And the plan should have timestamps
|
|
|
|
Scenario: Plan status transitions
|
|
Given I have a plan with status "pending"
|
|
When I update the plan status to "building"
|
|
Then the updated plan status should be "building"
|
|
And the updated_at timestamp should be updated
|
|
|
|
Scenario: Create valid Context model
|
|
Given I have valid context data
|
|
When I create a Context model
|
|
Then the context model should be created successfully
|
|
And the context type should be "file"
|
|
And the context should have a path
|
|
|
|
Scenario: Create valid Change model
|
|
Given I have valid change data
|
|
When I create a Change model
|
|
Then the change model should be created successfully
|
|
And the change operation should be valid
|
|
And the change should not be applied by default
|
|
|
|
Scenario: ChangeSet statistics
|
|
Given I have a changeset with multiple changes
|
|
When I get the changeset statistics
|
|
Then the stats should show correct counts
|
|
And the stats should count creates, modifies, and deletes
|
|
|
|
Scenario: Import auto-generated models
|
|
When I import the auto-generated models
|
|
Then all models should load without errors
|
|
And the models should have proper Pydantic configuration |