← ClaudeAtlas

write-behat-scenarioslisted

Write the Gherkin feature file and all scenarios for a domain: CRUD, bulk actions, filters, and error cases. Covers the .feature file side of Behat tests. Read Component/Behat/CONTEXT.md for conventions. Trigger: "write behat scenarios for {Domain}".
jeffsenso/prestashop-skills · ★ 4 · AI & Automation · score 79
Install: claude install-skill jeffsenso/prestashop-skills
# write-behat-scenarios Read `@.ai/Component/Behat/CONTEXT.md` for conventions (stateless steps, entity references, Given/When/Then). ## 1. Feature file setup Create `tests/Integration/Behaviour/Features/Scenario/{Domain}/{domain}_management.feature`: ```gherkin @restore-all-tables-before-feature Feature: {Domain} management As an admin I want to manage {domain}s So that ... Background: Given shop "shop1" with name "test_shop" exists ``` Background section should be minimal — only shared setup that every scenario needs. **Reference:** `tests/Integration/Behaviour/Features/Scenario/Tax/` (simple) ## 2. Create scenarios ```gherkin Scenario: Add a new {domain} with required fields When I add a {domain} "ref_1" with following properties: | name | Test {Domain} | | active | true | Then {domain} "ref_1" should have the following properties: | name | Test {Domain} | | active | true | ``` - Test with minimum required fields - Test with all fields - Assertion step independently loads the entity — stateless ## 3. Edit scenarios ```gherkin Scenario: Edit {domain} name Given {domain} "ref_1" exists with name "Original" When I edit {domain} "ref_1" with following properties: | name | Updated | Then {domain} "ref_1" should have the following properties: | name | Updated | ``` - Test partial update (only changed fields) - Verify unchanged fields remain unchanged ## 4. Delete scenarios ```gherkin Scenario: Del