Squash-merge of fix/ci-pipeline-corrections. Drives the full test suite
to 69/69 green on the ITSulu K8s cluster and fixes two production bugs.
Production fixes:
- Email template migrated from dead Odoo Mako (${}/% for) to Odoo 17
inline_template ({{ }}) + qweb body (type="html", t-out/t-foreach/t-if).
Notification emails previously rendered raw code in the subject/body.
- _create_blog_post now writes 'content': llm_response.body_html — every
auto-generated post was publishing empty.
- Removed duplicate itsulu_social_id field (startup warning).
Testing & infra:
- CI pipeline corrected (stage order, DB auth, junit artifact, addons path).
- E2E moved to ephemeral jobs in the itsulu-testing K8s namespace.
- Test code brought up to Odoo 17 (mail rendering, blog.post.content,
pytest-bdd env fixture, _render_field).
Versioning:
- Introduce MAJOR.MINOR.PATCH scheme, VERSION file, scripts/bump-version.sh,
CHANGELOG.md; first release v0.4.8. CLAUDE.md §15 documents the process.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
41 lines
1.8 KiB
Gherkin
41 lines
1.8 KiB
Gherkin
# =================================================================
|
|
# On-demand AI blog post generation
|
|
# =================================================================
|
|
Feature: On-demand AI blog post generation
|
|
As an ITSulu content admin
|
|
I want to trigger blog post generation with a single button click
|
|
So that I no longer need CoWork running on a Windows VM
|
|
|
|
Background:
|
|
Given the Anthropic API key is configured in Settings
|
|
And the blog "ITSulu Insights" exists in Odoo
|
|
|
|
Scenario: Generate and auto-publish a blog post from the backend
|
|
Given I am on the Blog Publisher backend form
|
|
And I enter topic "Prompt Governance in Enterprise AI"
|
|
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 content contains at least 500 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 I am on the Blog Publisher backend form
|
|
And I enter topic "Open Source LLMs for Business"
|
|
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
|
|
|
|
Scenario: LLM API call fails gracefully
|
|
Given the Anthropic API key is invalid
|
|
And I enter topic "Any topic"
|
|
And I set auto-publish to True
|
|
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
|