@webship.co/workspace-craft-cms 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -118,3 +118,17 @@ The Craft CMS plugin places these beside you, each in the workspace folder of it
118
118
  `/craft-cms-test <site>` (`ai-commands/`) and the prompt `craft-cms-build-and-test` (`ai-prompts/`), which is
119
119
  this agent's whole first job as a launch command: build, say what the site is, set the testing
120
120
  stack up, run the first feature.
121
+
122
+ ## The book
123
+
124
+ For any automated functional testing in this work (a Gherkin feature, a step definition, choosing a
125
+ step, a test run and its failures), read the book *Automated Functional Testing Recipes* first.
126
+
127
+ - **Where.** Use the first that exists: `.claude/automated-functional-testing-recipes/` in the project,
128
+ `~/.claude/automated-functional-testing-recipes/` (installed by webship/webship-js-ai-agent,
129
+ webship/webship-js-skills or webship/ai-agents), or
130
+ https://github.com/webship/webship-js-ai-agent/tree/2.0.x/automated-functional-testing-recipes
131
+ - **How.** Its `README.md` first, then the chapter that matches the task (one file per chapter,
132
+ named by its subject), not the single complete file.
133
+ - **Which wins.** The installed webship-js package and the step pack are the source of truth for
134
+ step phrasing. When they differ from the book, follow them and say so.
@@ -137,3 +137,21 @@ The Craft CMS plugin places these beside you, each in the workspace folder of it
137
137
  | `craft-cms-scenarios` (skill) | `ai-skills/` | The pack's phrases by area, the traps found on a real site, and three example features that pass on a fresh site |
138
138
  | `/craft-cms-test <site>` (command) | `ai-commands/` | The run itself: set up when missing, match every step, run, report |
139
139
  | `craft-cms-build-and-test` (prompt) | `ai-prompts/` | A new session that builds a site and runs its first feature |
140
+
141
+ ## The book
142
+
143
+ For any automated functional testing in this work (a Gherkin feature, a step definition, choosing a
144
+ step, a test run and its failures), read the book *Automated Functional Testing Recipes* first.
145
+
146
+ - **Where.** Use the first that exists: `.claude/automated-functional-testing-recipes/` in the project,
147
+ `~/.claude/automated-functional-testing-recipes/` (installed by webship/webship-js-ai-agent,
148
+ webship/webship-js-skills or webship/ai-agents), or
149
+ https://github.com/webship/webship-js-ai-agent/tree/2.0.x/automated-functional-testing-recipes
150
+ - **How.** Its `README.md` first, then the chapter that matches the task (one file per chapter,
151
+ named by its subject), not the single complete file.
152
+ - **Which wins.** The installed webship-js package and the step pack are the source of truth for
153
+ step phrasing. When they differ from the book, follow them and say so.
154
+ - **For Craft CMS.** Start with `ch26-testing-cms-applications.md` (content, publishing, media and
155
+ taxonomy), `ch10-authentication-authorization.md` (logins, sessions and access by role),
156
+ `ch33-complete-step-definition-reference.md` (every built-in step) and `ch21-when-tests-go-bad.md`
157
+ (flaky, brittle and slow scenarios).
@@ -88,3 +88,9 @@ A failing suite is a result: report it as it is. Never create an account for a s
88
88
  write a password into a feature file, and never write a platform name into a step phrase. For
89
89
  writing or fixing scenarios, use the `craft-cms-scenarios` skill or hand over to the `craft-cms-tester`
90
90
  agent; for changing the site, to `craft-cms-site-builder`.
91
+
92
+ Before you write or change a scenario, or read a failed run, read the book *Automated Functional
93
+ Testing Recipes* (its `README.md`, then the matching chapter):
94
+ `.claude/automated-functional-testing-recipes/` in the project,
95
+ `~/.claude/automated-functional-testing-recipes/`, or
96
+ https://github.com/webship/webship-js-ai-agent/tree/2.0.x/automated-functional-testing-recipes
@@ -9,6 +9,7 @@ Build a Craft CMS site named <name> in this sites folder and test it with webshi
9
9
  # the builder deletes a project of the same name first: stop if <name> is a site somebody still needs
10
10
  # nothing on the host: no craft, composer, npm or mysql outside the site's container
11
11
  # the free Solo edition only: enter no licence, switch no edition on, sign in to no store
12
+ # a feature to write or a run to read: the book Automated Functional Testing Recipes first (its README.md, then the matching chapter), from .claude/automated-functional-testing-recipes/ in the project, ~/.claude/automated-functional-testing-recipes/ or https://github.com/webship/webship-js-ai-agent/tree/2.0.x/automated-functional-testing-recipes
12
13
 
