stably 4.12.0 → 4.12.1
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.
|
@@ -120,6 +120,24 @@ All locators must use `.describe()` for readability in trace views:
|
|
|
120
120
|
page.getByRole('button', { name: 'Submit' }).describe('Submit button')
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
+
## Avoid `force: true` in Actions
|
|
124
|
+
|
|
125
|
+
`force: true` bypasses Playwright's actionability checks and can hide the real UI issue. It also **still waits for the element to exist**, so a bad locator may sit until the full test timeout.
|
|
126
|
+
|
|
127
|
+
**Prefer alternatives:**
|
|
128
|
+
- Fix the root cause (use a stable locator, wait for the right state)
|
|
129
|
+
- Use `page.mouse.click()` with `boundingBox()` only as a narrow escape hatch for canvas/SVG/overlay cases
|
|
130
|
+
|
|
131
|
+
**If `force: true` is truly necessary**, add a short explicit timeout so it fails fast:
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
// BAD — may inherit the full test timeout
|
|
135
|
+
await locator.click({ force: true });
|
|
136
|
+
|
|
137
|
+
// GOOD — fails fast
|
|
138
|
+
await locator.click({ force: true, timeout: 30_000 });
|
|
139
|
+
```
|
|
140
|
+
|
|
123
141
|
## Using Environment Variables in Browser Interactions
|
|
124
142
|
|
|
125
143
|
When you need to type or use environment variable values during browser interactions (e.g., typing a password into a login form), use the template literal syntax `${process.env.VARIABLE_NAME}` in the command. The system automatically replaces these with actual values before execution.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stably",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.1",
|
|
4
4
|
"packageManager": "pnpm@10.24.0",
|
|
5
5
|
"description": "AI-powered E2E Playwright testing CLI. Stably can understand your codebase, edit/run tests, and handle complex test scenarios for you.",
|
|
6
6
|
"main": "dist/index.mjs",
|