From a5a6568da98b24660a5c022b32c0f9e460d92c8c Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Wed, 18 Sep 2019 13:14:32 -0600 Subject: [PATCH 1/7] add data-test-subj support around non-custom actions --- src-docs/src/views/tables/actions/actions.js | 5 +++++ .../__snapshots__/collapsed_item_actions.test.js.snap | 1 + src/components/basic_table/collapsed_item_actions.js | 2 ++ src/components/basic_table/default_item_action.js | 2 ++ 4 files changed, 10 insertions(+) diff --git a/src-docs/src/views/tables/actions/actions.js b/src-docs/src/views/tables/actions/actions.js index 55552bf2845..c3d9340e912 100644 --- a/src-docs/src/views/tables/actions/actions.js +++ b/src-docs/src/views/tables/actions/actions.js @@ -163,6 +163,7 @@ export class Table extends Component { description: 'Clone this user', icon: 'copy', onClick: this.cloneUser, + 'data-test-subj': 'action-clone', }, { name: 'Delete', @@ -172,6 +173,7 @@ export class Table extends Component { type: 'icon', onClick: this.deleteUser, isPrimary: true, + 'data-test-subj': 'action-delete', }, { name: 'Edit', @@ -180,6 +182,7 @@ export class Table extends Component { icon: 'pencil', type: 'icon', onClick: () => {}, + 'data-test-subj': 'action-edit', }, { name: 'Share', @@ -188,6 +191,7 @@ export class Table extends Component { icon: 'share', type: 'icon', onClick: () => {}, + 'data-test-subj': 'action-share', }, ]; } else { @@ -212,6 +216,7 @@ export class Table extends Component { type: 'icon', href: 'https://elastic.co', target: '_blank', + 'data-test-subj': 'action-outboundlink', }, ]; } diff --git a/src/components/basic_table/__snapshots__/collapsed_item_actions.test.js.snap b/src/components/basic_table/__snapshots__/collapsed_item_actions.test.js.snap index cba30915d37..b612b541827 100644 --- a/src/components/basic_table/__snapshots__/collapsed_item_actions.test.js.snap +++ b/src/components/basic_table/__snapshots__/collapsed_item_actions.test.js.snap @@ -14,6 +14,7 @@ exports[`CollapsedItemActions render 1`] = `