forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BWC] updates to BWC test scripts (opensearch-project#1190)
Allows the calling script with file location or url to enable the CI/CD pipeline to pass URLs. Some minor clean ups related to linter and pass by CSV for params. Finally, update to add releases parameter which enables us to test version mismatch if/when we allow the out of the box experience of OpenSearch Dashboards to work with previous versions of OpenSearch. Signed-off-by: Kawika Avilla <[email protected]>
- Loading branch information
Showing
44 changed files
with
1,126 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ trash | |
/built_assets | ||
target | ||
/build | ||
/bwc_tmp | ||
.jruby | ||
.idea | ||
*.iml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
cypress/integration/with-security/check_advanced_settings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
MiscUtils, | ||
LoginPage, | ||
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; | ||
|
||
const miscUtils = new MiscUtils(cy); | ||
const loginPage = new LoginPage(cy); | ||
|
||
describe('verify the advanced settings are saved', () => { | ||
beforeEach(() => { | ||
miscUtils.visitPage('app/management/opensearch-dashboards/settings'); | ||
loginPage.enterUserName('admin'); | ||
loginPage.enterPassword('admin'); | ||
loginPage.submit(); | ||
}); | ||
|
||
it('the dark mode is on', () => { | ||
cy.get('[data-test-subj="advancedSetting-editField-theme:darkMode"]') | ||
.invoke('attr', 'aria-checked') | ||
.should('eq', 'true'); | ||
}); | ||
|
||
it('the Timeline default columns field is set to 4', () => { | ||
cy.get('[data-test-subj="advancedSetting-editField-timeline:default_columns"]').should( | ||
'have.value', | ||
4 | ||
); | ||
}); | ||
|
||
it('the Timeline Maximum buckets field is set to 4', () => { | ||
cy.get('[data-test-subj="advancedSetting-editField-timeline:max_buckets"]').should( | ||
'have.value', | ||
4 | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
MiscUtils, | ||
LoginPage, | ||
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; | ||
|
||
const miscUtils = new MiscUtils(cy); | ||
const loginPage = new LoginPage(cy); | ||
|
||
describe('verify default landing page work for bwc', () => { | ||
beforeEach(() => { | ||
miscUtils.visitPage(''); | ||
loginPage.enterUserName('admin'); | ||
loginPage.enterPassword('admin'); | ||
loginPage.submit(); | ||
}); | ||
|
||
it('the overview page is set as the default landing page', () => { | ||
cy.url().should('include', '/app/opensearch_dashboards_overview#/'); | ||
}); | ||
}); |
82 changes: 82 additions & 0 deletions
82
cypress/integration/with-security/check_filter_and_query.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
MiscUtils, | ||
CommonUI, | ||
LoginPage, | ||
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; | ||
|
||
const miscUtils = new MiscUtils(cy); | ||
const commonUI = new CommonUI(cy); | ||
const loginPage = new LoginPage(cy); | ||
|
||
describe('check dashboards filter and query', () => { | ||
beforeEach(() => { | ||
miscUtils.visitPage('app/dashboards#'); | ||
loginPage.enterUserName('admin'); | ||
loginPage.enterPassword('admin'); | ||
loginPage.submit(); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.clearCookies(); | ||
}); | ||
|
||
it('tenant-switch-modal page should show and be clicked', () => { | ||
cy.get('[data-test-subj="tenant-switch-modal"]'); | ||
cy.get('[data-test-subj="confirm"]').click(); | ||
}); | ||
|
||
describe('osx filter and query should work in [Logs] Web Traffic dashboards', () => { | ||
beforeEach(() => { | ||
cy.get('[data-test-subj="dashboardListingTitleLink-[Logs]-Web-Traffic"]').click(); | ||
cy.get('[data-test-subj="breadcrumb last"]') | ||
.invoke('attr', 'title') | ||
.should('eq', '[Logs] Web Traffic'); | ||
}); | ||
|
||
it('osx filter and query should exist and be named correctly', () => { | ||
cy.get('[data-test-subj="saved-query-management-popover-button"]').click(); | ||
cy.get('[data-test-subj="saved-query-management-popover"]') | ||
.find('[class="osdSavedQueryListItem__labelText"]') | ||
.should('have.text', 'test-query') | ||
.click(); | ||
cy.get('[data-test-subj="queryInput"]').should('have.text', 'resp=200'); | ||
cy.get( | ||
'[data-test-subj="filter filter-enabled filter-key-machine.os filter-value-osx filter-unpinned "]' | ||
) | ||
.should('have.text', 'osx filter') | ||
.click(); | ||
cy.get('[data-test-subj="editFilter"]').click(); | ||
cy.get('[data-test-subj="filterFieldSuggestionList"]') | ||
.find('[data-test-subj="comboBoxInput"]') | ||
.should('have.text', 'machine.os'); | ||
cy.get('[data-test-subj="filterOperatorList"]') | ||
.find('[data-test-subj="comboBoxInput"]') | ||
.should('have.text', 'is'); | ||
cy.get('[data-test-subj="filterParams"]').find('input').should('have.value', 'osx'); | ||
}); | ||
|
||
it('osx filter and query should function correctly', () => { | ||
cy.get('[data-test-subj="saved-query-management-popover-button"]').click(); | ||
cy.get('[data-test-subj="saved-query-management-popover"]') | ||
.find('[class="osdSavedQueryListItem__labelText"]') | ||
.should('have.text', 'test-query') | ||
.click(); | ||
commonUI.setDateRange('Dec 1, 2021 @ 00:00:00.000', 'Jan 1, 2021 @ 00:00:00.000'); | ||
|
||
//[Logs] vistor chart should show osx 100% | ||
cy.get('[data-title="[Logs] Visitors by OS"]') | ||
.find('[class="label"]') | ||
.should('have.text', 'osx (100%)'); | ||
|
||
//[Logs] Response chart should show 200 label | ||
cy.get('[data-title="[Logs] Response Codes Over Time + Annotations"]') | ||
.find('[title="200"]') | ||
.should('have.text', '200'); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.