Skip to content

Commit

Permalink
test: use data-test for testIdAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud committed Feb 23, 2021
1 parent 974f447 commit b6feb95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion superset-frontend/spec/helpers/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ import './shim';
import { configure as configureTestingLibrary } from '@testing-library/react';

configureTestingLibrary({
testIdAttribute: 'data-test-id',
testIdAttribute: 'data-test',
});
8 changes: 2 additions & 6 deletions superset-frontend/src/components/ModalTrigger/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default class ModalTrigger extends React.Component {
<>
<Button
className="modal-trigger"
data-test-id="btn-modal-trigger"
data-test="btn-modal-trigger"
tooltip={this.props.tooltip}
onClick={this.open}
>
Expand All @@ -104,11 +104,7 @@ export default class ModalTrigger extends React.Component {
/* eslint-disable jsx-a11y/interactive-supports-focus */
return (
<>
<span
data-test-id="span-modal-trigger"
onClick={this.open}
role="button"
>
<span data-test="span-modal-trigger" onClick={this.open} role="button">
{this.props.triggerNode}
</span>
{this.renderModal()}
Expand Down

0 comments on commit b6feb95

Please sign in to comment.