npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cypress-ncatestify-plugin

v2.1.73

Published

NCA TESTIFY commands and tests

Readme

Cypress.IO Plugin by NCA TESTIFY

Ready-to-use tests for any website. No testing experience required.

What is this?

This plugin gives you pre-built tests that check if your website works correctly:

  • Are all links working?
  • Do all images load?
  • Is the site accessible?
  • Is the SEO structure correct?

You don't need to write complex test code - just call our simple commands.

Quick Start (5 minutes)

1. Install the plugin

npm install cypress-ncatestify-plugin --save-dev

2. Import in your Cypress support file

Add this line to cypress/support/e2e.ts (or .js):

import 'cypress-ncatestify-plugin'

3. Set your website URL

In cypress.config.ts:

import { defineConfig } from 'cypress'

export default defineConfig({
  e2e: {
    baseUrl: 'https://your-website.com'
  }
})

4. Create your first test

Create cypress/e2e/my-first-test.cy.ts:

describe('My Website Tests', () => {
  beforeEach(() => {
    cy.visit('/')
  })

  it('all links work', () => {
    cy.ttEveryInternalLinkStatusOk()
  })

  it('all images load', () => {
    cy.ttValidateAllImagesResponseStatusOk()
  })

  it('site is accessible', () => {
    cy.ttAccessibility()
  })
})

5. Run your tests

npx cypress open

That's it! You now have professional website tests.


Semantic Element Logging

The Problem

Cypress logs show CSS selectors which are hard to understand:

cy.get('#ext-comp-1234')   // What element is this?
cy.get('.btn-primary')     // Which button?

The Solution: cy.ttEl

Use cy.ttEl(selector, name) for readable logs:

cy.ttEl('#ext-comp-1234', 'usernameInput')  // Logs: usernameInput
cy.ttEl('.btn-primary', 'submitButton')     // Logs: submitButton

Now your test logs show meaningful names instead of selectors.


Page Object Model with BasePage

For larger projects, use the Page Object Model pattern with BasePage.

The getter name automatically becomes the log name:

// cypress/pages/LoginPage.ts
import { BasePage } from 'cypress-ncatestify-plugin'

export class LoginPage extends BasePage {
  get usernameInput() {
    return this.el('#username')  // Logs: usernameInput
  }

  get passwordInput() {
    return this.el('#password')  // Logs: passwordInput
  }

  get submitButton() {
    return this.el('button[type="submit"]')  // Logs: submitButton
  }

  login(user: string, pass: string) {
    this.usernameInput.type(user)
    this.passwordInput.type(pass)
    this.submitButton.click()
  }
}

Use in tests:

import { LoginPage } from '../pages/LoginPage'

const loginPage = new LoginPage()

describe('Login', () => {
  it('logs in successfully', () => {
    cy.visit('/login')
    loginPage.login('admin', 'secret')
  })
})

All Commands Reference

Element Selection

// Select element with semantic logging
cy.ttEl('#username', 'usernameInput')  // Logs: usernameInput
cy.ttEl('h1')                          // Logs: h1

Link Validation

// Check all internal links return 200 status
cy.ttEveryInternalLinkStatusOk()

// Visit each internal link to verify it loads
cy.ttEveryInternalLinkIsLoading()      // Default: 10 links
cy.ttEveryInternalLinkIsLoading(20)    // Check 20 links

// Get all internal links as array
cy.ttGetInternalLinks()
cy.ttGetInternalLinks('.content')      // From specific container

Image Validation

// Check all images load successfully
cy.ttValidateAllImagesResponseStatusOk()

Accessibility

// Run accessibility tests (uses axe-core)
cy.ttAccessibility()
cy.ttAccessibility('.main-content')    // Test specific area

SEO Checks

// Verify only one H1 tag exists
cy.ttOnlyOneH1()

// Check language tag
cy.ttValidateLanguageTag('de')         // German
cy.ttValidateLanguageTag('en')         // English

// Check imprint/legal link exists
cy.ttValidateImprintClickable()

Security

// Find any non-HTTPS links
cy.ttDetectHttp()

// Check no Google services loaded
cy.ttValidateNoGoogleServices()

Error Handling

// Verify 404 pages work correctly
cy.ttInvalidPath404()

// Monitor console errors
cy.ttSetupConsoleErrorListener()

Cookie Management

// Accept cookies (supports various providers)
cy.ttCookieAllAcceptClick()

Performance

// Check page size threshold (MB)
cy.ttThreshold()       // Default threshold
cy.ttThreshold(2)      // 2MB limit

// Verify page loaded completely
cy.ttPageLoaded()

Utility Commands

// Click element only if it exists
cy.ttClickIfElementExist('.cookie-banner')

// Check if element exists (returns boolean)
cy.ttElementExists('.modal').then(exists => {
  if (exists) {
    // do something
  }
})

Run All Tests

// Execute complete test suite
cy.ttRunTestifyBaseTests()

HTTP Basic Authentication

For password-protected staging sites:

// cypress.config.ts
export default defineConfig({
  e2e: {
    baseUrl: 'https://user:[email protected]'
  }
})

Or via environment variable:

export CYPRESS_BASE_URL=https://user:[email protected]
npx cypress run

Common Issues

"baseUrl must be set"

Add baseUrl to your cypress.config.ts:

export default defineConfig({
  e2e: {
    baseUrl: 'https://your-site.com'
  }
})

Tests timing out

Increase the timeout in your config:

export default defineConfig({
  e2e: {
    baseUrl: 'https://your-site.com',
    defaultCommandTimeout: 10000  // 10 seconds
  }
})

Links failing that should pass

Some links like mailto:, tel:, javascript: are automatically skipped. External links are also filtered out.


Development

Run tests

npm test              # Unit tests
npm run cy:run        # Cypress tests
npm run typecheck     # Type checking
npm run lint          # ESLint

Build

npm run build

Local test server

cd eleventy-page && npx @11ty/eleventy --serve
# Open http://localhost:8080

Compatibility

  • Cypress 14.x / 15.x
  • TypeScript 5.x
  • Node.js 18+

Sites using this plugin

  • https://www.auto-hortz.de
  • https://www.discounto.de
  • https://nevercodealone.de

Made with care by NCA TESTIFY