[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D90DVFK8CH06546H154DCY":3,"skill-same:01M7D90DVFK8CH06546H154DCY":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":14,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M7D90DVFK8CH06546H154DCY","Nemo.js Testing",null,"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.","GrupoANDevelopment-m\u002Falberto-ai","GrupoANDevelopment-m","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257455179?v=4","01M7D69X2N2KEVN0SJF6WGM6SH","Antônio  Ndombe","01M7D69X3P5JTT8H8S904N3888",0,"MIT","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fnemojs-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"Nemo.js Testing\"\ndescription: \"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.\"\nversion: 1.0.0\nauthor: thetestingacademy\nlicense: MIT\ntags: [nemojs, nemo, paypal, selenium, node, browser-testing, automation, mocha]\ntestingTypes: [e2e, integration]\nframeworks: [nemojs]\nlanguages: [javascript]\ndomains: [web]\nagents: [claude-code, cursor, github-copilot, windsurf, codex, aider, continue, cline, zed, bolt]\n---\n\n# Nemo.js Testing\n\nYou 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.\n\nNemo.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.\n\n## Core Principles\n\n1. **Configuration-Driven Setup** -- Nemo uses JSON\u002FJS configuration files to define browser capabilities, server settings, and plugin configurations. Keep all environment-specific values in config rather than test code.\n2. **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.\n3. **Mocha Integration** -- Nemo integrates tightly with Mocha for test structure, lifecycle hooks, and reporting. Use `describe`\u002F`it` blocks with `before`\u002F`after` hooks for setup and teardown.\n4. **Explicit Waits** -- Use `nemo.view._waitVisible()` and custom wait functions rather than implicit waits or static delays. Selenium's timing issues require explicit synchronization.\n5. **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.\n6. **Test Isolation** -- Each test must be independent. Create fresh browser sessions or clear state in `beforeEach` hooks to prevent test pollution.\n7. **Locator Abstraction** -- Never hardcode selectors in test files. Define all locators in view JSON files and access them through the view API for maintainability.\n\n## When to Use This Skill\n\n- When working with an existing Nemo.js test suite\n- When setting up Nemo.js for a Node.js-based project\n- When writing Selenium-based browser tests with Mocha in the Nemo ecosystem\n- When configuring Nemo views and locator files\n- When debugging Nemo.js test failures\n- When working with `nemo.view._find()`, `nemo.view._waitVisible()`, or Nemo configuration files\n\n## Project Structure\n\n```\nproject-root\u002F\n├── nemo.config.js                  # Main Nemo configuration\n├── test\u002F\n│   ├── functional\u002F                 # Test spec files\n│   │   ├── auth\u002F\n│   │   │   ├── login.test.js\n│   │   │   └── registration.test.js\n│   │   ├── checkout\u002F\n│   │   │   └── purchase.test.js\n│   │   └── search\u002F\n│   │       └── product-search.test.js\n│   ├── views\u002F                      # View locator definitions\n│   │   ├── login.json\n│   │   ├── dashboard.json\n│   │   ├── checkout.json\n│   │   └── search.json\n│   ├── plugins\u002F                    # Custom Nemo plugins\n│   │   ├── screenshot-plugin.js\n│   │   └── data-helper.js\n│   ├── fixtures\u002F                   # Test data\n│   │   └── test-users.json\n│   └── helpers\u002F                    # Utility functions\n│       ├── wait-helpers.js\n│       └── api-helpers.js\n├── reports\u002F                        # Test reports\n├── screenshots\u002F                    # Captured screenshots\n└── package.json\n```\n\n## Configuration\n\n### nemo.config.js\n\n```javascript\nmodule.exports = {\n  plugins: {\n    view: {\n      module: 'nemo-view',\n      arguments: ['test\u002Fviews'],\n    },\n  },\n  driver: {\n    browser: process.env.BROWSER || 'chrome',\n    builders: {\n      forBrowser: [process.env.BROWSER || 'chrome'],\n      withCapabilities: [\n        {\n          browserName: process.env.BROWSER || 'chrome',\n          chromeOptions: {\n            args: process.env.CI\n              ? ['--headless', '--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage']\n              : [],\n          },\n        },\n      ],\n    },\n    server: process.env.SELENIUM_SERVER || undefined,\n  },\n  data: {\n    baseUrl: process.env.BASE_URL || 'http:\u002F\u002Flocalhost:3000',\n    defaultTimeout: 10000,\n  },\n};\n```\n\n### View Locator Files\n\n#### login.json\n\n```json\n{\n  \"usernameInput\": {\n    \"locator\": \"[data-testid='username-input']\",\n    \"type\": \"css\"\n  },\n  \"passwordInput\": {\n    \"locator\": \"[data-testid='password-input']\",\n    \"type\": \"css\"\n  },\n  \"submitButton\": {\n    \"locator\": \"[data-testid='login-submit']\",\n    \"type\": \"css\"\n  },\n  \"errorMessage\": {\n    \"locator\": \"[data-testid='login-error']\",\n    \"type\": \"css\"\n  },\n  \"rememberCheckbox\": {\n    \"locator\": \"[data-testid='remember-me']\",\n    \"type\": \"css\"\n  },\n  \"forgotPasswordLink\": {\n    \"locator\": \"a[href='\u002Fforgot-password']\",\n    \"type\": \"css\"\n  }\n}\n```\n\n#### dashboard.json\n\n```json\n{\n  \"welcomeMessage\": {\n    \"locator\": \"[data-testid='welcome-message']\",\n    \"type\": \"css\"\n  },\n  \"widgetContainer\": {\n    \"locator\": \"[data-testid='dashboard-widgets']\",\n    \"type\": \"css\"\n  },\n  \"userAvatar\": {\n    \"locator\": \"[data-testid='user-avatar']\",\n    \"type\": \"css\"\n  },\n  \"logoutButton\": {\n    \"locator\": \"[data-testid='logout-btn']\",\n    \"type\": \"css\"\n  },\n  \"notificationBadge\": {\n    \"locator\": \"[data-testid='notification-badge']\",\n    \"type\": \"css\"\n  }\n}\n```\n\n## Writing Tests\n\n### Basic Authentication Test\n\n```javascript\nconst assert = require('assert');\n\ndescribe('User Authentication', function () {\n  this.timeout(30000);\n  let nemo;\n\n  before(async function () {\n    nemo = this.nemo;\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Flogin`);\n  });\n\n  it('should login with valid credentials', async function () {\n    const loginView = nemo.view.login;\n\n    await loginView.usernameInput().waitVisible(nemo.data.defaultTimeout);\n    await loginView.usernameInput().clear();\n    await loginView.usernameInput().sendKeys('testuser@example.com');\n    await loginView.passwordInput().clear();\n    await loginView.passwordInput().sendKeys('SecurePass123!');\n    await loginView.submitButton().click();\n\n    \u002F\u002F Wait for dashboard to load\n    const dashView = nemo.view.dashboard;\n    await dashView.welcomeMessage().waitVisible(nemo.data.defaultTimeout);\n\n    const welcomeText = await dashView.welcomeMessage().getText();\n    assert.ok(welcomeText.includes('Welcome'), `Expected welcome text, got: ${welcomeText}`);\n  });\n\n  it('should show error for invalid credentials', async function () {\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Flogin`);\n    const loginView = nemo.view.login;\n\n    await loginView.usernameInput().waitVisible(nemo.data.defaultTimeout);\n    await loginView.usernameInput().clear();\n    await loginView.usernameInput().sendKeys('invalid@example.com');\n    await loginView.passwordInput().clear();\n    await loginView.passwordInput().sendKeys('wrongpassword');\n    await loginView.submitButton().click();\n\n    await loginView.errorMessage().waitVisible(nemo.data.defaultTimeout);\n    const errorText = await loginView.errorMessage().getText();\n    assert.ok(\n      errorText.includes('Invalid email or password'),\n      `Expected error message, got: ${errorText}`\n    );\n  });\n\n  after(async function () {\n    if (nemo && nemo.driver) {\n      await nemo.driver.quit();\n    }\n  });\n});\n```\n\n### Working with Multiple Elements\n\n```javascript\ndescribe('Product Listing', function () {\n  this.timeout(30000);\n  let nemo;\n\n  before(async function () {\n    nemo = this.nemo;\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Fproducts`);\n  });\n\n  it('should display product cards', async function () {\n    \u002F\u002F Find multiple elements using _finds\n    const productCards = await nemo.view._finds('[data-testid=\"product-card\"]');\n    assert.ok(productCards.length > 0, 'Expected at least one product card');\n\n    \u002F\u002F Verify each card has required elements\n    for (const card of productCards) {\n      const title = await card.findElement({ css: '[data-testid=\"product-title\"]' });\n      const titleText = await title.getText();\n      assert.ok(titleText.length > 0, 'Product title should not be empty');\n\n      const price = await card.findElement({ css: '[data-testid=\"product-price\"]' });\n      const priceText = await price.getText();\n      assert.ok(priceText.match(\u002F\\$[\\d.]+\u002F), `Expected price format, got: ${priceText}`);\n    }\n  });\n\n  it('should filter products by search query', async function () {\n    const searchInput = await nemo.view._find('[data-testid=\"search-input\"]');\n    await searchInput.clear();\n    await searchInput.sendKeys('laptop');\n\n    const searchBtn = await nemo.view._find('[data-testid=\"search-submit\"]');\n    await searchBtn.click();\n\n    \u002F\u002F Wait for results to update\n    await nemo.view._waitVisible('[data-testid=\"search-results\"]', nemo.data.defaultTimeout);\n\n    const results = await nemo.view._finds('[data-testid=\"product-card\"]');\n    assert.ok(results.length > 0, 'Expected search results');\n  });\n\n  after(async function () {\n    if (nemo && nemo.driver) {\n      await nemo.driver.quit();\n    }\n  });\n});\n```\n\n### Custom Wait Patterns\n\n```javascript\ndescribe('Dynamic Content', function () {\n  this.timeout(30000);\n  let nemo;\n\n  before(async function () {\n    nemo = this.nemo;\n  });\n\n  it('should wait for loading spinner to disappear', async function () {\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Fdashboard`);\n\n    \u002F\u002F Wait for spinner to appear first\n    try {\n      await nemo.view._waitVisible('[data-testid=\"loading-spinner\"]', 2000);\n    } catch (e) {\n      \u002F\u002F Spinner may already be gone on fast loads\n    }\n\n    \u002F\u002F Wait for spinner to disappear\n    const { until, By } = require('selenium-webdriver');\n    await nemo.driver.wait(\n      until.stalenessOf(\n        await nemo.driver.findElement(By.css('[data-testid=\"loading-spinner\"]')).catch(() => null)\n      ),\n      15000,\n      'Loading spinner did not disappear'\n    );\n\n    \u002F\u002F Verify content loaded\n    await nemo.view._waitVisible('[data-testid=\"dashboard-content\"]', 10000);\n  });\n\n  it('should wait for specific text in element', async function () {\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Fstatus`);\n\n    const { until } = require('selenium-webdriver');\n    const statusElement = await nemo.view._find('[data-testid=\"status-text\"]');\n\n    await nemo.driver.wait(async () => {\n      const text = await statusElement.getText();\n      return text.includes('Connected');\n    }, 15000, 'Expected status to show Connected');\n  });\n\n  after(async function () {\n    if (nemo && nemo.driver) {\n      await nemo.driver.quit();\n    }\n  });\n});\n```\n\n### Screenshot Capture\n\n```javascript\nconst fs = require('fs');\nconst path = require('path');\n\nasync function captureScreenshot(nemo, testName) {\n  const screenshot = await nemo.driver.takeScreenshot();\n  const filename = `${testName.replace(\u002F\\s+\u002Fg, '-')}-${Date.now()}.png`;\n  const filepath = path.join(__dirname, '..\u002F..\u002Fscreenshots', filename);\n  fs.writeFileSync(filepath, screenshot, 'base64');\n  return filepath;\n}\n\n\u002F\u002F Usage in tests\nafterEach(async function () {\n  if (this.currentTest.state === 'failed') {\n    const screenshotPath = await captureScreenshot(nemo, this.currentTest.title);\n    console.log(`Screenshot saved: ${screenshotPath}`);\n  }\n});\n```\n\n### Reusable Helper Functions\n\n```javascript\n\u002F\u002F test\u002Fhelpers\u002Fwait-helpers.js\n\nasync function waitForUrlContains(nemo, urlFragment, timeout = 10000) {\n  const { until } = require('selenium-webdriver');\n  await nemo.driver.wait(until.urlContains(urlFragment), timeout, `URL did not contain \"${urlFragment}\" within ${timeout}ms`);\n}\n\nasync function waitForElementCount(nemo, selector, expectedCount, timeout = 10000) {\n  const startTime = Date.now();\n  while (Date.now() - startTime \u003C timeout) {\n    const elements = await nemo.view._finds(selector);\n    if (elements.length === expectedCount) return;\n    await nemo.driver.sleep(250);\n  }\n  throw new Error(`Expected ${expectedCount} elements for \"${selector}\", timed out after ${timeout}ms`);\n}\n\nasync function clearAndType(nemo, selector, text) {\n  const element = await nemo.view._find(selector);\n  await element.clear();\n  await element.sendKeys(text);\n}\n\nmodule.exports = { waitForUrlContains, waitForElementCount, clearAndType };\n```\n\n## Best Practices\n\n1. **Define all locators in view JSON files** -- Never hardcode CSS selectors or XPath in test files. The view system centralizes locator management and simplifies maintenance.\n2. **Use `data-testid` attributes** for all selectors. Coordinate with developers to add these attributes, ensuring tests are decoupled from visual styling.\n3. **Set explicit timeouts on all waits** -- Use `nemo.data.defaultTimeout` as a baseline but allow individual waits to override for operations that need more or less time.\n4. **Implement proper teardown** -- Always call `nemo.driver.quit()` in `after` hooks to prevent orphaned browser processes from accumulating.\n5. **Use environment variables** for base URLs, browser selection, and credentials. This allows the same test suite to run across development, staging, and production.\n6. **Capture screenshots on failure** using `afterEach` hooks. Store them with descriptive filenames that include the test name and timestamp.\n7. **Keep tests atomic** -- Each `it` block should test one behavior. Long tests that verify multiple features are hard to debug and maintain.\n8. **Use Mocha's `this.timeout()`** to set appropriate timeouts per test or suite. The default 2-second timeout is usually too short for browser tests.\n9. **Create reusable helper functions** for common patterns like login, navigation, and data verification. Import them across test files to reduce duplication.\n10. **Run tests in headless mode in CI** to reduce resource usage. Configure Chrome headless flags in the Nemo configuration based on the `CI` environment variable.\n\n## Anti-Patterns\n\n1. **Using `driver.sleep()` for synchronization** -- Static waits are slow and unreliable. Use `_waitVisible()` or Selenium's `until` conditions instead.\n2. **Hardcoding selectors in test files** -- Duplicating selectors across tests means a single UI change requires updates in many files.\n3. **Not cleaning up browser instances** -- Forgetting `driver.quit()` in teardown leaves zombie Chrome processes that consume memory and crash CI.\n4. **Sharing state between tests** -- Tests that rely on side effects from previous tests break when run in isolation or in different order.\n5. **Using overly specific CSS selectors** -- Selectors like `div.app > div.main > ul > li:first-child > a` break on minor DOM changes.\n6. **Not setting Mocha timeouts** -- Default 2-second timeouts cause false failures on legitimate browser interactions that take longer.\n7. **Ignoring element staleness** -- After page navigation or AJAX updates, previously found elements may become stale. Re-query elements after state changes.\n8. **Putting test data in code** -- Hardcoded usernames, passwords, and product IDs make tests environment-dependent. Use fixtures and environment variables.\n9. **Not using the view system** -- Bypassing Nemo's view abstraction defeats the framework's key benefit of centralized locator management.\n10. **Writing monolithic test functions** -- Long `it` blocks that verify multiple behaviors are hard to debug when they fail midway through.\n\n## CLI Reference\n\n```bash\n# Run all tests with Mocha\nnpx mocha test\u002Ffunctional\u002F**\u002F*.test.js --timeout 30000 --recursive\n\n# Run specific test file\nnpx mocha test\u002Ffunctional\u002Fauth\u002Flogin.test.js --timeout 30000\n\n# Run tests matching a pattern\nnpx mocha test\u002Ffunctional\u002F**\u002F*.test.js --grep \"login\" --timeout 30000\n\n# Run with reporter\nnpx mocha test\u002Ffunctional\u002F**\u002F*.test.js --timeout 30000 --reporter spec\n\n# Run in watch mode\nnpx mocha test\u002Ffunctional\u002F**\u002F*.test.js --timeout 30000 --watch\n```\n\n## Setup\n\n```bash\n# Install Nemo and dependencies\nnpm install --save-dev nemo nemo-view\n\n# Install Selenium WebDriver\nnpm install --save-dev selenium-webdriver\n\n# Install Chrome driver\nnpm install --save-dev chromedriver\n\n# Install Mocha\nnpm install --save-dev mocha\n\n# Install assertion library\nnpm install --save-dev chai\n```\n","# Nemo.js Testing\n\nYou 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.\n\nNemo.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.\n\n## Core Principles\n\n1. **Configuration-Driven Setup** -- Nemo uses JSON\u002FJS configuration files to define browser capabilities, server settings, and plugin configurations. Keep all environment-specific values in config rather than test code.\n2. **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.\n3. **Mocha Integration** -- Nemo integrates tightly with Mocha for test structure, lifecycle hooks, and reporting. Use `describe`\u002F`it` blocks with `before`\u002F`after` hooks for setup and teardown.\n4. **Explicit Waits** -- Use `nemo.view._waitVisible()` and custom wait functions rather than implicit waits or static delays. Selenium's timing issues require explicit synchronization.\n5. **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.\n6. **Test Isolation** -- Each test must be independent. Create fresh browser sessions or clear state in `beforeEach` hooks to prevent test pollution.\n7. **Locator Abstraction** -- Never hardcode selectors in test files. Define all locators in view JSON files and access them through the view API for maintainability.\n\n## When to Use This Skill\n\n- When working with an existing Nemo.js test suite\n- When setting up Nemo.js for a Node.js-based project\n- When writing Selenium-based browser tests with Mocha in the Nemo ecosystem\n- When configuring Nemo views and locator files\n- When debugging Nemo.js test failures\n- When working with `nemo.view._find()`, `nemo.view._waitVisible()`, or Nemo configuration files\n\n## Project Structure\n\n```\nproject-root\u002F\n├── nemo.config.js                  # Main Nemo configuration\n├── test\u002F\n│   ├── functional\u002F                 # Test spec files\n│   │   ├── auth\u002F\n│   │   │   ├── login.test.js\n│   │   │   └── registration.test.js\n│   │   ├── checkout\u002F\n│   │   │   └── purchase.test.js\n│   │   └── search\u002F\n│   │       └── product-search.test.js\n│   ├── views\u002F                      # View locator definitions\n│   │   ├── login.json\n│   │   ├── dashboard.json\n│   │   ├── checkout.json\n│   │   └── search.json\n│   ├── plugins\u002F                    # Custom Nemo plugins\n│   │   ├── screenshot-plugin.js\n│   │   └── data-helper.js\n│   ├── fixtures\u002F                   # Test data\n│   │   └── test-users.json\n│   └── helpers\u002F                    # Utility functions\n│       ├── wait-helpers.js\n│       └── api-helpers.js\n├── reports\u002F                        # Test reports\n├── screenshots\u002F                    # Captured screenshots\n└── package.json\n```\n\n## Configuration\n\n### nemo.config.js\n\n```javascript\nmodule.exports = {\n  plugins: {\n    view: {\n      module: 'nemo-view',\n      arguments: ['test\u002Fviews'],\n    },\n  },\n  driver: {\n    browser: process.env.BROWSER || 'chrome',\n    builders: {\n      forBrowser: [process.env.BROWSER || 'chrome'],\n      withCapabilities: [\n        {\n          browserName: process.env.BROWSER || 'chrome',\n          chromeOptions: {\n            args: process.env.CI\n              ? ['--headless', '--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage']\n              : [],\n          },\n        },\n      ],\n    },\n    server: process.env.SELENIUM_SERVER || undefined,\n  },\n  data: {\n    baseUrl: process.env.BASE_URL || 'http:\u002F\u002Flocalhost:3000',\n    defaultTimeout: 10000,\n  },\n};\n```\n\n### View Locator Files\n\n#### login.json\n\n```json\n{\n  \"usernameInput\": {\n    \"locator\": \"[data-testid='username-input']\",\n    \"type\": \"css\"\n  },\n  \"passwordInput\": {\n    \"locator\": \"[data-testid='password-input']\",\n    \"type\": \"css\"\n  },\n  \"submitButton\": {\n    \"locator\": \"[data-testid='login-submit']\",\n    \"type\": \"css\"\n  },\n  \"errorMessage\": {\n    \"locator\": \"[data-testid='login-error']\",\n    \"type\": \"css\"\n  },\n  \"rememberCheckbox\": {\n    \"locator\": \"[data-testid='remember-me']\",\n    \"type\": \"css\"\n  },\n  \"forgotPasswordLink\": {\n    \"locator\": \"a[href='\u002Fforgot-password']\",\n    \"type\": \"css\"\n  }\n}\n```\n\n#### dashboard.json\n\n```json\n{\n  \"welcomeMessage\": {\n    \"locator\": \"[data-testid='welcome-message']\",\n    \"type\": \"css\"\n  },\n  \"widgetContainer\": {\n    \"locator\": \"[data-testid='dashboard-widgets']\",\n    \"type\": \"css\"\n  },\n  \"userAvatar\": {\n    \"locator\": \"[data-testid='user-avatar']\",\n    \"type\": \"css\"\n  },\n  \"logoutButton\": {\n    \"locator\": \"[data-testid='logout-btn']\",\n    \"type\": \"css\"\n  },\n  \"notificationBadge\": {\n    \"locator\": \"[data-testid='notification-badge']\",\n    \"type\": \"css\"\n  }\n}\n```\n\n## Writing Tests\n\n### Basic Authentication Test\n\n```javascript\nconst assert = require('assert');\n\ndescribe('User Authentication', function () {\n  this.timeout(30000);\n  let nemo;\n\n  before(async function () {\n    nemo = this.nemo;\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Flogin`);\n  });\n\n  it('should login with valid credentials', async function () {\n    const loginView = nemo.view.login;\n\n    await loginView.usernameInput().waitVisible(nemo.data.defaultTimeout);\n    await loginView.usernameInput().clear();\n    await loginView.usernameInput().sendKeys('testuser@example.com');\n    await loginView.passwordInput().clear();\n    await loginView.passwordInput().sendKeys('SecurePass123!');\n    await loginView.submitButton().click();\n\n    \u002F\u002F Wait for dashboard to load\n    const dashView = nemo.view.dashboard;\n    await dashView.welcomeMessage().waitVisible(nemo.data.defaultTimeout);\n\n    const welcomeText = await dashView.welcomeMessage().getText();\n    assert.ok(welcomeText.includes('Welcome'), `Expected welcome text, got: ${welcomeText}`);\n  });\n\n  it('should show error for invalid credentials', async function () {\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Flogin`);\n    const loginView = nemo.view.login;\n\n    await loginView.usernameInput().waitVisible(nemo.data.defaultTimeout);\n    await loginView.usernameInput().clear();\n    await loginView.usernameInput().sendKeys('invalid@example.com');\n    await loginView.passwordInput().clear();\n    await loginView.passwordInput().sendKeys('wrongpassword');\n    await loginView.submitButton().click();\n\n    await loginView.errorMessage().waitVisible(nemo.data.defaultTimeout);\n    const errorText = await loginView.errorMessage().getText();\n    assert.ok(\n      errorText.includes('Invalid email or password'),\n      `Expected error message, got: ${errorText}`\n    );\n  });\n\n  after(async function () {\n    if (nemo && nemo.driver) {\n      await nemo.driver.quit();\n    }\n  });\n});\n```\n\n### Working with Multiple Elements\n\n```javascript\ndescribe('Product Listing', function () {\n  this.timeout(30000);\n  let nemo;\n\n  before(async function () {\n    nemo = this.nemo;\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Fproducts`);\n  });\n\n  it('should display product cards', async function () {\n    \u002F\u002F Find multiple elements using _finds\n    const productCards = await nemo.view._finds('[data-testid=\"product-card\"]');\n    assert.ok(productCards.length > 0, 'Expected at least one product card');\n\n    \u002F\u002F Verify each card has required elements\n    for (const card of productCards) {\n      const title = await card.findElement({ css: '[data-testid=\"product-title\"]' });\n      const titleText = await title.getText();\n      assert.ok(titleText.length > 0, 'Product title should not be empty');\n\n      const price = await card.findElement({ css: '[data-testid=\"product-price\"]' });\n      const priceText = await price.getText();\n      assert.ok(priceText.match(\u002F\\$[\\d.]+\u002F), `Expected price format, got: ${priceText}`);\n    }\n  });\n\n  it('should filter products by search query', async function () {\n    const searchInput = await nemo.view._find('[data-testid=\"search-input\"]');\n    await searchInput.clear();\n    await searchInput.sendKeys('laptop');\n\n    const searchBtn = await nemo.view._find('[data-testid=\"search-submit\"]');\n    await searchBtn.click();\n\n    \u002F\u002F Wait for results to update\n    await nemo.view._waitVisible('[data-testid=\"search-results\"]', nemo.data.defaultTimeout);\n\n    const results = await nemo.view._finds('[data-testid=\"product-card\"]');\n    assert.ok(results.length > 0, 'Expected search results');\n  });\n\n  after(async function () {\n    if (nemo && nemo.driver) {\n      await nemo.driver.quit();\n    }\n  });\n});\n```\n\n### Custom Wait Patterns\n\n```javascript\ndescribe('Dynamic Content', function () {\n  this.timeout(30000);\n  let nemo;\n\n  before(async function () {\n    nemo = this.nemo;\n  });\n\n  it('should wait for loading spinner to disappear', async function () {\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Fdashboard`);\n\n    \u002F\u002F Wait for spinner to appear first\n    try {\n      await nemo.view._waitVisible('[data-testid=\"loading-spinner\"]', 2000);\n    } catch (e) {\n      \u002F\u002F Spinner may already be gone on fast loads\n    }\n\n    \u002F\u002F Wait for spinner to disappear\n    const { until, By } = require('selenium-webdriver');\n    await nemo.driver.wait(\n      until.stalenessOf(\n        await nemo.driver.findElement(By.css('[data-testid=\"loading-spinner\"]')).catch(() => null)\n      ),\n      15000,\n      'Loading spinner did not disappear'\n    );\n\n    \u002F\u002F Verify content loaded\n    await nemo.view._waitVisible('[data-testid=\"dashboard-content\"]', 10000);\n  });\n\n  it('should wait for specific text in element', async function () {\n    await nemo.driver.get(`${nemo.data.baseUrl}\u002Fstatus`);\n\n    const { until } = require('selenium-webdriver');\n    const statusElement = await nemo.view._find('[data-testid=\"status-text\"]');\n\n    await nemo.driver.wait(async () => {\n      const text = await statusElement.getText();\n      return text.includes('Connected');\n    }, 15000, 'Expected status to show Connected');\n  });\n\n  after(async function () {\n    if (nemo && nemo.driver) {\n      await nemo.driver.quit();\n    }\n  });\n});\n```\n\n### Screenshot Capture\n\n```javascript\nconst fs = require('fs');\nconst path = require('path');\n\nasync function captureScreenshot(nemo, testName) {\n  const screenshot = await nemo.driver.takeScreenshot();\n  const filename = `${testName.replace(\u002F\\s+\u002Fg, '-')}-${Date.now()}.png`;\n  const filepath = path.join(__dirname, '..\u002F..\u002Fscreenshots', filename);\n  fs.writeFileSync(filepath, screenshot, 'base64');\n  return filepath;\n}\n\n\u002F\u002F Usage in tests\nafterEach(async function () {\n  if (this.currentTest.state === 'failed') {\n    const screenshotPath = await captureScreenshot(nemo, this.currentTest.title);\n    console.log(`Screenshot saved: ${screenshotPath}`);\n  }\n});\n```\n\n### Reusable Helper Functions\n\n```javascript\n\u002F\u002F test\u002Fhelpers\u002Fwait-helpers.js\n\nasync function waitForUrlContains(nemo, urlFragment, timeout = 10000) {\n  const { until } = require('selenium-webdriver');\n  await nemo.driver.wait(until.urlContains(urlFragment), timeout, `URL did not contain \"${urlFragment}\" within ${timeout}ms`);\n}\n\nasync function waitForElementCount(nemo, selector, expectedCount, timeout = 10000) {\n  const startTime = Date.now();\n  while (Date.now() - startTime \u003C timeout) {\n    const elements = await nemo.view._finds(selector);\n    if (elements.length === expectedCount) return;\n    await nemo.driver.sleep(250);\n  }\n  throw new Error(`Expected ${expectedCount} elements for \"${selector}\", timed out after ${timeout}ms`);\n}\n\nasync function clearAndType(nemo, selector, text) {\n  const element = await nemo.view._find(selector);\n  await element.clear();\n  await element.sendKeys(text);\n}\n\nmodule.exports = { waitForUrlContains, waitForElementCount, clearAndType };\n```\n\n## Best Practices\n\n1. **Define all locators in view JSON files** -- Never hardcode CSS selectors or XPath in test files. The view system centralizes locator management and simplifies maintenance.\n2. **Use `data-testid` attributes** for all selectors. Coordinate with developers to add these attributes, ensuring tests are decoupled from visual styling.\n3. **Set explicit timeouts on all waits** -- Use `nemo.data.defaultTimeout` as a baseline but allow individual waits to override for operations that need more or less time.\n4. **Implement proper teardown** -- Always call `nemo.driver.quit()` in `after` hooks to prevent orphaned browser processes from accumulating.\n5. **Use environment variables** for base URLs, browser selection, and credentials. This allows the same test suite to run across development, staging, and production.\n6. **Capture screenshots on failure** using `afterEach` hooks. Store them with descriptive filenames that include the test name and timestamp.\n7. **Keep tests atomic** -- Each `it` block should test one behavior. Long tests that verify multiple features are hard to debug and maintain.\n8. **Use Mocha's `this.timeout()`** to set appropriate timeouts per test or suite. The default 2-second timeout is usually too short for browser tests.\n9. **Create reusable helper functions** for common patterns like login, navigation, and data verification. Import them across test files to reduce duplication.\n10. **Run tests in headless mode in CI** to reduce resource usage. Configure Chrome headless flags in the Nemo configuration based on the `CI` environment variable.\n\n## Anti-Patterns\n\n1. **Using `driver.sleep()` for synchronization** -- Static waits are slow and unreliable. Use `_waitVisible()` or Selenium's `until` conditions instead.\n2. **Hardcoding selectors in test files** -- Duplicating selectors across tests means a single UI change requires updates in many files.\n3. **Not cleaning up browser instances** -- Forgetting `driver.quit()` in teardown leaves zombie Chrome processes that consume memory and crash CI.\n4. **Sharing state between tests** -- Tests that rely on side effects from previous tests break when run in isolation or in different order.\n5. **Using overly specific CSS selectors** -- Selectors like `div.app > div.main > ul > li:first-child > a` break on minor DOM changes.\n6. **Not setting Mocha timeouts** -- Default 2-second timeouts cause false failures on legitimate browser interactions that take longer.\n7. **Ignoring element staleness** -- After page navigation or AJAX updates, previously found elements may become stale. Re-query elements after state changes.\n8. **Putting test data in code** -- Hardcoded usernames, passwords, and product IDs make tests environment-dependent. Use fixtures and environment variables.\n9. **Not using the view system** -- Bypassing Nemo's view abstraction defeats the framework's key benefit of centralized locator management.\n10. **Writing monolithic test functions** -- Long `it` blocks that verify multiple behaviors are hard to debug when they fail midway through.\n\n## CLI Reference\n\n```bash\n# Run all tests with Mocha\nnpx mocha test\u002Ffunctional\u002F**\u002F*.test.js --timeout 30000 --recursive\n\n# Run specific test file\nnpx mocha test\u002Ffunctional\u002Fauth\u002Flogin.test.js --timeout 30000\n\n# Run tests matching a pattern\nnpx mocha test\u002Ffunctional\u002F**\u002F*.test.js --grep \"login\" --timeout 30000\n\n# Run with reporter\nnpx mocha test\u002Ffunctional\u002F**\u002F*.test.js --timeout 30000 --reporter spec\n\n# Run in watch mode\nnpx mocha test\u002Ffunctional\u002F**\u002F*.test.js --timeout 30000 --watch\n```\n\n## Setup\n\n```bash\n# Install Nemo and dependencies\nnpm install --save-dev nemo nemo-view\n\n# Install Selenium WebDriver\nnpm install --save-dev selenium-webdriver\n\n# Install Chrome driver\nnpm install --save-dev chromedriver\n\n# Install Mocha\nnpm install --save-dev mocha\n\n# Install assertion library\nnpm install --save-dev chai\n```\n",{"name":5,"tags":24,"agents":33,"author":44,"domains":45,"license":15,"version":47,"languages":48,"frameworks":50,"description":7,"testingTypes":51},[25,26,27,28,29,30,31,32],"nemojs","nemo","paypal","selenium","node","browser-testing","automation","mocha",[34,35,36,37,38,39,40,41,42,43],"claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","thetestingacademy",[46],"web","1.0.0",[49],"javascript",[25],[52,53],"e2e","integration","main","eac438ea9216a7cb8a570cab803eb01eeafc6793","skills\u002Fqa\u002Fnemojs-testing","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m","https:\u002F\u002Fid-preview--d5bef06d-6c9e-4563-a3d4-a855b9d61610.lovable.app\u002F","Eu sou Antonio B. B. Ndombe \r\nEu sou um Pesquisador e desenvolvedor de sistema autonomia cognitivos, fundador de sistemas ODCs ( organismos digital conscientes)","2026-11-04 06:53:39",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Nemo.js Testing\"",{"tool":68,"command":69},"bunx","bunx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Nemo.js Testing\"",{"tool":71,"command":72},"pnpm","pnpm dlx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Nemo.js Testing\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fnemojs-testing\u002FSKILL.md",true,[],[77,85,92,99,106,113],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7DASC6FSCJP49JZBSK0NY1Z","nemoclaw-user-reference","Describes the NemoClaw integration layer and blueprint architecture and how they orchestrate compatible agent sandboxes. Use when looking up architecture, agent integration, plugin structure, or blueprint design. Trigger keywords - nemoclaw architecture, nemoclaw agent architecture, nemoclaw plugin blueprint structure, nemoclaw vs openshell, which cli, nemoclaw cli, openshell cli, sandbox commands, nemoclaw cli commands, nemoclaw command reference, nemoclaw network policy, sandbox egress control operator approval, nemoclaw troubleshooting, nemoclaw debug sandbox issues.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-reference\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7DAS5S79VK33XFGVAM2TFWF","nemoclaw-user-overview","Explains how OpenClaw, OpenShell, and NemoClaw form the ecosystem, NemoClaw's position in the stack, what NemoClaw adds beyond the community sandbox, and when to prefer NemoClaw versus integrating OpenShell and OpenClaw directly. Use when users ask about the relationship between OpenClaw, OpenShell, and NemoClaw, or when to use NemoClaw versus OpenShell. Trigger keywords - nemoclaw ecosystem, openclaw openshell, nemoclaw vs openshell, sandboxed openclaw, how nemoclaw works, nemoclaw sandbox lifecycle blueprint, nemoclaw overview, openclaw always-on assistants, nvidia openshell, nvidia nemotron, nemoclaw release notes, nemoclaw changelog.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-overview\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7DAS0PQEMET5MNGZ1ABSZVS","nemoclaw-user-monitor-sandbox","Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-monitor-sandbox\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7DARQYGF7E9A69VH6S3CGN9","nemoclaw-user-manage-sandboxes","Explains operational tasks after the quickstart: listing sandboxes, status and health checks, logs, diagnostics, port forwards, multiple sandboxes, credential reset, rebuilds, network presets, upgrades, and uninstall. Trigger keywords - manage nemoclaw sandboxes, nemoclaw status, nemoclaw list, nemoclaw dashboard port, nemoclaw rebuild, nemoclaw upgrade sandboxes, nemoclaw uninstall, sandbox mutability, sandbox runtime configuration, sandbox rebuild, nemoclaw backup, nemoclaw restore, workspace backup, openshell sandbox download upload, nemoclaw messaging channels, nemoclaw telegram, nemoclaw discord, nemoclaw slack, nemoclaw wechat, nemoclaw whatsapp, openshell channel messaging, nemoclaw workspace files, soul.md, user.md, identity.md, agents.md, sandbox persistence.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-sandboxes\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7DARH8BRTG51TRCAB7YWDJ4","nemoclaw-user-manage-policy","Adds, removes, or modifies allowed endpoints in the sandbox policy. Use when customizing network policy, changing egress rules, or configuring sandbox endpoint access. Trigger keywords - customize nemoclaw network policy, sandbox egress policy configuration, nemoclaw integration policy examples, post-install policy setup, openshell approval workflow, policy preset, nemoclaw approve network requests, sandbox egress approval tui.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-policy\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7DARAT62M2VR37590VCZ5NS","nemoclaw-user-get-started","Installs NemoClaw, launches a sandbox, and runs the first agent prompt. Use when onboarding, installing, or launching a NemoClaw sandbox for the first time. Trigger keywords - nemoclaw quickstart, install nemoclaw openclaw sandbox, nemohermes quickstart, hermes agent nemoclaw, run hermes openshell sandbox, nemoclaw prerequisites, nemoclaw supported platforms, nemoclaw hardware software, nemoclaw windows wsl2 setup, nemoclaw install windows docker desktop.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-get-started\u002FSKILL.md",[],[]]