Skip to content

Commit

Permalink
scoped search for better testing
Browse files Browse the repository at this point in the history
  • Loading branch information
logeekal committed Oct 25, 2024
1 parent 7972cde commit 812f9af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ describe(
addDiscoverEsqlQuery(`${esqlQuery} | limit 1`);
updateDateRangeInLocalDatePickers(DISCOVER_CONTAINER, INITIAL_START_DATE, INITIAL_END_DATE);
waitForDiscoverFieldsToLoad();
addFieldToTable('host.name');
addFieldToTable('user.name');
cy.get(DISCOVER_CONTAINER).within(() => {
addFieldToTable('host.name');
addFieldToTable('user.name');
});
cy.get(GET_DISCOVER_DATA_GRID_CELL_HEADER('host.name')).should('be.visible');
cy.get(GET_DISCOVER_DATA_GRID_CELL_HEADER('user.name')).should('be.visible');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const openAddDiscoverFilterPopover = () => {
};

export const searchForField = (fieldId: string) => {
cy.get(`${DISCOVER_CONTAINER} ${DISCOVER_FIELD_SEARCH}`).should('be.visible').type(fieldId);
cy.get(DISCOVER_FIELD_SEARCH).should('be.visible').type(fieldId);
};

export const clearFieldSearch = () => {
Expand Down

0 comments on commit 812f9af

Please sign in to comment.