Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@welldone-software/babel-plugin-react-add-test-id
Advanced tools
const Foo = () =>
<Bar>
<div>
</Bar>
const Foo = () =>
<Bar data-test-id="Foo-Bar">
<div data-test-id="Foo-Bar-div">
</Bar>
const Wrapper = styled.div`...`
const Bar = styled.div`...`
const Foo = () =>
<Wrapper>
<Bar>
</Wrapper>
const Wrapper = styled.div`...`
const Bar = styled.div`...`
const Foo = () =>
<Wrapper data-test-id="Foo-Wrapper">
<Bar data-test-id="Foo-Wrapper-Bar">
</Wrapper>
yarn add @welldone-software/babel-plugin-react-add-test-id
or
npm install @welldone-software/babel-plugin-react-add-test-id
in .babelrc
"plugins": [
"@welldone-software/babel-plugin-add-test-id",
...
Property | Type | Default | Description |
---|---|---|---|
attrName | String | data-test-id | Define the attribute name |
mode | String | regular | One of minimal , regular , full |
ignoreElements | Array of Strings | [div , input , a , button , span , p , br , hr , ul , ol , li , img , form , h1 , h2 , h3 , h4 , h5 , h6 , svg , path , g ] | Avoid adding test id on those elements |
additionalIgnoreElements | Array of Strings | [] | Add extra ignoreElements |
delimiter | String | - | Separate components name with the delimiter |
in .babelrc
"plugins": [
["@welldone-software/babel-plugin-add-test-id", {"attrName": "data-test-id-example"}],
FAQs
Add attribute on react elements
The npm package @welldone-software/babel-plugin-react-add-test-id receives a total of 2,016 weekly downloads. As such, @welldone-software/babel-plugin-react-add-test-id popularity was classified as popular.
We found that @welldone-software/babel-plugin-react-add-test-id demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.