13
14
  1. bash cmd-craft-cms-project.sh <name> --install --add-users
14
15
  (--add-users makes the one account of the site the default account the scenarios log in as;
@@ -177,3 +177,21 @@ bash cmd-tools-testing.sh <site> --run --path tests/features/control-panel-sessi
177
177
  | `examples/control-panel-session.feature` | The admin logging in and out, a wrong login refused, a password reset, a visitor sent to the login form |
178
178
  | `examples/control-panel-navigation.feature` | The navigation of a fresh Solo site, the settings pages with their heading and breadcrumb, the pages an admin may open |
179
179
  | `examples/front-page.feature` | The front page served to a visitor, and an unknown address answered with 404 |
180
+
181
+ ## The book
182
+
183
+ For any automated functional testing in this work (a Gherkin feature, a step definition, choosing a
184
+ step, a test run and its failures), read the book *Automated Functional Testing Recipes* first.
185
+
186
+ - **Where.** Use the first that exists: `.claude/automated-functional-testing-recipes/` in the project,
187
+ `~/.claude/automated-functional-testing-recipes/` (installed by webship/webship-js-ai-agent,
188
+ webship/webship-js-skills or webship/ai-agents), or
189
+ https://github.com/webship/webship-js-ai-agent/tree/2.0.x/automated-functional-testing-recipes
190
+ - **How.** Its `README.md` first, then the chapter that matches the task (one file per chapter,
191
+ named by its subject), not the single complete file.
192
+ - **Which wins.** The installed webship-js package and the step pack are the source of truth for
193
+ step phrasing. When they differ from the book, follow them and say so.
194
+ - **For Craft CMS.** Start with `ch26-testing-cms-applications.md` (content, publishing, media and
195
+ taxonomy), `ch10-authentication-authorization.md` (logins, sessions and access by role),
196
+ `ch33-complete-step-definition-reference.md` (every built-in step) and `ch21-when-tests-go-bad.md`
197
+ (flaky, brittle and slow scenarios).
@@ -3,28 +3,31 @@ Feature: The Craft CMS plugin on the dashboard
3
3
  AI folder lists the items of its kind the plugin ships, and the Plugins page lists the plugin
4
4
  with its steps.
5
5
 
6
- Scenario: The plugin is listed on the Plugins page
6
+ # The Plugins page names each plugin; the package is on the plugin's own page (the row shows it on hover only).
7
+ Scenario: The plugin is listed on the Plugins page, and its own page names its package
7
8
  Given I am on "/settings/plugins"
8
9
  Then I should see "Craft CMS"
9
- And I should see "@webship.co/workspace-craft-cms"
10
+ When I go to "/settings/plugin/craft-cms"
11
+ Then I should see "@webship.co/workspace-craft-cms"
10
12
 
11
13
  Scenario: A sites folder offers the Craft CMS builder
12
14
  Given I am on "/dev"
13
15
  Then "option[value='cmd-craft-cms-project.sh']" should be attached
14
16
 
17
+ # The AI folders are searched by name: with every plugin on, a folder lists more than one page of items.
15
18
  Scenario: The AI Agents folder lists the agents the plugin ships
16
- Given I am on "/ai-agents"
19
+ Given I am on "/ai-agents?q=craft-cms-"
17
20
  Then I should see "craft-cms-site-builder"
18
21
  And I should see "craft-cms-tester"
19
22
 
20
23
  Scenario: The AI Skills folder lists the skill the plugin ships
21
- Given I am on "/ai-skills"
24
+ Given I am on "/ai-skills?q=craft-cms-scenarios"
22
25
  Then I should see "craft-cms-scenarios"
23
26
 
24
27
  Scenario: The AI Commands folder lists the command the plugin ships
25
- Given I am on "/ai-commands"
28
+ Given I am on "/ai-commands?q=craft-cms-test"
26
29
  Then I should see "craft-cms-test"
27
30
 
28
31
  Scenario: The AI Prompts folder lists the prompt the plugin ships
29
- Given I am on "/ai-prompts"
32
+ Given I am on "/ai-prompts?q=craft-cms-build-and-test"
30
33
  Then I should see "craft-cms-build-and-test"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webship.co/workspace-craft-cms",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Craft CMS for Webship Workspace: the builder (`cmd-craft-cms-project.sh`) and the craft console tool in every sites folder, the default account of the free Solo edition, the Craft CMS step pack wired into the testing setup, and its AI items in their folders: two agents, a skill, a command and a prompt.",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",