Skip to content

Commit

Permalink
adds integration test for customImportMap plugin (opensearch-project#272
Browse files Browse the repository at this point in the history
)

adds integration test for customImportMap plugin

Signed-off-by: Shivam Dhar <[email protected]>
Signed-off-by: Jakub Przybylski <[email protected]>
  • Loading branch information
Shivamdhar authored and jakubp-eliatra committed Mar 24, 2023
1 parent 47dc7df commit ca4f028
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: customImportMapDashboards Release tests workflow in Bundled OpenSearch Dashboards
on:
pull_request:
branches:
- main
- dev-*
jobs:
changes:
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.filter.outputs.tests }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
tests:
- 'cypress/**/custom-import-map-dashboards/**'
tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Observability
test-command: yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/custom-import-map-dashboards/*'
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

/// <reference types="cypress" />

import { BASE_PATH } from '../../../utils/constants';
import {
MiscUtils,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';

const miscUtils = new MiscUtils(cy);
describe('Verify the presence of import custom map tab in region map plugin', () => {
before(() => {
cy.deleteAllIndices();
miscUtils.addSampleData();

cy.visit(`${BASE_PATH}/app/visualize#/`);

// Click on "Create Visualization" tab
cy.contains('Create visualization').click({ force: true });

// Click on "Region Map" icon
cy.contains('Region Map').click({ force: true });

// Select index source - [Flights] Flight Log
cy.contains('[Flights] Flight Log').click({ force: true });
});

it('checks import custom map tab is present', () => {
// Click on "Import Vector Map" tab, which is part of customImportMap plugin
cy.contains('Import Vector Map').click({ force: true });
})

after(() => {
miscUtils.removeSampleData();
})
});
1 change: 1 addition & 0 deletions test_finder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ OSD_COMPONENT_TEST_MAP=( "OpenSearch-Dashboards:opensearch-dashboards"
"reportsDashboards:reports-dashboards"
"securityDashboards:security"
"notificationsDashboards:notifications-dashboards"
"customImportMapDashboards:custom-import-map-dashboards"
)

[ -f $OSD_BUILD_MANIFEST ] && TEST_TYPE="manifest" || TEST_TYPE="default"
Expand Down

0 comments on commit ca4f028

Please sign in to comment.