Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
909469c
dataset ui update and trace automation progress
Dec 23, 2025
7b59c72
Merge branch 'main' into dataSetandAutomation
TackAdam Dec 23, 2025
e290454
Merge branch 'main' into dataSetandAutomation
TackAdam Dec 29, 2025
7defb64
update cypress
Dec 29, 2025
9c0d462
update cypress1
Dec 29, 2025
f6ae099
fix test, update ui, bug fixes
Dec 29, 2025
f0eea93
fix test
Dec 30, 2025
2fcd57e
update cypress
Dec 30, 2025
c9be0b9
update ui, cypress
Dec 31, 2025
da02d65
Merge branch 'main' into dataSetandAutomation
TackAdam Dec 31, 2025
b9db7ea
fix cypress
Dec 31, 2025
41e1b38
Merge branch 'main' into dataSetandAutomation
TackAdam Dec 31, 2025
7c577bb
coderabbit comments update
Dec 31, 2025
af79c90
coderabbit comments update2
Jan 2, 2026
f2d5c5a
fix cypress
Jan 2, 2026
29d5dd1
fix cypress2
Jan 2, 2026
4dbe34a
fix cypress3
Jan 2, 2026
680d81b
fix cypress4
Jan 3, 2026
5a6bccb
fix cypress5
Jan 3, 2026
8657a48
disable auto creation for cypress flows
Jan 3, 2026
9591418
undo disable
Jan 3, 2026
8eefd21
remove not working fixes
Jan 5, 2026
f186c56
Merge branch 'main' into dataSetandAutomation
TackAdam Jan 5, 2026
32e79b3
fix bug in populate_state_from_saved_query
Jan 5, 2026
e140669
bug fix
Jan 5, 2026
96d4e4e
cypress fix timing
Jan 6, 2026
1e80ce0
Merge branch 'main' into dataSetandAutomation
TackAdam Jan 6, 2026
9265294
remove timeout
Jan 8, 2026
f24fc22
address comments
Jan 9, 2026
b7cd710
remove white space, switch to osd load
Jan 9, 2026
50c4197
address comments, switch proxy call to cat indices
Jan 12, 2026
2d451ee
Merge branch 'main' into dataSetandAutomation
TackAdam Jan 12, 2026
a1ab94c
reuse directquery mds call for index check
Jan 12, 2026
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
2 changes: 2 additions & 0 deletions changelogs/fragments/11096.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Dataset UI and observability workspace + Trace automation ([#11096](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/11096))
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,14 @@ const queriesTestSuite = () => {

// Query should persist across refresh
cy.reload();
cy.getElementByTestId(`discoverQueryElapsedMs`).should('be.visible');
cy.osd.waitForLoader(true);
// Wait for dataset to be fully loaded after reload
cy.getElementByTestId('datasetSelectButton', { timeout: 30000 })
.should('be.visible')
.should('not.be.disabled');
// Wait for page to fully stabilize and query to execute
cy.osd.waitForLoader(true);
cy.getElementByTestId(`discoverQueryElapsedMs`, { timeout: 30000 }).should('be.visible');

// Verify the state again after reload
verifyDiscoverPageState({
Expand Down Expand Up @@ -147,7 +154,8 @@ const queriesTestSuite = () => {
cy.get('button[role="tab"]').contains('Logs').click();
cy.get('button[role="tab"][aria-selected="true"]').contains('Logs').should('be.visible');

cy.explore.setTopNavDate(START_TIME, START_TIME);
// Change date range to trigger query re-execution (use valid range)
cy.explore.setTopNavDate('Jan 1, 2020 @ 00:00:00.000', 'Jan 2, 2020 @ 00:00:00.000');

cy.getElementByTestId('exploreQueryExecutionButton').click();
cy.osd.waitForLoader(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ const runSavedExploreTests = () => {
page: 'explore/logs',
isEnhancement: true,
});
// ensure dataset is loaded
cy.wait(10000);
// Wait for dataset to be fully loaded after navigation
cy.getElementByTestId('datasetSelectButton', { timeout: 30000 })
.should('be.visible')
.should('not.be.disabled');
cy.getElementByTestId('discoverNewButton', { timeout: 30000 }).should('be.visible');
});

after(() => {
Expand All @@ -48,7 +51,7 @@ const runSavedExploreTests = () => {
});

beforeEach(() => {
cy.getElementByTestId('discoverNewButton').click();
cy.getElementByTestId('discoverNewButton', { timeout: 30000 }).should('be.visible').click();
cy.osd.waitForLoader(true);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const runSimpleDatasetSelectorTests = () => {
for (let i = 1; i <= noIndexPatterns; i++) {
validateItemsInSimpleDatasetSelectorDropDown(
`${INDEX_PATTERN_WITH_TIME.slice(0, i)}`,
noIndexPatterns - i + 1
noIndexPatterns
);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const cachingTestSuite = () => {
cy.getElementByTestId('datasetSelectSelectable')
.should('be.visible')
.within(() => {
cy.get(`[title="${alternativeIndexPattern}Index Patterns"]`).should('exist');
cy.getElementByTestId(`datasetSelectOption-${alternativeIndexPattern}`).should('exist');
});
});
});
Expand Down
49 changes: 26 additions & 23 deletions cypress/utils/apps/query_enhancements/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,38 +156,31 @@ Cypress.Commands.add(
.should('not.be.disabled')
.click();
cy.getElementByTestId(`datasetSelectorAdvancedButton`).should('be.visible').click();
cy.get(`[title="Indexes"]`).click();
cy.get(`[title="${dataSourceName}"]`).click();

// Ensure "Index name" mode is selected (not "Index wildcard")
cy.getElementByTestId('index-scope-selector')
.should('be.visible')
.find('[data-test-subj="comboBoxInput"]')
.click();

// Select "Index name" if not already selected
cy.get(`[title="Index name"]`).should('be.visible').click({ force: true });
// Click on "Indexes" dataset type if it's visible
cy.get('body').then(($body) => {
if ($body.find(`[title="Indexes"]`).length > 0) {
cy.get(`[title="Indexes"]`).click();
}
});

// Verify selection
cy.getElementByTestId('index-scope-selector')
.find('[data-test-subj="comboBoxInput"]')
.should('contain.text', 'Index name');
cy.get(`[title="${dataSourceName}"]`).click();

// Click the search field to open the popover (onFocus triggers isPopoverOpen = true)
cy.getElementByTestId('index-selector-search')
// Use the unified index selector - type to search and click from results
cy.getElementByTestId('unified-index-selector-search')
.should('be.visible')
.click({ force: true }) // Use click instead of focus to ensure onFocus event fires
.click({ force: true })
.clear()
.type(index);

// Wait for the popover to fully render
cy.getElementByTestId('index-selector-popover', { timeout: 10000 }).should('be.visible');
// Wait for the dropdown to appear with results
cy.getElementByTestId('unified-index-selector-dropdown').should('be.visible');

// Now look for the dataset-index-selector within the popover
cy.getElementByTestId('dataset-index-selector', { timeout: 5000 })
// Click the matching index from the dropdown list
cy.getElementByTestId('unified-index-selector-list')
.should('be.visible')
.within(() => {
// Look for the index by title attribute in the popover
// Find and click the index by its label in the EuiSelectable
cy.get(`[title="${index}"]`).should('be.visible').click({ force: true });
});
cy.getElementByTestId('datasetSelectorNext').should('be.visible').click();
Expand Down Expand Up @@ -223,6 +216,10 @@ Cypress.Commands.add(
(indexPattern, dataSourceName, datasetEnabled = false) => {
const title = datasetEnabled ? indexPattern : `${dataSourceName}::${indexPattern}`;
cy.getElementByTestId('datasetSelectorButton').should('be.visible').click();

// Wait for dropdown list to appear
cy.get('.euiSelectableList').should('be.visible');

cy.get(`[title="${title}"]`).should('be.visible').click();

// verify that it has been selected
Expand All @@ -248,7 +245,13 @@ Cypress.Commands.add(
(indexPattern, dataSourceName, language, finalAction = 'submit') => {
cy.getElementByTestId('datasetSelectorButton').should('be.visible').click();
cy.getElementByTestId(`datasetSelectorAdvancedButton`).should('be.visible').click();
cy.get(`[title="Index Patterns"]`).click();
// Note: If only Index Patterns exist, the type selection will be hidden
// Try to click Index Patterns if it exists, otherwise continue
cy.get('body').then(($body) => {
if ($body.find(`[title="Index Patterns"]`).length > 0) {
cy.get(`[title="Index Patterns"]`).click();
}
});

cy.getElementByTestId('datasetExplorerWindow')
.find(`[title="${dataSourceName}::${indexPattern}"]`)
Expand Down
101 changes: 44 additions & 57 deletions cypress/utils/commands.explore.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,22 @@ const isEditorEmpty = () => {
.then((text) => text.trim() === '');
};

const selectIndexWildcardMode = (indexPattern, appendWildcard = true) => {
// Select "Index wildcard" from the scope selector
cy.getElementByTestId('index-scope-selector')
.should('be.visible')
.find('[data-test-subj="comboBoxSearchInput"]')
.click()
.clear()
.type('Index wildcard{enter}');

// Wait for the selection to take effect by verifying the text changed
cy.getElementByTestId('index-scope-selector')
.find('[data-test-subj="comboBoxInput"]')
.should('contain.text', 'Index wildcard')
.should('be.visible');
const selectIndexWildcardMode = (indexPattern) => {
// UI now auto-appends wildcard when typing single character, so just use the pattern as-is
const pattern = indexPattern;

// Enter the pattern with optional wildcard appending
const pattern = appendWildcard ? `${indexPattern}*{enter}` : `${indexPattern}{enter}`;
cy.getElementByTestId('dataset-prefix-selector', { timeout: 10000 })
// Type the pattern into the unified search field
cy.getElementByTestId('unified-index-selector-search')
.should('be.visible')
.find('[data-test-subj="multiWildcardPatternInput"]')
.click({ force: true })
.clear()
.type(pattern);

// Click the "Add wildcard" button to add the pattern
cy.getElementByTestId('unified-index-selector-add-button')
.should('be.visible')
.should('not.be.disabled')
.click();
};

cy.explore.add('clearQueryEditor', () => {
Expand Down Expand Up @@ -291,7 +285,9 @@ cy.explore.add(

// The force is necessary as there is occasionally a popover that covers the button
cy.getElementByTestId('savedQueryFormSaveButton').click({ force: true });
cy.getElementByTestId('euiToastHeader').contains('was saved').should('be.visible');
cy.getElementByTestId('euiToastHeader', { timeout: 30000 })
.contains('was saved')
.should('be.visible');
}
);

Expand Down Expand Up @@ -329,15 +325,21 @@ cy.explore.add(

// The force is necessary as there is occasionally a popover that covers the button
cy.getElementByTestId('savedQueryFormSaveButton').click({ force: true });
cy.getElementByTestId('euiToastHeader').contains('was saved').should('be.visible');
cy.getElementByTestId('euiToastHeader', { timeout: 30000 })
.contains('was saved')
.should('be.visible');
cy.osd.waitForSync();
}
);

cy.explore.add('loadSavedQuery', (name) => {
cy.getElementByTestId('queryPanelFooterSaveQueryButton').click();

cy.getElementByTestId('saved-query-management-open-button').click();
// Wait for the popover to fully render before clicking the open button
cy.getElementByTestId('saved-query-management-open-button')
.should('be.visible')
.should('not.be.disabled')
.click();

cy.getElementByTestId('euiFlyoutCloseButton').parent().contains(name).should('exist').click();
// click button through popover
Expand All @@ -355,7 +357,11 @@ cy.explore.add('clearSavedQuery', () => {
cy.explore.add('deleteSavedQuery', (name) => {
cy.getElementByTestId('queryPanelFooterSaveQueryButton').click();

cy.getElementByTestId('saved-query-management-open-button').click();
// Wait for the popover to fully render before clicking the open button
cy.getElementByTestId('saved-query-management-open-button')
.should('be.visible')
.should('not.be.disabled')
.click();
cy.getElementByTestId('euiFlyoutCloseButton')
.parent()
.contains(name)
Expand Down Expand Up @@ -405,39 +411,24 @@ cy.explore.add(
.should('be.visible')
.should('not.be.disabled')
.click();
cy.getElementByTestId(`datasetSelectAdvancedButton`).should('be.visible').click();
cy.get(`[title="Indexes"]`).click();
cy.getElementByTestId(`datasetSelectorAdvancedButton`).should('be.visible').click();
cy.get(`[title="${dataSourceName}"]`).click();

// Ensure "Index name" mode is selected (not "Index wildcard")
cy.getElementByTestId('index-scope-selector')
.should('be.visible')
.find('[data-test-subj="comboBoxInput"]')
.click();

// Select "Index name" if not already selected
cy.get(`[title="Index name"]`).should('be.visible').click({ force: true });

// Verify selection
cy.getElementByTestId('index-scope-selector')
.find('[data-test-subj="comboBoxInput"]')
.should('contain.text', 'Index name');

// Click the search field to open the popover (onFocus triggers isPopoverOpen = true)
cy.getElementByTestId('index-selector-search')
// Use the unified index selector - type to search and click from results
cy.getElementByTestId('unified-index-selector-search')
.should('be.visible')
.click({ force: true }) // Use click instead of focus to ensure onFocus event fires
.click({ force: true })
.clear()
.type(index);

// Wait for the popover to fully render
cy.getElementByTestId('index-selector-popover', { timeout: 10000 }).should('be.visible');
// Wait for the dropdown to appear with results
cy.getElementByTestId('unified-index-selector-dropdown').should('be.visible');

// Now look for the dataset-index-selector within the popover
cy.getElementByTestId('dataset-index-selector', { timeout: 5000 })
// Click the matching index from the dropdown list
cy.getElementByTestId('unified-index-selector-list')
.should('be.visible')
.within(() => {
// Look for the index by title attribute in the popover
// Find and click the index by its label in the EuiSelectable
cy.get(`[title="${index}"]`).should('be.visible').click({ force: true });
});
cy.getElementByTestId('datasetSelectorNext').should('be.visible').click();
Expand Down Expand Up @@ -505,18 +496,16 @@ cy.explore.add(
.click();

// Step 3 - Click advanced selector button
cy.getElementByTestId(`datasetSelectAdvancedButton`).should('be.visible').click();
cy.getElementByTestId(`datasetSelectorAdvancedButton`).should('be.visible').click();

// Step 4 - Select Indexes
cy.get(`[title="Indexes"]`).should('be.visible');
cy.get(`[title="Indexes"]`).click();
// Step 4 - Indexes panel is now hidden when it's the only option, skip to data source selection

// Step 5 - Select data source
cy.get(`[title="${dataSourceName}"]`).should('be.visible');
cy.get(`[title="${dataSourceName}"]`).click();

// Step 6 & 7 - Select index scope (Index wildcard) and enter pattern
selectIndexWildcardMode(indexPattern, true);
selectIndexWildcardMode(indexPattern);

// Step 8 - Click Next button
cy.getElementByTestId('datasetSelectorNext').should('be.visible').click();
Expand Down Expand Up @@ -669,16 +658,14 @@ cy.explore.add(
}
}

// Step 4 - Select Indexes
cy.get(`[title="Indexes"]`).should('be.visible');
cy.get(`[title="Indexes"]`).click();
// Step 4 - Indexes panel is now hidden when it's the only option, skip to data source selection

// Step 5 - Select data source
cy.get(`[title="${dataSource}"]`).should('be.visible');
cy.get(`[title="${dataSource}"]`).click();

// Step 6 & 7 - Select index scope (Index wildcard) and enter pattern (no wildcard appending)
selectIndexWildcardMode(indexPattern, false);
// Step 6 & 7 - Select index scope (Index wildcard) and enter pattern
selectIndexWildcardMode(indexPattern);

// Step 8 - Click Next button
cy.getElementByTestId('datasetSelectorNext')
Expand Down Expand Up @@ -755,7 +742,7 @@ cy.explore.add(
.click();

// Step 14 - Wait for dataset creation request and save ID
cy.wait('@createDatasetInterception', { timeout: 15000 }).then((interception) => {
cy.wait('@createDatasetInterception').then((interception) => {
// Save the created index pattern ID as an alias
cy.wrap(interception.response.body.id).as('INDEX_PATTERN_ID');
});
Expand Down
Loading
Loading