Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lint): replace non-existent qe-id with data-qe-id #543

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/autocomplete/autocomplete-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const AutocompleteField = ReactForm.FormField((props: AutocompleteProps &
renderInput={(inputProps) => (
<input
{...inputProps}
qe-id={props.qeid}
data-qe-id={props.qeid}
onFocus={(e) => {
if (inputProps.onFocus) {
inputProps.onFocus(e);
Expand Down
2 changes: 1 addition & 1 deletion src/components/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class DropDownMenu extends React.PureComponent<DropDownMenuProps> {
return (
<DropDown anchor={this.props.anchor} isMenu={true} ref={(dropdown: any) => this.dropdown = dropdown} qeId={this.props.qeId}>
<ul>
{this.props.items.map((item, i) => <li qe-id={this.props.qeId + `-` + item.title}
{this.props.items.map((item, i) => <li data-qe-id={this.props.qeId + `-` + item.title}
onClick={(event) => this.onItemClick(item, event)} key={i}>
{item.iconClassName && <i className={item.iconClassName}/>} {item.title}
</li>)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/dropdown/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {

return (
<div className='argo-dropdown' ref={(el) => this.el = el}>
<div qe-id={this.props.qeId} className='argo-dropdown__anchor' onClick={(event) => { this.open(); event.stopPropagation(); }}>
<div data-qe-id={this.props.qeId} className='argo-dropdown__anchor' onClick={(event) => { this.open(); event.stopPropagation(); }}>
<this.props.anchor/>
</div>
{ReactDOM.createPortal((
Expand Down
4 changes: 2 additions & 2 deletions src/components/popup/popup-manager.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ describe('PopupManager', () => {

describe('confirm', () => {
it.each([
['OK', true, '[qe-id="argo-popup-ok-button"]'],
['Cancel', false, '[qe-id="argo-popup-cancel-button"]'],
['OK', true, '[data-qe-id="argo-popup-ok-button"]'],
['Cancel', false, '[data-qe-id="argo-popup-cancel-button"]'],
])('%s', async (_, promiseResult, btnSelector) => {
const fn = jest.fn<void, [null | PopupProps]>();
const manager = new PopupManager();
Expand Down
8 changes: 4 additions & 4 deletions src/components/popup/popup-manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export class PopupManager implements PopupApi {
content,
footer: (
<div>
<button qe-id='argo-popup-ok-button' className='argo-button argo-button--base' onClick={() => closeAndResolve(true)}>OK</button> <button
qe-id='argo-popup-cancel-button' className='argo-button argo-button--base-o' onClick={() => closeAndResolve(false)}>Cancel</button>
<button data-qe-id='argo-popup-ok-button' className='argo-button argo-button--base' onClick={() => closeAndResolve(true)}>OK</button>
<button data-qe-id='argo-popup-cancel-button' className='argo-button argo-button--base-o' onClick={() => closeAndResolve(false)}>Cancel</button>
</div>
),
});
Expand Down Expand Up @@ -98,8 +98,8 @@ export class PopupManager implements PopupApi {
),
footer: (
<div>
<button qe-id='prompt-popup-ok-button' className='argo-button argo-button--base' onClick={(e) => formApi.submitForm(e)}>OK</button> <button
qe-id='prompt-popup-cancel-button' className='argo-button argo-button--base-o' onClick={() => closeAndResolve(null)}>Cancel</button>
<button data-qe-id='prompt-popup-ok-button' className='argo-button argo-button--base' onClick={(e) => formApi.submitForm(e)}>OK</button>
<button data-qe-id='prompt-popup-cancel-button' className='argo-button argo-button--base-o' onClick={() => closeAndResolve(null)}>Cancel</button>
</div>
),
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/top-bar/top-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const renderBreadcrumbs = (breadcrumbs: { title: string | React.ReactNode, path?
const renderActionMenu = (actionMenu: ActionMenu) => (
<div>
{actionMenu.items.map((item, i) => (
<button disabled={!!item.disabled} qe-id={item.qeId} className='argo-button argo-button--base' onClick={() => item.action()} style={{marginRight: 2}} key={i}>
<button disabled={!!item.disabled} data-qe-id={item.qeId} className='argo-button argo-button--base' onClick={() => item.action()} style={{marginRight: 2}} key={i}>
{item.iconClassName && (<i className={item.iconClassName} style={{marginLeft: '-5px', marginRight: '5px'}}/>)}
{item.title}
</button>
Expand Down