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

[TIP] Replace indicator field-selector EuiSelect by EuiComboBox #140980

Merged
merged 3 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 6 additions & 6 deletions x-pack/plugins/threat_intelligence/cypress/e2e/indicators.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import {
ENDING_BREADCRUMB,
FIELD_BROWSER,
FIELD_BROWSER_MODAL,
FIELD_SELECTOR_TOGGLE_BUTTON,
FIELD_SELECTOR_INPUT,
FIELD_SELECTOR_LIST,
} from '../screens/indicators';
import { login } from '../tasks/login';
import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver';
Expand Down Expand Up @@ -143,16 +146,13 @@ describe('Indicators', () => {

it('should have the default selected field, then update when user selects', () => {
const threatFeedName = 'threat.feed.name';
cy.get(`${FIELD_SELECTOR}`).should('have.value', threatFeedName);
cy.get(`${FIELD_SELECTOR_INPUT}`).eq(0).should('have.text', threatFeedName);

const threatIndicatorIp: string = 'threat.indicator.ip';

cy.get(`${FIELD_SELECTOR}`)
.should('exist')
.select(threatIndicatorIp)
.should('have.value', threatIndicatorIp);
cy.get(`${FIELD_SELECTOR_TOGGLE_BUTTON}`).should('exist').click();

cy.get(`${FIELD_SELECTOR}`).should('have.value', threatIndicatorIp);
cy.get(`${FIELD_SELECTOR_LIST}`).should('exist').contains(threatIndicatorIp);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export const INDICATOR_TYPE_CELL = '[data-gridcell-column-id="threat.indicator.t

export const FIELD_SELECTOR = '[data-test-subj="tiIndicatorFieldSelectorDropdown"]';

export const FIELD_SELECTOR_INPUT = '[data-test-subj="comboBoxInput"]';

export const FIELD_SELECTOR_TOGGLE_BUTTON = '[data-test-subj="comboBoxToggleListButton"]';

export const FIELD_SELECTOR_LIST = '[data-test-subj="comboBoxOptionsList"]';

export const FIELD_BROWSER = `[data-test-subj="show-field-browser"]`;

export const FIELD_BROWSER_MODAL = `[data-test-subj="fields-browser-container"]`;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading