@stablyai/playwright-test 2.1.1 → 2.1.3-rc.0

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
@@ -44,6 +44,25 @@ Either set the `STABLY_API_KEY` environment variable or programtically call `set
44
44
 
45
45
  The SDK adds new methods with AI visual assertions, full agent mode, and text extraction. See our [docs](https://docs.stably.ai/stably-sdk/ai-assertions) for more information.
46
46
 
47
+ It also includes Google auth bootstrap for test contexts:
48
+
49
+ ```typescript
50
+ import { test } from "@stablyai/playwright-test";
51
+
52
+ test("authenticated flow", async ({ context, page }) => {
53
+ await context.authWithGoogle({
54
+ email: "qa@example.com",
55
+ password: process.env.GOOGLE_TEST_PASSWORD!,
56
+ otpSecret: process.env.GOOGLE_TEST_OTP_SECRET!,
57
+ });
58
+
59
+ // Need help obtaining the Google OTP secret?
60
+ // https://docs.stably.ai/stably2/auth/google-otp-secret-helper
61
+
62
+ await page.goto("https://myaccount.google.com");
63
+ });
64
+ ```
65
+
47
66
  ## Stably Playwright Reporter
48
67
 
49
68
  The [Stably Playwright Reporter](https://docs.stably.ai/reports-analytics#reports-and-analytics) also comes bundled with this package. Most users will find value in using this reporter for recording test results and having AI diagnostics.