diff --git a/.cursor/skills/playwright-testing/SKILL.md b/.cursor/skills/playwright-testing/SKILL.md index 7f724b8c6..6512f12dc 100644 --- a/.cursor/skills/playwright-testing/SKILL.md +++ b/.cursor/skills/playwright-testing/SKILL.md @@ -224,8 +224,6 @@ What are you doing? │ ├─ Framework-specific testing? │ ├─ React app → frameworks/react.md -│ ├─ Angular app → frameworks/angular.md -│ ├─ Vue/Nuxt app → frameworks/vue.md │ └─ Next.js app → frameworks/nextjs.md │ ├─ Authentication testing? diff --git a/.cursor/skills/playwright-testing/core/test-suite-structure.md b/.cursor/skills/playwright-testing/core/test-suite-structure.md index 2659f1502..547a78afe 100644 --- a/.cursor/skills/playwright-testing/core/test-suite-structure.md +++ b/.cursor/skills/playwright-testing/core/test-suite-structure.md @@ -116,7 +116,7 @@ Test individual components in isolation using Playwright Component Testing. npm init playwright@latest -- --ct ``` -For comprehensive component testing patterns including mounting, props, events, slots, mocking, and framework-specific examples (React, Vue, Svelte), see **[component-testing.md](../testing-patterns/component-testing.md)**. +For comprehensive component testing patterns including mounting, props, events, slots, mocking, and framework-specific examples, see **[component-testing.md](../testing-patterns/component-testing.md)**. ## API Tests diff --git a/.cursor/skills/playwright-testing/testing-patterns/component-testing.md b/.cursor/skills/playwright-testing/testing-patterns/component-testing.md index 9cb36ae0e..71c0dff0f 100644 --- a/.cursor/skills/playwright-testing/testing-patterns/component-testing.md +++ b/.cursor/skills/playwright-testing/testing-patterns/component-testing.md @@ -17,15 +17,6 @@ ```bash # React npm init playwright@latest -- --ct - -# Vue -npm init playwright@latest -- --ct - -# Svelte -npm init playwright@latest -- --ct - -# Solid -npm init playwright@latest -- --ct ``` ### Configuration @@ -317,24 +308,6 @@ test("renders children", async ({ mount }) => { }); ``` -### Testing Named Slots (Vue) - -```tsx -// Vue component with slots -test("renders named slots", async ({ mount }) => { - const component = await mount(Modal, { - slots: { - header: "
Modal content
", - footer: "", - }, - }); - - await expect(component.getByRole("heading")).toHaveText("Modal Title"); - await expect(component.getByRole("button")).toHaveText("Close"); -}); -``` - ### Testing Render Props ```tsx @@ -449,41 +422,6 @@ test("uses context", async ({ mount }) => { }); ``` -### Vue Testing - -```tsx -import { test, expect } from "@playwright/experimental-ct-vue"; -import MyInput from "@/components/MyInput.vue"; - -// With v-model -test("v-model binding", async ({ mount }) => { - let modelValue = ""; - const component = await mount(MyInput, { - props: { - modelValue, - "onUpdate:modelValue": (v: string) => (modelValue = v), - }, - }); - - await component.locator("input").fill("test"); - expect(modelValue).toBe("test"); -}); -``` - -### Svelte Testing - -```tsx -import { test, expect } from "@playwright/experimental-ct-svelte"; -import Counter from "./Counter.svelte"; - -test("Svelte component", async ({ mount }) => { - const component = await mount(Counter, { props: { initialCount: 5 } }); - await expect(component.getByTestId("count")).toHaveText("5"); - await component.getByRole("button", { name: "+" }).click(); - await expect(component.getByTestId("count")).toHaveText("6"); -}); -``` - ## Anti-Patterns to Avoid | Anti-Pattern | Problem | Solution |