Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

docs(frontend): align AGENTS.md matcher with suite (no jest-dom) (#14539)

Nicholas Tindle7ea692372bf7
diff --git a/autogpt_platform/frontend/src/tests/AGENTS.md b/autogpt_platform/frontend/src/tests/AGENTS.md
index 87222559af..0c209ac411 100644
--- a/autogpt_platform/frontend/src/tests/AGENTS.md
+++ b/autogpt_platform/frontend/src/tests/AGENTS.md
@@ -109,9 +109,11 @@ test("shows error when submission fails", async () => {
```tsx
// Example: Test component renders correctly
render(<AgentCard title="My Agent" />);
-expect(screen.getByText("My Agent")).toBeInTheDocument();
+expect(screen.getByText("My Agent")).toBeDefined();
```
+Presence checks use `getBy*` (throws if missing) plus `toBeDefined()`. For absence, prefer `queryBy*` with `toBeNull()`. Do not use `toBeInTheDocument()` — `@testing-library/jest-dom` is not registered in this suite.
+
### ✅ Storybook Tests (Visual)
**Use for:** Design system, visual appearance, component documentation.