Created 5 feature files covering blog generation, scheduling, LLM provider selection, SEO population, and notification emails. These files define the Gherkin scenarios that pytest-bdd will generate test functions for. - blog_generation.feature: On-demand generation with auto-publish toggle - blog_scheduling.feature: Scheduled cron slot execution - llm_provider_selection.feature: Provider dispatch and error handling - seo_population.feature: SEO metadata and tag assignment - notification_email.feature: Email notifications after generation Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
41 lines
1.9 KiB
Gherkin
41 lines
1.9 KiB
Gherkin
Feature: On-demand blog generation
|
|
As a content editor
|
|
I want to generate blog posts on demand using the wizard
|
|
So that I can quickly create content
|
|
|
|
Scenario: Generate and auto-publish a blog post from the backend
|
|
Given the Anthropic API key is configured in Settings
|
|
And the blog "ITSulu Insights" exists in Odoo
|
|
And I am on the Blog Publisher backend form
|
|
And I enter topic "AI Governance Frameworks"
|
|
And I select provider "anthropic" and model "claude-sonnet-4-20250514"
|
|
And I set auto-publish to true
|
|
When I click "Generate Now"
|
|
Then a blog.post record is created with a non-empty title
|
|
And the blog.post body_arch contains at least 200 characters of HTML
|
|
And the blog.post is_published is true
|
|
And the SEO fields website_meta_title and website_meta_description are populated
|
|
And a generation log entry exists with state "success"
|
|
|
|
Scenario: Generate a blog post and leave it as draft
|
|
Given the Anthropic API key is configured in Settings
|
|
And the blog "ITSulu Insights" exists in Odoo
|
|
And I am on the Blog Publisher backend form
|
|
And I enter topic "Cloud Cost Optimization"
|
|
And I select provider "anthropic" and model "claude-sonnet-4-20250514"
|
|
And I set auto-publish to false
|
|
When I click "Generate Now"
|
|
Then a blog.post record is created with a non-empty title
|
|
And the blog.post is_published is false
|
|
And a generation log entry exists with state "success"
|
|
|
|
Scenario: LLM API call fails gracefully
|
|
Given the Anthropic API key is invalid
|
|
And the blog "ITSulu Insights" exists in Odoo
|
|
And I am on the Blog Publisher backend form
|
|
And I enter topic "Any Topic"
|
|
When I click "Generate Now"
|
|
Then no blog.post record is created
|
|
And a generation log entry exists with state "error"
|
|
And the log contains a human-readable error message
|
|
And a "Retry" button is visible on the log record
|