@haystackeditor/cli 0.10.0 → 0.10.2

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.
@@ -1,193 +0,0 @@
1
- # =============================================================================
2
- # Haystack Verification Configuration
3
- # =============================================================================
4
- #
5
- # This file tells Haystack how to verify that PRs actually work.
6
- # When a PR is opened, Haystack spins up a sandbox with your code and
7
- # runs these verification flows to ensure changes work correctly.
8
- #
9
- # For setup help, run: /verify setup
10
- # =============================================================================
11
-
12
- name: my-saas-app
13
-
14
- # -----------------------------------------------------------------------------
15
- # Dev Server - How to run your app
16
- # -----------------------------------------------------------------------------
17
- dev:
18
- command: pnpm dev
19
- port: 3000
20
- ready_pattern: "ready in" # Pattern in stdout that means server is ready
21
- cwd: "." # Working directory (relative to repo root)
22
- env:
23
- NODE_ENV: development
24
-
25
- # -----------------------------------------------------------------------------
26
- # Authentication - How to bypass/mock auth in the sandbox
27
- # -----------------------------------------------------------------------------
28
- auth:
29
- strategy: bypass
30
- env: "SKIP_AUTH=true"
31
-
32
- # Other options:
33
- # strategy: mock_token
34
- # env: "AUTH_TOKEN" # Set actual value as Haystack secret
35
-
36
- # strategy: test_account
37
- # username_env: "TEST_USER"
38
- # password_env: "TEST_PASS"
39
- # login_url: "/login"
40
-
41
- # -----------------------------------------------------------------------------
42
- # Fixtures - Where to get test data (so sandbox doesn't need real data)
43
- # -----------------------------------------------------------------------------
44
- fixtures:
45
- # Pull user data from staging API
46
- - pattern: "/api/users/*"
47
- source: "https://staging.myapp.com/api/users"
48
- headers:
49
- Authorization: "Bearer $STAGING_API_TOKEN"
50
-
51
- # Use local fixture file for config
52
- - pattern: "/api/config"
53
- source: "file://fixtures/config.json"
54
-
55
- # Generate dashboard data dynamically
56
- - pattern: "/api/dashboard"
57
- source: "script://fixtures/generate-dashboard.ts"
58
-
59
- # Let public endpoints go through
60
- - pattern: "/api/public/*"
61
- source: passthrough
62
-
63
- # -----------------------------------------------------------------------------
64
- # Verification Flows - What to actually test
65
- # -----------------------------------------------------------------------------
66
- # These are the flows the agent executes in the sandbox to verify PRs work.
67
- # Think of them like E2E tests, but run by an AI that can adapt and report.
68
-
69
- flows:
70
- # ---------------------------------------------------------------------------
71
- # Basic smoke test - runs on every PR
72
- # ---------------------------------------------------------------------------
73
- - name: "Homepage loads"
74
- description: "Verify the homepage renders without errors"
75
- trigger: always
76
- steps:
77
- - action: navigate
78
- url: "/"
79
- - action: wait_for
80
- selector: "#app"
81
- timeout_ms: 10000
82
- - action: assert_no_errors
83
- error_selectors:
84
- - ".error-toast"
85
- - ".error-modal"
86
- - "[data-testid='error']"
87
- - action: screenshot
88
- name: "homepage"
89
-
90
- # ---------------------------------------------------------------------------
91
- # Dashboard flow - runs when dashboard files change
92
- # ---------------------------------------------------------------------------
93
- - name: "Dashboard functionality"
94
- description: "Verify dashboard loads and displays data correctly"
95
- trigger: on_change
96
- watch_patterns:
97
- - "src/components/dashboard/**"
98
- - "src/pages/dashboard.tsx"
99
- steps:
100
- - action: navigate
101
- url: "/dashboard"
102
- - action: wait_for
103
- selector: ".dashboard-grid"
104
- - action: assert_exists
105
- selector: ".metric-card"
106
- message: "Dashboard should display metric cards"
107
- - action: assert_text
108
- selector: ".welcome-message"
109
- contains: "Welcome"
110
- - action: screenshot
111
- name: "dashboard-loaded"
112
- # Test interactivity
113
- - action: click
114
- selector: "[data-testid='refresh-button']"
115
- description: "Click refresh button"
116
- - action: wait_network_idle
117
- timeout_ms: 5000
118
- - action: assert_no_errors
119
-
120
- # ---------------------------------------------------------------------------
121
- # Settings flow - test form interactions
122
- # ---------------------------------------------------------------------------
123
- - name: "Settings page"
124
- description: "Verify settings can be viewed and saved"
125
- trigger: on_change
126
- watch_patterns:
127
- - "src/components/settings/**"
128
- - "src/pages/settings.tsx"
129
- steps:
130
- - action: navigate
131
- url: "/settings"
132
- - action: wait_for
133
- selector: "form.settings-form"
134
- - action: screenshot
135
- name: "settings-initial"
136
- # Toggle dark mode
137
- - action: click
138
- selector: "#dark-mode-toggle"
139
- - action: assert_exists
140
- selector: "body.dark-mode"
141
- message: "Dark mode should be applied"
142
- - action: screenshot
143
- name: "settings-dark-mode"
144
- # Test form input
145
- - action: type
146
- selector: "#display-name"
147
- text: "Test User"
148
- - action: click
149
- selector: "button[type='submit']"
150
- - action: wait_network_idle
151
- - action: assert_no_errors
152
-
153
- # ---------------------------------------------------------------------------
154
- # Checkout flow - critical path, always run
155
- # ---------------------------------------------------------------------------
156
- - name: "Checkout flow"
157
- description: "Verify the complete checkout process works"
158
- trigger: always
159
- steps:
160
- - action: navigate
161
- url: "/products"
162
- - action: wait_for
163
- selector: ".product-grid"
164
- - action: click
165
- selector: ".product-card:first-child .add-to-cart"
166
- description: "Add first product to cart"
167
- - action: wait_for
168
- selector: ".cart-count"
169
- - action: assert_text
170
- selector: ".cart-count"
171
- contains: "1"
172
- - action: navigate
173
- url: "/cart"
174
- - action: wait_for
175
- selector: ".cart-items"
176
- - action: click
177
- selector: ".checkout-button"
178
- - action: wait_for
179
- selector: ".checkout-form"
180
- - action: screenshot
181
- name: "checkout-form"
182
- compare_baseline: true # Visual regression check
183
-
184
- # -----------------------------------------------------------------------------
185
- # Global Settings
186
- # -----------------------------------------------------------------------------
187
- settings:
188
- default_timeout_ms: 10000
189
- error_selectors:
190
- - ".error-toast"
191
- - ".error-boundary"
192
- - "[role='alert'][aria-live='assertive']"
193
- screenshot_each_step: false # Set true for debugging