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

[Data Explorer] Fix functional cigroup 3 for save search on dashboard filtering #5111

Merged
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
7 changes: 6 additions & 1 deletion test/functional/apps/dashboard/dashboard_filter_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ export default function ({ getService, getPageObjects }) {
it('are added when a cell magnifying glass is clicked', async function () {
await dashboardAddPanel.addSavedSearch('Rendering-Test:-saved-search');
await PageObjects.dashboard.waitForRenderComplete();
await testSubjects.click('docTableCellFilter');

// Expand a doc row
await testSubjects.click('docTableExpandToggleColumn-0');

// Add a field filter
await testSubjects.click('tableDocViewRow-@message > addInclusiveFilterButton');

const filterCount = await filterBar.getFilterCount();
expect(filterCount).to.equal(1);
Expand Down
10 changes: 5 additions & 5 deletions test/functional/services/dashboard/expectations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
const log = getService('log');
const retry = getService('retry');
const testSubjects = getService('testSubjects');
const dataGrid = getService('dataGrid');
const find = getService('find');
const filterBar = getService('filterBar');
const PageObjects = getPageObjects(['dashboard', 'visualize']);
Expand Down Expand Up @@ -233,11 +234,10 @@
async savedSearchRowCount(expectedCount: number) {
log.debug(`DashboardExpect.savedSearchRowCount(${expectedCount})`);
await retry.try(async () => {
const savedSearchRows = await testSubjects.findAll(
'docTableExpandToggleColumn',
findTimeout
);
expect(savedSearchRows.length).to.be(expectedCount);
debugger

Check failure on line 237 in test/functional/services/dashboard/expectations.ts

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Unexpected 'debugger' statement

Check failure on line 237 in test/functional/services/dashboard/expectations.ts

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Insert `;`
// Need to change it here to find out how many rows there are
const timeStamps = await dataGrid.getDataGridTableColumn('date');
expect(timeStamps.length).to.be(expectedCount);
});
}

Expand Down
1 change: 1 addition & 0 deletions test/functional/services/data_grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function DataGridProvider({ getService }: FtrProviderContext) {
class DataGrid {
// This test no longer works in the new data explorer data grid table
// since each data grid table cell is now rendered differently
// https://github.com/opensearch-project/OpenSearch-Dashboards/issues/5108
async getDataGridTableData(): Promise<TabbedGridData> {
const table = await find.byCssSelector('.euiDataGrid');
const $ = await table.parseDomContent();
Expand Down
Loading