Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Tags: cypress-io/cypress-skip-test

Tags

v2.6.1

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: include definitions for the module exports in index.d.ts (#143)

v2.6.0

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: add environment checks to skipOn (#99) (#132)

Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Co-authored-by: Rafael Anachoreta <rafael.anachoreta@gmail.com>

v2.5.1

fix: support Cypress v5

v2.5.0

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: add skipOn and onlyOn with headed or headless mode (#39)

* add skipOn headed or headless

* add onlyOn and tests

v2.4.1

fix: normalize browser name comparison

v2.4.0

feat: use new Cypress.isBrowser method if available

v2.3.0

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: add environment variable support (#12)

```js
// run tests with 
// CYPRESS_ENVIRONMENT=staging npx cypress run
import {onlyOn} from '@cypress/skip-test'
const stubServer = () => {
  cy.server()
  cy.route('/api/me', 'fx:me.json')
  cy.route('/api/permissions', 'fx:permissions.json')
  // Lots of fixtures ...
}
it('works', () => {
  onlyOn('staging', stubServer)
  ...
})
```

* chore: add prettier

* add .vscode settings

* feat: add ENVIRONMENT support

v2.2.0

feat: add `isOn` function

You can check the condition against a browser name or an environment
yourself.

```js
import {isOn} from '@cypress/skip-test'
it('loads users', () => {
  // when running on Windows locally, the backend is not running
  // thus we need to stub XHR requests
  if (isOn('windows') && isOn('localhost')) {
    cy.server()
    cy.route('/users', 'fixture:users')
  }
  cy.visit('/')
  cy.get('.user').should('have.length', 10)
})
```

v2.1.0

chore: add link to filtering PR, close #7

v2.0.0

feat: split functions from support file

BREAKING CHANGE: if you want to use custom commands, you need
to explicitly require the support file like this.

```js
require('@cypress/skip-test/support')
```

This way you can import individual functions without adding them
as custom commands.