mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
feat: add Playwright agent testability infrastructure
Add test harness (window.__bitvidTest__), data-testid attributes, relay override support, and Playwright fixtures so agents can programmatically login, seed relay data, and inspect app state during E2E testing. - js/testHarness.js: exposes loginWithNsec, getAppState, relay overrides - data-testid attrs on login/upload/video modals, header buttons, feed - simple-relay.mjs: HTTP seeding API (POST /seed, GET /events, /health) - bitvidTestFixture.ts: reusable Playwright fixture with mock relay - agent-testability.spec.ts: E2E tests validating the infrastructure https://claude.ai/code/session_01XnrszNmdqrAGd8g8qhAn4G
This commit is contained in:
13 files changed
+839
-29
No files matched your search
@@ -207,6 +207,7 @@
|
||||
name="query"
|
||||
placeholder="Search videos"
|
||||
autocomplete="off"
|
||||
data-testid="search-input"
|
||||
/>
|
||||
<button type="submit" class="header-search__submit">
|
||||
<span class="sr-only">Submit search</span>
|
||||
@@ -264,6 +265,7 @@
|
||||
id="loginButton"
|
||||
class="btn focus-ring h-12 w-12 rounded-full p-0"
|
||||
aria-label="Open login modal"
|
||||
data-testid="login-button"
|
||||
>
|
||||
<svg
|
||||
class="h-9 w-9"
|
||||
@@ -284,6 +286,7 @@
|
||||
<button
|
||||
id="uploadButton"
|
||||
class="btn focus-ring hidden h-12 w-12 rounded-full p-0 text-xl font-bold leading-none"
|
||||
data-testid="upload-button"
|
||||
>
|
||||
+
|
||||
</button>
|
||||
@@ -292,6 +295,7 @@
|
||||
<button
|
||||
id="profileButton"
|
||||
class="btn-ghost focus-ring relative hidden h-12 w-12 rounded-full p-0"
|
||||
data-testid="profile-button"
|
||||
>
|
||||
<div class="h-10 w-10 overflow-hidden rounded-full">
|
||||
<img
|
||||
|
||||
Reference in new issue
Block a user