2.1.38 • Published 1 month ago

cypress-ncatestify-plugin v2.1.38

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

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

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()

Open http://localhost:8090

Websites being tested with this plugin

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

2.1.38

1 month ago

2.1.37

2 months ago

2.1.36

2 months ago

2.1.34

2 months ago

2.1.35

2 months ago

2.1.32

2 months ago

2.1.33

2 months ago

2.1.30

3 months ago

2.1.31

3 months ago

2.1.29

3 months ago

2.1.28

3 months ago

2.1.27

4 months ago

2.1.25

4 months ago

2.1.26

4 months ago

2.1.24

4 months ago

2.1.18

4 months ago

2.1.19

4 months ago

2.1.21

4 months ago

2.1.20

4 months ago

2.1.17

4 months ago

2.1.15

4 months ago

2.1.14

5 months ago

2.1.13

5 months ago

2.1.10

5 months ago

2.1.11

5 months ago

2.1.9

5 months ago

2.0.28

8 months ago

2.0.29

8 months ago

2.0.37

8 months ago

2.0.38

8 months ago

2.0.35

8 months ago

2.0.34

8 months ago

2.0.30

8 months ago

2.0.39

7 months ago

2.1.2

7 months ago

2.1.1

7 months ago

2.1.4

7 months ago

2.1.3

7 months ago

2.1.6

7 months ago

2.1.5

7 months ago

2.1.8

6 months ago

2.1.7

6 months ago

2.1.0

7 months ago

2.0.26

10 months ago

2.0.23

1 year ago

2.0.22

1 year ago

2.0.20

1 year ago

2.0.21

1 year ago

2.0.15

1 year ago

2.0.16

1 year ago

2.0.19

1 year ago

2.0.17

1 year ago

2.0.18

1 year ago

2.0.13

1 year ago

2.0.14

1 year ago

2.0.11

1 year ago

2.0.12

1 year ago

2.0.10

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago