Skip to content

Commit

Permalink
Resolve multiple OSD core test issues observed in 2.15.0 (opensearch-…
Browse files Browse the repository at this point in the history
…project#1432) (opensearch-project#1436)

* Resolve OSD core test issues observed in 2.15.0



* Fix eslint issues



* Fix eslint issues



---------

Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Jun 23, 2024
1 parent 98bfa90 commit 06efe65
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -text
Original file line number Diff line number Diff line change
Expand Up @@ -104,36 +104,50 @@ describe('table visualization in embedded mode', () => {

it('Should allow to filter in embedded mode', () => {
commonUI.addFilterRangeRetrySelection('age', 'is between', '10', '30');
cy.wait(2000);
cy.reload();
cy.wait(2000);
cy.tbGetTableDataFromVisualization().then((data) => {
expect(data).to.deep.eq(['0', '1,059', '20', '1,114']);
});
commonUI.removeFilter('age');
cy.wait(2000);
cy.reload();
cy.wait(2000);
cy.tbGetTableDataFromVisualization().then((data) => {
expect(data).to.deep.eq(expectedData);
});
});

it('Should filter for value in embedded mode', () => {
cy.tbClickTableCellAction(2, 0, 0, 'filter for', 0, true);
cy.wait(2000);
cy.reload();
cy.wait(2000);
cy.tbGetTableDataFromVisualization().then((data) => {
expect(data).to.deep.eq(['0', '1,059']);
});
commonUI.removeFilter('age');
cy.wait(2000);
cy.reload();
cy.wait(2000);
cy.tbGetTableDataFromVisualization().then((data) => {
expect(data).to.deep.eq(expectedData);
});
cy.wait(2000);
cy.tbClickTableCellAction(2, 0, 0, 'expand', 0, true);
cy.wait(2000);
cy.tbClickFilterFromExpand('filter for');
cy.wait(2000);
cy.reload();
cy.wait(2000);
cy.tbGetTableDataFromVisualization().then((data) => {
expect(data).to.deep.eq(['0', '1,059']);
});
commonUI.removeFilter('age');
cy.wait(2000);
cy.reload();
cy.wait(2000);
cy.tbGetTableDataFromVisualization().then((data) => {
expect(data).to.deep.eq(expectedData);
});
Expand Down
6 changes: 6 additions & 0 deletions integtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ if [ "$DISABLE_VIDEO" = "true" ]; then
mv -v cypress_new.json cypress.json
fi

# Windows does not set timezone even when you specify `env TZ=America/Los_Angeles`
# Using powershell to force the timezone change to PST which is same as America/Los_Angeles
if [ "$OSTYPE" = "msys" ] || [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "win32" ]; then
powershell -Command "Set-TimeZone -Id 'Pacific Standard Time' -PassThru"
fi

if [ "$SECURITY_ENABLED" = "true" ]; then
echo "Running security enabled tests"
yarn cypress:run-with-security --browser "$BROWSER_PATH" --spec "$TEST_FILES"
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
"pkg-version": "./scripts/getpkgversion.sh",
"generate:test-data": "node ./scripts/generate_data/index.js",
"postinstall": "husky install",
"osd:ciGroup1": "echo \"apps/vis_builder/*.js\"",
"osd:ciGroup2": "echo \"apps/vis_type_table/*.js\"",
"osd:ciGroup3": "echo \"apps/vis-augmenter/*.js\"",
"osd:ciGroup4": "echo \"dashboard_sample_data_with_datasource_spec.js,dashboard_sanity_test_spec.js,apps/telemetry/*.js\"",
"osd:ciGroup5": "echo \"datasource-management-plugin/*.js\"",
"osd:ciGroup6": "echo \"apps/data_explorer/aaa_before.spec.js,apps/data_explorer/data_source_selector.spec.js,apps/data_explorer/date_nanos_mixed.spec.js,apps/data_explorer/date_nanos.spec.js,apps/data_explorer/discover_histogram.spec.js,apps/data_explorer/discover.spec.js,apps/data_explorer/zzz_after.spec.js\"",
"osd:ciGroup7": "echo \"apps/data_explorer/aaa_before.spec.js,apps/data_explorer/doc_navigation.spec.js,apps/data_explorer/doc_table.spec.js,apps/data_explorer/errors.spec.js,apps/data_explorer/field_data.spec.js,apps/data_explorer/zzz_after.spec.js\"",
"osd:ciGroup8": "echo \"apps/data_explorer/aaa_before.spec.js,apps/data_explorer/field_visualize.spec.js,apps/data_explorer/filter_editor.spec.js,apps/data_explorer/index_pattern_with_encoded_id.spec.js,apps/data_explorer/index_pattern_without_field.spec.js,apps/data_explorer/zzz_after.spec.js\"",
"osd:ciGroup9": "echo \"apps/data_explorer/aaa_before.spec.js,apps/data_explorer/inspector.spec.js,apps/data_explorer/large_string.spec.js,apps/data_explorer/saved_queries.spec.js,apps/data_explorer/shared_links.spec.js,apps/data_explorer/sidebar.spec.js,apps/data_explorer/source_filter.spec.js,apps/data_explorer/zzz_after.spec.js\"",
"osd:ciGroup1": "echo apps/vis_builder/*.js",
"osd:ciGroup2": "echo apps/vis_type_table/*.js",
"osd:ciGroup3": "echo apps/vis-augmenter/*.js",
"osd:ciGroup4": "echo dashboard_sample_data_with_datasource_spec.js,dashboard_sanity_test_spec.js,apps/telemetry/*.js",
"osd:ciGroup5": "echo datasource-management-plugin/*.js",
"osd:ciGroup6": "echo apps/data_explorer/aaa_before.spec.js,apps/data_explorer/data_source_selector.spec.js,apps/data_explorer/date_nanos_mixed.spec.js,apps/data_explorer/date_nanos.spec.js,apps/data_explorer/discover_histogram.spec.js,apps/data_explorer/discover.spec.js,apps/data_explorer/zzz_after.spec.js",
"osd:ciGroup7": "echo apps/data_explorer/aaa_before.spec.js,apps/data_explorer/doc_navigation.spec.js,apps/data_explorer/doc_table.spec.js,apps/data_explorer/errors.spec.js,apps/data_explorer/field_data.spec.js,apps/data_explorer/zzz_after.spec.js",
"osd:ciGroup8": "echo apps/data_explorer/aaa_before.spec.js,apps/data_explorer/field_visualize.spec.js,apps/data_explorer/filter_editor.spec.js,apps/data_explorer/index_pattern_with_encoded_id.spec.js,apps/data_explorer/index_pattern_without_field.spec.js,apps/data_explorer/zzz_after.spec.js",
"osd:ciGroup9": "echo apps/data_explorer/aaa_before.spec.js,apps/data_explorer/inspector.spec.js,apps/data_explorer/large_string.spec.js,apps/data_explorer/saved_queries.spec.js,apps/data_explorer/shared_links.spec.js,apps/data_explorer/sidebar.spec.js,apps/data_explorer/source_filter.spec.js,apps/data_explorer/zzz_after.spec.js",
"start-dummy-llm-server": "node ./cypress/support/assistant-dummy-llm.js"
},
"repository": {
Expand Down

0 comments on commit 06efe65

Please sign in to comment.