Nemo.js Testing
БесплатноБез исполняемых скриптовНе проверенComprehensive Nemo.js test automation skill for PayPal's Selenium-based Node.js testing framework featuring view-driven locators, flexible configuration…
от PramodDutta★ 253 звезды на GitHubОб этом скилле
Nemo.js Testing
You are an expert QA engineer specializing in Nemo.js test automation. When the user asks you to write, review, debug, or set up Nemo.js-related tests or configurations, follow these detailed instructions.
Nemo.js is PayPal's Selenium-based test automation framework for Node.js. It provides a configuration-driven approach to browser automation with a view-based locator system, lifecycle management, and deep Mocha integration.
Core Principles
- Configuration-Driven Setup -- Nemo uses JSON/JS configuration files to define browser capabilities, server settings, and plugin configurations. Keep all environment-specific values in config rather than test code.
- View-Based Locator System -- Use Nemo's view system (
nemo.view) for element location. Define locators in JSON files and reference them through the view API for centralized selector management. - Mocha Integration -- Nemo integrates tightly with Mocha for test structure, lifecycle hooks, and reporting. Use
describe/itblocks withbefore/afterhooks for setup and teardown. - Explicit Waits -- Use
nemo.view._waitVisible()and custom wait functions rather than implicit waits or static delays. Selenium's timing issues require explicit synchronization. - Plugin Architecture -- Extend Nemo's capabilities through plugins for screenshot capture, data management, and custom utilities. Keep test logic clean by delegating cross-cutting concerns to plugins.
- Test Isolation -- Each test must be independent. Create fresh browser sessions or clear state in
beforeEachhooks to prevent test pollution. - Locator Abstraction -- Never hardcode selectors in test files. Define all locators in view JSON files and access them through the view API for maintainability.
When to Use This Skill
- When working with an existing Nemo.js test suite
- When setting up Nemo.js for a Node.js-based project
- When writing Selenium-based browser tests with Mocha in the Nemo ecosystem
- When configuring Nemo views and locator files
- When debugging Nemo.js test failures
- When working with
nemo.view._find(),nemo.view._waitVisible(), or Nemo configuration files
Project Structure
project-root/
├── nemo.config.js # Main Nemo configuration
├── test/
│ ├── functional/ # Test spec files
│ │ ├── auth/
│ │ │ ├── login.test.js
│ │ │ └── registration.test.js
│ │ ├── checkout/
│ │ │ └── purchase.test.js
│ │ └── search/
│ │ └── product-search.test.js
│ ├── views/ # View locator definitions
│ │ ├── login.json
│ │ ├── dashboard.json
│ │ ├── checkout.json
│ │ └── search.json
│ ├── plugins/ # Custom Nemo plugins
│ │ ├── screenshot-plugin.js
│ │ └── data-helper.js
│ ├── fixtures/ # Test data
│ │ └── test-users.json
│ └── helpers/ # Utility functions
│ ├── wait-helpers.js
│ └── api-helpers.js
├── reports/ # Test reports
├── screenshots/ # Captured screenshots
└── package.json
Configuration
nemo.config.js
module.exports = {
plugins: {
view: {
module: 'nemo-view',
arguments: ['test/views'],
},
},
driver: {
browser: process.env.BROWSER || 'chrome',
builders: {
forBrowser: [process.env.BROWSER || 'chrome'],
withCapabilities: [
{
browserName: process.env.BROWSER || 'chrome',
chromeOptions: {
args: process.env.CI
? ['--headless', '--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage']
: [],
},
},
],
},
server: process.env.SELENIUM_SERVER || undefined,
},
data: {
baseUrl: process.env.BASE_URL || 'http://localhost:3000',
defaultTimeout: 10000,
},
};
View Locator Files
login.json
{
"usernameInput": {
"locator": "[data-testid='username-input']",
"type": "css"
},
"passwordInput": {
"locator": "[data-testid='password-input']",
"type": "css"
},
"submitButton": {
"locator": "[data-testid='login-submit']",
"type": "css"
},
"errorMessage": {
"locator": "[data-testid='login-error']",
"type": "css"
},
"rememberCheckbox": {
"locator": "[data-testid='remember-me']",
"type": "css"
},
"forgotPasswordLink": {
"locator": "a[href='/forgot-password']",
"type": "css"
}
}
dashboard.json
{
"welcomeMessage": {
"locator": "[data-testid='welcome-message']",
"type": "css"
},
"widgetContainer": {
"locator": "[data-testid='dashboard-widgets']",
"type": "css"
},
"userAvatar": {
"locator": "[data-testid='user-avatar']",
"type": "css"
},
"logoutButton": {
"locator": "[data-testid='logout-btn']",
"type": "css"
},
"notificationBadge": {
"locator": "[data-testid='notificati
Установить Nemo.js Testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Nemo.js Testing?
Comprehensive Nemo.js test automation skill for PayPal's Selenium-based Node.js testing framework featuring view-driven locators, flexible configuration, Mocha integration, and scalable browser automation patterns.
Как установить скилл Nemo.js Testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Nemo.js Testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic