@testspectra/skills 1.1.8-rc.9 → 1.1.10
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.
package/README.md
CHANGED
|
@@ -50,16 +50,16 @@ overrides the saved selection for a single invocation.
|
|
|
50
50
|
|
|
51
51
|
## Available Skills
|
|
52
52
|
|
|
53
|
-
| Skill
|
|
54
|
-
|
|
|
55
|
-
| `workspace-structure`
|
|
56
|
-
| `spec-and-suite-authoring`
|
|
57
|
-
| `page-objects-and-selectors` | Page Object pattern (`Spectra.get`/`getAll`), the `~`/`#` selector contract
|
|
58
|
-
| `matchers-and-assertions`
|
|
59
|
-
| `shared-steps-and-actions`
|
|
60
|
-
| `lifecycle-hooks`
|
|
61
|
-
| `fixtures-data`
|
|
62
|
-
| `network-interception`
|
|
53
|
+
| Skill | Covers |
|
|
54
|
+
| :--------------------------- | :------------------------------------------------------------------------------------------------ |
|
|
55
|
+
| `workspace-structure` | Directory layout, zero-import architecture, file suffixes, `spectra.config.ts`, core CLI commands |
|
|
56
|
+
| `spec-and-suite-authoring` | `suite.md` / `spec.md` frontmatter, the paired `*.test.ts` script, every `spectra lint` rule |
|
|
57
|
+
| `page-objects-and-selectors` | Page Object pattern (`Spectra.get`/`getAll`), the `~`/`#` selector contract |
|
|
58
|
+
| `matchers-and-assertions` | Full element action/assertion/collection matcher and global `Spectra.*` command reference |
|
|
59
|
+
| `shared-steps-and-actions` | `Step.*` business workflows vs `support/actions/*` technical utilities |
|
|
60
|
+
| `lifecycle-hooks` | `global-hooks/` vs `specs/<suite>/hooks/`, execution order, failure cascade |
|
|
61
|
+
| `fixtures-data` | `fixtures/*.json` and the ambient `Fixture.*` namespace |
|
|
62
|
+
| `network-interception` | `Spectra.intercept()` mocking, polling, and failure-simulation patterns |
|
|
63
63
|
|
|
64
64
|
Each skill is grounded in `docs/v2/` and the reference workspace at `cli/templates/default`, so an
|
|
65
65
|
AI coding agent scaffolding TestSpectra scripts produces code that already passes `spectra lint`.
|
package/dist/registry.js
CHANGED
|
@@ -19,10 +19,7 @@ function parseSkillContent(id, content) {
|
|
|
19
19
|
}
|
|
20
20
|
function findSkillsDir() {
|
|
21
21
|
// dist/registry.js -> ../skills ; src/registry.ts (ts-node/dev) -> ../skills
|
|
22
|
-
const candidates = [
|
|
23
|
-
path.resolve(__dirname, '../skills'),
|
|
24
|
-
path.resolve(__dirname, '../../skills'),
|
|
25
|
-
];
|
|
22
|
+
const candidates = [path.resolve(__dirname, '../skills'), path.resolve(__dirname, '../../skills')];
|
|
26
23
|
return candidates.find((dir) => fs.existsSync(dir));
|
|
27
24
|
}
|
|
28
25
|
export function loadAllSkills() {
|
|
@@ -103,16 +103,16 @@ collection carry the scope forward too. No behavior difference on web vs. Androi
|
|
|
103
103
|
|
|
104
104
|
## 5. Global `Spectra.*` Commands
|
|
105
105
|
|
|
106
|
-
| Category | Syntax
|
|
107
|
-
| :------------- |
|
|
108
|
-
| Navigation | `await Spectra.navigate("/login")` / `.back()` / `.forward()` / `.refresh()`
|
|
106
|
+
| Category | Syntax |
|
|
107
|
+
| :------------- | :------------------------------------------------------------------------------------------------------------------------------- |
|
|
108
|
+
| Navigation | `await Spectra.navigate("/login")` / `.back()` / `.forward()` / `.refresh()` |
|
|
109
109
|
| Element query | `Spectra.get(selector)` / `Spectra.getAll(selector)` — chain `.get()`/`.getAll()` on the result to scope a lookup, see section 4 |
|
|
110
|
-
| Window | `await Spectra.setViewport(1920, 1080)`
|
|
111
|
-
| Timing | `await Spectra.wait(1000)`
|
|
112
|
-
| Keyboard | `await Spectra.pressKey("Enter")`
|
|
113
|
-
| Scroll | `await Spectra.scroll({ direction: "down", pixels: 400 })`
|
|
114
|
-
| Mobile gesture | `await Spectra.swipe({ direction: "left", distance: 300 })`
|
|
115
|
-
| Network mock | `const mock = await Spectra.intercept({ url, method, response })` — see the `network-interception` skill
|
|
110
|
+
| Window | `await Spectra.setViewport(1920, 1080)` |
|
|
111
|
+
| Timing | `await Spectra.wait(1000)` |
|
|
112
|
+
| Keyboard | `await Spectra.pressKey("Enter")` |
|
|
113
|
+
| Scroll | `await Spectra.scroll({ direction: "down", pixels: 400 })` |
|
|
114
|
+
| Mobile gesture | `await Spectra.swipe({ direction: "left", distance: 300 })` |
|
|
115
|
+
| Network mock | `const mock = await Spectra.intercept({ url, method, response })` — see the `network-interception` skill |
|
|
116
116
|
|
|
117
117
|
## 6. `Spectra.browser.*` — Browser/Context Level
|
|
118
118
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testspectra/skills",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.10",
|
|
4
4
|
"description": "Installer & manager for modular AI agent skills that standardize TestSpectra script authoring (specs, page objects, steps, actions, hooks, fixtures, matchers)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -103,16 +103,16 @@ collection carry the scope forward too. No behavior difference on web vs. Androi
|
|
|
103
103
|
|
|
104
104
|
## 5. Global `Spectra.*` Commands
|
|
105
105
|
|
|
106
|
-
| Category | Syntax
|
|
107
|
-
| :------------- |
|
|
108
|
-
| Navigation | `await Spectra.navigate("/login")` / `.back()` / `.forward()` / `.refresh()`
|
|
106
|
+
| Category | Syntax |
|
|
107
|
+
| :------------- | :------------------------------------------------------------------------------------------------------------------------------- |
|
|
108
|
+
| Navigation | `await Spectra.navigate("/login")` / `.back()` / `.forward()` / `.refresh()` |
|
|
109
109
|
| Element query | `Spectra.get(selector)` / `Spectra.getAll(selector)` — chain `.get()`/`.getAll()` on the result to scope a lookup, see section 4 |
|
|
110
|
-
| Window | `await Spectra.setViewport(1920, 1080)`
|
|
111
|
-
| Timing | `await Spectra.wait(1000)`
|
|
112
|
-
| Keyboard | `await Spectra.pressKey("Enter")`
|
|
113
|
-
| Scroll | `await Spectra.scroll({ direction: "down", pixels: 400 })`
|
|
114
|
-
| Mobile gesture | `await Spectra.swipe({ direction: "left", distance: 300 })`
|
|
115
|
-
| Network mock | `const mock = await Spectra.intercept({ url, method, response })` — see the `network-interception` skill
|
|
110
|
+
| Window | `await Spectra.setViewport(1920, 1080)` |
|
|
111
|
+
| Timing | `await Spectra.wait(1000)` |
|
|
112
|
+
| Keyboard | `await Spectra.pressKey("Enter")` |
|
|
113
|
+
| Scroll | `await Spectra.scroll({ direction: "down", pixels: 400 })` |
|
|
114
|
+
| Mobile gesture | `await Spectra.swipe({ direction: "left", distance: 300 })` |
|
|
115
|
+
| Network mock | `const mock = await Spectra.intercept({ url, method, response })` — see the `network-interception` skill |
|
|
116
116
|
|
|
117
117
|
## 6. `Spectra.browser.*` — Browser/Context Level
|
|
118
118
|
|