All Projects → kutyel → babel-plugin-remove-test-ids

kutyel / babel-plugin-remove-test-ids

Licence: MIT License
🐠 Babel plugin to strip `data-test-id` HTML attributes

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to babel-plugin-remove-test-ids

Cypress
Fast, easy and reliable testing for anything that runs in a browser.
Stars: ✭ 35,145 (+87762.5%)
Mutual labels:  e2e-tests, cypress, e2e-testing
cypress-page-object
Represent the screens of your website as a series of objects in your Cypress test suite
Stars: ✭ 23 (-42.5%)
Mutual labels:  e2e-tests, e2e, cypress
odoo-cypress
Odoo Framework E2E Testing using Cypress
Stars: ✭ 19 (-52.5%)
Mutual labels:  e2e, cypress, e2e-testing
Seleniumbase
A Python framework that inspires developers to become better test automation engineers. 🧠💡
Stars: ✭ 2,520 (+6200%)
Mutual labels:  selenium, e2e-tests, e2e-testing
Recorder
A browser extension that generates Cypress, Playwright and Puppeteer test scripts from your interactions 🖱 ⌨
Stars: ✭ 277 (+592.5%)
Mutual labels:  e2e, cypress
cypress-upload-file-post-form
Solution for two Cypress testing use-cases I came across with: perform a direct http FORM request to the server containing a file and other parameters and upload a file into a form before submission
Stars: ✭ 59 (+47.5%)
Mutual labels:  cypress, e2e-testing
ionic-workflow-guide
Create a full and powerful worflow with Ionic (Unit Testing, Environment variables, Automatic documentation, Production App Server, Automatic deployment)
Stars: ✭ 46 (+15%)
Mutual labels:  e2e-tests, e2e
babel-plugin-transform-html-import-to-string
Turn HTML imports (and export from) into constant strings
Stars: ✭ 22 (-45%)
Mutual labels:  babel, babel-plugin
cypress-maildev
Cypress Maildev is a bunch of Cypress commands in order to test your messages (SMS and Emails) by using Maildev REST API.
Stars: ✭ 19 (-52.5%)
Mutual labels:  e2e, cypress
cypress-browser-permissions
A Cypress plugin to set launched browser preferences including permissions like Geolocation, Notifications, Microphone, etc.
Stars: ✭ 40 (+0%)
Mutual labels:  e2e, cypress
nightwatch-boilerplate
boilerplate for nightwatch.js with selenium
Stars: ✭ 16 (-60%)
Mutual labels:  selenium, e2e-tests
quasar-testing
Testing Harness App Extensions for the Quasar Framework 1.0+
Stars: ✭ 142 (+255%)
Mutual labels:  cypress, e2e-testing
core-web
like core-js but for Web APIs (based on polyfill.io)
Stars: ✭ 34 (-15%)
Mutual labels:  babel, babel-plugin
software-testing-resource-pack
Various files useful for manual testing and test automation etc.
Stars: ✭ 38 (-5%)
Mutual labels:  e2e-tests, e2e-testing
expo-detox-typescript-example
Sample Expo app with e2e tests using detox, jest and typescript
Stars: ✭ 81 (+102.5%)
Mutual labels:  e2e-tests, e2e
babel-plugin-source-map-support
A Babel plugin which automatically makes stack traces source-map aware
Stars: ✭ 41 (+2.5%)
Mutual labels:  babel, babel-plugin
curso-javascript-testes
Código-fonte do curso "Aprenda a testar Aplicações Javascript"
Stars: ✭ 60 (+50%)
Mutual labels:  e2e-tests, e2e
cypress-plugin-stripe-elements
A small Cypress plugin that assists you in filling in Stripe Elements inputs
Stars: ✭ 22 (-45%)
Mutual labels:  cypress, e2e-testing
testcafe-snippets
Code snippets for TestCafe
Stars: ✭ 54 (+35%)
Mutual labels:  e2e-tests, e2e-testing
jest-retry
Jest retry pattern for flaky E2E tests
Stars: ✭ 36 (-10%)
Mutual labels:  e2e-tests, e2e

babel-plugin-remove-test-ids

Standard - JavaScript Style Guide

NPM version Build Status Coverage Status Dependency status Dev Dependencies Status NPM Status Donate

Babel plugin to remove data-test-id attributes from the JSX

Install

$ npm install babel-plugin-remove-test-ids --save

Usage

.babelrc

{
  "plugins": [
    "remove-test-ids"
  ]
}

... you can also configure it with your attributes!

{
  "plugins": [
    [
      "remove-test-ids",
      {
        "attributes": ["data-test", "data-custom-test-attr"]
      }
    ]
  ]
}

Motivation

In React Alicante 2017, Forbes Lindsay gave a talk about "End to End testing React applications" with cabbie and explained the pattern of adding data-test-id props to your components as a good practice for improving testability.

video

He also mentioned that it would be "fairly easy to do a Babel plugin" to strip those attributes from the actual DOM, if you care enough. :)

Also, other testing tools like Selenium uses a similar approach and could benefit from this plugin as well!

License

MIT © Flavio Corpa.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].