用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/tomes --skill e2e-test-generation命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
> Use when this capability is needed.
Use when writing kernel, account, or note MASM code that reads from or writes to the advice provider (advice stack / advice map) — validate advice data.
Use when writing a Rust test that exercises a failure path or a MASM test that expects a `panic` / `assert` — assert on the specific expected error variant or error code.
基于 SOC 职业分类
正在显示 SKILL.md
| name | e2e-test-generation |
| description | Create E2E tests for Chrome extension using Playwright Use when this capability is needed. |
| metadata | {"author":"amitsingh-007"} |
data-testid and getByTestId() as the primary test selector patterndata-testid attributes to components when needed for robust test selectors@bypass/shared/tests and add local constants only when test-specificimport { test, expect } from '../fixtures/bookmark-fixture'Use this when you need to create new E2E tests or update existing tests for the Chrome extension.
I will ask clarifying questions if:
data-testid with getByTestId() (project standard, including dynamic patterns)
bookmarksPage.getByTestId('folder-item-Main');
bookmarksPage.locator('[data-testid^="bookmark-item-"]');
Accessible Role Selectors (when data-testid not available)
bookmarksPage.getByRole('button', { name: 'Add' });
bookmarksPage.getByRole('dialog', { name: 'Add folder' });
Placeholder/Label Selectors
dialog.getByPlaceholder('Enter folder name');
bookmarksPage.getByLabel('History');
Text Content (transient UI only: toasts, notifications, short labels)
bookmarksPage.getByText('Remove inner folders first');
Title/Alt Selectors (fallback when better selectors are unavailable)
bookmarksPage.getByTitle('Edit Bookmark');
bookmarksPage.getByAltText('User avatar');
[class*="Folder-module__container"], .some-generated-classdata-testid): data-folder-name, data-context-id, etc.{ name: /add/i } when { name: 'Add' } is sufficient.first(), .nth()img, div, span (use data-testid instead).evaluate() for clicks (use direct .click() instead)@bypass/shared/tests constants first; keep local constants scoped to a spec when neededtest.describe for 2+ testsOpening a dialog:
const addButton = bookmarksPage.getByRole('button', { name: 'Add' });
await addButton.click();
const dialog = bookmarksPage.getByRole('dialog', { name: 'Add folder' });
await expect(dialog).toBeVisible();
Filling a form:
await dialog.getByPlaceholder('Enter folder name').fill('Test Folder');
await dialog.getByRole('button', { name: 'Save' }).click();
await expect(dialog).toBeHidden();
Context menu:
await element.click({ button: 'right' });
const editOption = bookmarksPage.getByTestId('context-menu-item-edit');
await expect(editOption).toBeVisible();
await editOption.click();
Multi-select with keyboard:
await firstItem.click();
await secondItem.click({ modifiers: ['Meta'] }); // Cmd/Ctrl+click
Waiting for navigation:
const [newPage] = await Promise.all([
context.waitForEvent('page', { timeout: 15_000 }),
element.dblclick(),
]);
expect(newPage).toBeTruthy();
Run the test file to verify it works:
pnpm e2e apps/extension/tests/specs/<your-test-file>.spec.ts
@bypass/shared/tests where possibletest.describe only for 2+ related testsSource: amitsingh-007/bypass-links — distributed by TomeVault.