diff --git a/.cypress/integration/1_detectors.spec.js b/.cypress/integration/1_detectors.spec.js index 8a18db2c7..42a9355bc 100644 --- a/.cypress/integration/1_detectors.spec.js +++ b/.cypress/integration/1_detectors.spec.js @@ -207,16 +207,22 @@ describe('Detectors', () => { // Create test index cy.createIndex(cypressIndexDns, sample_dns_index_settings).then(() => cy - .request('POST', '_plugins/_security_analytics/rules/_search?prePackaged=true', { - from: 0, - size: 5000, - query: { - nested: { - path: 'rule', - query: { bool: { must: [{ match: { 'rule.category': 'dns' } }] } }, + .request( + 'POST', + `${Cypress.env( + 'opensearch_url' + )}/_plugins/_security_analytics/rules/_search?pre_packaged=true`, + { + from: 0, + size: 5000, + query: { + nested: { + path: 'rule', + query: { bool: { must: [{ match: { 'rule.category': 'dns' } }] } }, + }, }, - }, - }) + } + ) .should('have.property', 'status', 200) ); diff --git a/.cypress/integration/2_rules.spec.js b/.cypress/integration/2_rules.spec.js index a7d2271fd..fae4c028a 100644 --- a/.cypress/integration/2_rules.spec.js +++ b/.cypress/integration/2_rules.spec.js @@ -576,7 +576,7 @@ describe('Rules', () => { it('...can be imported with log type', () => { getImportButton().click({ force: true }); - getImportRuleFilePicker().selectFile('./cypress/fixtures/sample_aws_s3_rule_to_import.yml'); + getImportRuleFilePicker().selectFile('./.cypress/fixtures/sample_aws_s3_rule_to_import.yml'); // Check that AWS S3 log type is set. cy.contains('AWS S3'); }); diff --git a/.cypress/support/helpers.js b/.cypress/support/helpers.js index e430fb8f0..b3dbb1ff6 100644 --- a/.cypress/support/helpers.js +++ b/.cypress/support/helpers.js @@ -63,8 +63,7 @@ Cypress.Commands.add( } Cypress.log({ message: `Select combobox items: ${items.join(' | ')}` }); items.map((item) => { - cy.wrap(subject).type(item); - cy.get(`[title="${item}"]`).click({ force: true }); + cy.wrap(subject).type(item + '{downarrow}{enter}'); }); } ); diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml index c6cb0d8bc..c80f84190 100644 --- a/.github/workflows/cypress-workflow.yml +++ b/.github/workflows/cypress-workflow.yml @@ -8,13 +8,14 @@ on: - "*" env: OPENSEARCH_DASHBOARDS_VERSION: 'main' - OPENSEARCH_VERSION: '3.0.0-alpha1-SNAPSHOT' + OPENSEARCH_VERSION: '3.0.0-beta1-SNAPSHOT' SECURITY_ANALYTICS_BRANCH: 'main' GRADLE_VERSION: '7.6.1' jobs: tests: name: Run Cypress E2E tests strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest] include: diff --git a/.github/workflows/verify-binary-installation.yml b/.github/workflows/verify-binary-installation.yml index cc35b5255..84715ba79 100644 --- a/.github/workflows/verify-binary-installation.yml +++ b/.github/workflows/verify-binary-installation.yml @@ -2,7 +2,7 @@ name: 'Install Dashboards with Plugin via Binary' on: [push, pull_request] env: - OPENSEARCH_VERSION: '3.0.0-alpha1' + OPENSEARCH_VERSION: '3.0.0-beta1' CI: 1 # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm diff --git a/cypress.config.js b/cypress.config.js index e234d283e..4df7a42d8 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -8,7 +8,7 @@ module.exports = defineConfig({ responseTimeout: 300000, env: { opensearch_url: 'localhost:9200', - opensearch_dashboards: 'http://localhost:5601', + opensearch_dashboards: 'localhost:5601', security_enabled: false, }, fixturesFolder: '.cypress/fixtures', @@ -18,7 +18,7 @@ module.exports = defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { - return require('./.cypress/plugins/index.js')(on, config); + return require('./.cypress/plugins/index.ts')(on, config); }, specPattern: '.cypress/integration/*.spec.js', supportFile: '.cypress/support/index.js', diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index 3ae76e295..5d66f3c10 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -1,6 +1,6 @@ { "id": "securityAnalyticsDashboards", - "version": "3.0.0.0-alpha1", + "version": "3.0.0.0-beta1", "opensearchDashboardsVersion": "3.0.0", "configPath": ["opensearch_security_analytics"], "requiredPlugins": ["data", "navigation", "opensearchDashboardsUtils", "contentManagement"], diff --git a/package.json b/package.json index 97362170d..187f074b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opensearch_security_analytics_dashboards", - "version": "3.0.0.0-alpha1", + "version": "3.0.0.0-beta1", "description": "OpenSearch Dashboards plugin for Security Analytics", "main": "index.js", "license": "Apache-2.0", diff --git a/public/pages/Overview/components/Widgets/Summary.tsx b/public/pages/Overview/components/Widgets/Summary.tsx index 226570dbf..80b9287a5 100644 --- a/public/pages/Overview/components/Widgets/Summary.tsx +++ b/public/pages/Overview/components/Widgets/Summary.tsx @@ -149,41 +149,41 @@ export const Summary: React.FC = ({ )} )} - {/**/} - {/* {activeAlerts === 0 && totalFindings === 0 ? (*/} - {/* */} - {/*

No alerts and findings found

*/} - {/* */} - {/* }*/} - {/* body={*/} - {/* <>*/} - {/*

*/} - {/* */} - {/* Adjust the time range to see more results or create a
*/} - {/* detector to generate findings.*/} - {/*
*/} - {/*

*/} - {/* */} - {/* Create a detector*/} - {/* */} - {/* */} - {/* }*/} - {/* />*/} - {/* ) : (*/} - {/*
*/} - {/* */} - {/*
*/} - {/* )}*/} - {/*
*/} + + {activeAlerts === 0 && totalFindings === 0 ? ( + +

No alerts and findings found

+ + } + body={ + <> +

+ + Adjust the time range to see more results or create a
+ detector to generate findings. +
+

+ + Create a detector + + + } + /> + ) : ( +
+ +
+ )} +
); diff --git a/public/pages/Overview/containers/Overview/Overview.tsx b/public/pages/Overview/containers/Overview/Overview.tsx index ec1fc07e0..d2fc4d690 100644 --- a/public/pages/Overview/containers/Overview/Overview.tsx +++ b/public/pages/Overview/containers/Overview/Overview.tsx @@ -298,16 +298,16 @@ export const Overview: React.FC = (props) => { )} - - - + {/**/} + {/* */} + {/**/}