
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
add-test-ids
Advanced tools
add-test-ids is a command-line tool that adds unique test IDs to your React components on one click. It's designed to work with MUI components.
You can install add-test-ids globally with npm:
npm install -g add-test-ids
After installing you run simply the following command in you project root directory.
npx add-test-ids
This will ask you for two questions:
Please enter a directory path: src
Please enter file extensions, separated by commas: .tsx, .jsx
import React from 'react';
const ExampleComponent = () => {
return (
<Box data-testId="ypq-12h">Example Component</Box>
)
}
export default Component;
This package will add data-testId in the following MUI components:
const muiElements = [
'AppBar',
'Avatar',
'Backdrop',
'Badge',
'BottomNavigation',
'BottomNavigationAction',
'Box',
'Button',
'ButtonBase',
'ButtonGroup',
'Card',
'CardActionArea',
'CardActions',
'CardContent',
'CardHeader',
'CardMedia',
'Checkbox',
'Chip',
'CircularProgress',
'ClickAwayListener',
'Collapse',
'Container',
'CssBaseline',
'Dialog',
'DialogActions',
'DialogContent',
'DialogContentText',
'DialogTitle',
'Divider',
'Drawer',
'ExpansionPanel',
'ExpansionPanelActions',
'ExpansionPanelDetails',
'ExpansionPanelSummary',
'Fab',
'Fade',
'FilledInput',
'FormControl',
'FormControlLabel',
'FormGroup',
'FormHelperText',
'FormLabel',
'Grid',
'GridList',
'GridListTile',
'GridListTileBar',
'Hidden',
'Icon',
'IconButton',
'Input',
'InputLabel',
'LinearProgress',
'Link',
'List',
'ListItem',
'ListItemAvatar',
'ListItemIcon',
'ListItemSecondaryAction',
'ListItemText',
'ListSubheader',
'Menu',
'MenuItem',
'MenuList',
'MobileStepper',
'Modal',
'NativeSelect',
'OutlinedInput',
'Pagination',
'PaginationItem',
'Paper',
'Popover',
'Popper',
'Portal',
'Radio',
'RadioGroup',
'RootRef',
'Select',
'Slide',
'Slider',
'Snackbar',
'SnackbarContent',
'Step',
'StepButton',
'StepConnector',
'StepContent',
'StepIcon',
'StepLabel',
'Stepper',
'SvgIcon',
'SwipeableDrawer',
'Switch',
'Tab',
'Table',
'TableBody',
'TableCell',
'TableContainer',
'TableFooter',
'TableHead',
'TablePagination',
'TableRow',
'TableSortLabel',
'Tabs',
'TextField',
'TextareaAutosize',
'Toolbar',
'Tooltip',
'Typography',
];
Contributions are welcomed, you can contribute in this github repo: Repo Link
FAQs
Add test ids to your react components
The npm package add-test-ids receives a total of 11 weekly downloads. As such, add-test-ids popularity was classified as not popular.
We found that add-test-ids demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.