Skip to content

[EuiSwitch] Can't add data test subject #3660

Closed

Description

@bhavyarm

While adding a11y tests to saved object table - I found out that I cannot add data test subject to the the switch for "include related objects"

This is the code for switch in kibana/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx :

<EuiSwitch
              name="includeReferencesDeep"
              **data-test-subj="includeRelated"** doesn't work
              label={
                <FormattedMessage
                  id="savedObjectsManagement.objectsTable.exportObjectsConfirmModal.includeReferencesDeepLabel"
                  defaultMessage="Include related objects"
                />
              }
              checked={isIncludeReferencesDeepChecked}
              onChange={this.changeIncludeReferencesDeep}
            />

Thanks @myasonik @dmlemeshko

Activity

  1. cchaos commented on Jun 26, 2020

    @cchaos
    Contributor

    I think the simplest plan here is to allow EuiCheckbox, EuiRadio, and EuiSwitch to all have a prop called labelProps, extending the props of EuiFormLabel and spreading them on the component.

  2. shrey commented on Jun 27, 2020

    @shrey
    Contributor

    I'd like to work on this one

  3. snide commented on Jun 27, 2020

    @snide
    Contributor

    @shrey go for it

  4. changed the title [-]Can't add data test subject to include related objects switch on saved objects table[/-] [+][EuiSwitch] Can't add data test subject[/+] on Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions