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

chore: remove unused/redundant functions from field_display_filtering_utils #9219

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -71,55 +71,6 @@ export const getExpandedDocTableRowFieldName = (docTableRowNumber, expandedDocum
.find('span[class*="textTruncate"]');
};

/**
* Select a language in the Dataset Selector for Index
* @param {string} datasetLanguage Index supports "OpenSearch SQL" and "PPL"
*/
export const selectIndexDatasetLanguage = (datasetLanguage) => {
cy.getElementByTestId('advancedSelectorLanguageSelect').select(datasetLanguage);
cy.getElementByTestId('advancedSelectorTimeFieldSelect').select('timestamp');
cy.getElementByTestId('advancedSelectorConfirmButton').click();
};

/**
* Select an index dataset.
* @param {string} indexClusterName Name of the cluster to be used for the Index.
* @param {string} indexName Name of the index dataset to be used.
* @param {string} datasetLanguage Index supports "OpenSearch SQL" and "PPL".
*/
export const selectIndexDataset = (indexClusterName, indexName, datasetLanguage) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. it is previously used in filtering and then be cleaned out.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch and thanks!

cy.getElementByTestId('datasetSelectorButton').click();
cy.getElementByTestId('datasetSelectorAdvancedButton').click();
cy.getElementByTestId('datasetExplorerWindow').contains('Indexes').click();
cy.getElementByTestId('datasetExplorerWindow').contains(indexClusterName).click();
cy.getElementByTestId('datasetExplorerWindow').contains(indexName).click();
cy.getElementByTestId('datasetSelectorNext').click();
selectIndexDatasetLanguage(datasetLanguage);
};

/**
* Select a language in the Dataset Selector for Index Pattern
* @param {string} datasetLanguage Index Pattern supports "DQL", "Lucene", "OpenSearch SQL" and "PPL"
*/
export const selectIndexPatternDatasetLanguage = (datasetLanguage) => {
cy.getElementByTestId('advancedSelectorLanguageSelect').select(datasetLanguage);
cy.getElementByTestId('advancedSelectorConfirmButton').click();
};

/**
* Select an index pattern dataset.
* @param {string} indexPatternName Name of the index pattern to be used.
* @param {string} datasetLanguage Index Pattern supports "DQL", "Lucene", "OpenSearch SQL" and "PPL"
*/
export const selectIndexPatternDataset = (indexPatternName, datasetLanguage) => {
cy.getElementByTestId('datasetSelectorButton').click();
cy.getElementByTestId('datasetSelectorAdvancedButton').click();
cy.getElementByTestId('datasetExplorerWindow').contains('Index Patterns').click();
cy.getElementByTestId('datasetExplorerWindow').contains(indexPatternName).click();
cy.getElementByTestId('datasetSelectorNext').click();
selectIndexPatternDatasetLanguage(datasetLanguage);
};

/**
* Toggle expansion of row rowNumber of Doc Table.
* @param {number} rowNumber rowNumber of Doc Table starts at 0 for row 1.
Expand Down
Loading