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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cypress-ncatestify-plugin

v2.1.52

Published

NCA TESTIFY commands and tests

Downloads

1,049

Readme

Cypress.IO plugin by NCA TESTIFY

Basis tests for every website testing project.

Usage:

Add following line in your cypress/support/e2e.js|.ts file

import 'cypress-ncatestify-plugin'

in your cypress.config.js|.ts file the key baseUrl must be set

module.exports = defineConfig({
  e2e: {
    baseUrl: 'https://testify.team/de',
    setupNodeEvents(on, config) {
      // implement node event listeners here
    }
  }
})

Then in your Testfile

describe('Validate Testify Tests', () => {
  it('Runs Testify base tests', () => {
    cy.visit('/')
    cy.ttRunTestifyBaseTests()
  })
})

Run commands

npm run typecheck
npm run build
npx cypress open --config-file config.cypress.ts/js
export CYPRESS_BASE_URL=https://nevercodealone.de && npx cypress open --config-file config.cypress.ts/js

Run s specific file

export CYPRESS_BASE_URL=https://nevercodealone.de && npx cypress run --config-file cypress.config.ts --spec "cypress/e2e/validate.cy.ts"

Static file CMS

cd eleventy-page && npx eleventy --serve

Build

npx eleventy

Browser

http://localhost:8080

For contributing remove local .js files

rm -rf **/*.js

Validate types with no generating

npm run typecheck

Build js files

npm run build

Docker command for local host on port 8090

docker run -p 8090:80 -v $(pwd)/src:/app --entrypoint python3 python:3.9-alpine -m http.server --directory /app 80

Testing and Code Quality

Running Tests

To run the test suite, execute the following command:

npx jest --config jest.config.ts

This will run all Jest tests located in the __tests__ directory.

Type Checking

To perform TypeScript type checking, run:

npm run typecheck

This ensures that the code adheres to the TypeScript configurations and catches potential type errors.

Code Formatting

To auto-format the codebase, run:

npm run prettier

This will format the code according to the rules specified in the .prettierrc file.

CI/CD Pipeline

All of these checks are automatically run in our GitHub Actions CI/CD pipeline on every push and pull request to the main branch. This ensures that all merged code is properly tested, type-checked, and formatted.

Commands

Click accept all cookies

cy.ttCookieAllAcceptClick()
cy.ttEveryInternalLinkStatusOk()

Validate all images return status code 200

cy.ttValidateAllImagesResponseStatusOk()

Validate all internal links are loading

cy.ttEveryInternalLinkIsLoading()

Return all internal links as array

cy.ttGetInternalLinks()

Validate imprint is clickable

cy.ttValidateImprintClickable()

Validate no google services are being loaded

cy.ttValidateNoGoogleServices()

Run all TESTIFY base tests

cy.ttRunTestifyBaseTests()

Check for accesibility issues

cy.ttAccessibility()

Run all TESTIFY page content validation tests

cy.ttValidatePageContent()

Validate page has only one headline

cy.ttOnlyOneH1()

Validate invalid path returns 404 error

cy.ttInvalidPath404()

Validate page has language tag

cy.ttValidateLanguageTag(language: string)

Detect http links

cy.ttDetectHttp()

Detect console errors

cy.ttNoConsoleErrors()

Validate subpages and images

cy.ttValidateSubpagesAndImages()

Click if element element exits

cy.ttClickIfElementExist()

Open http://localhost:8090

Websites being tested with this plugin

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