-
Notifications
You must be signed in to change notification settings - Fork 950
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
Add functional test cypress workflow improvements and enable the workflow for in-house tests #6061
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
// --- Typed commands -- | ||
|
||
Cypress.Commands.add('getElementByTestId', (testId, options = {}) => { | ||
return cy.get(`[data-test-subj="${testId}"]`, options); | ||
}); | ||
|
||
Cypress.Commands.add('getElementsByTestIds', (testIds, options = {}) => { | ||
const selectors = [testIds].flat(Infinity).map((testId) => `[data-test-subj="${testId}"]`); | ||
return cy.get(selectors.join(','), options); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,8 +79,9 @@ | |
"spec_to_console": "scripts/use_node scripts/spec_to_console", | ||
"pkg-version": "scripts/use_node -e \"console.log(require('./package.json').version)\"", | ||
"cypress:run-without-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=false", | ||
"cypress:run-with-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=500" | ||
|
||
"cypress:run-with-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=500", | ||
"osd:ciGroup10": "echo \"dashboard_sanity_test_spec.js\"", | ||
"osd:ciGroup11": "echo \"apps/vis_builder/*.js\"" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created an issue to address this concern #6083 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea have we specified how we group the cypress tests within the dashboard repo into cigroups? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently in Dashboards repo we are grouping it similar to how we group it in FT repo using package json by defining folder structure in it. I'll have to look into better way of doing it or something similar to how selenium tests are doing it today by passing it as a command. |
||
}, | ||
"repository": { | ||
"type": "git", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we plan to migrate all cypress test from FT repo into dashboard repo in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I think that will be ideal as we want feature and its tests to reside in the same place.