-
Notifications
You must be signed in to change notification settings - Fork 115
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
Functional test for datasource creation page #335
Conversation
Signed-off-by: Yibo Wang <[email protected]>
...ch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js
Show resolved
Hide resolved
).should('exist'); | ||
}); | ||
|
||
describe('Datasource can be created successfully', () => { |
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.
looks like the following 4 tests share same code, is it possible to make a data input/output array and run tests again each set of data using for loop?
Please check out the Dynamic tests examples from Cypress
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.
}); | ||
|
||
//Title field validation | ||
describe('Title validation', () => { |
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.
the validation tests share a lot same of code, is it possible to apply Dynamic tests or create custom commands?
Please check out the Dynamic tests examples from Cypress and Index Management Plugin commands
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.
Thanks for sharing! I have looked into the documents that you provided. From my perspective, I think we can keep these code for now. Though the code looks like similar, but actually each field may have their own validation logic. For example, title need validate if there is duplicate datasource name but others does not need to do this validation. Also, endpoint URL has unique validation logic as well. The UX team may also change the design (eg. add inline error based on validation logic) in 2.5. Thus, I think keep these codes for now is a good way to clearly indicate each test step and each validation logic.
...ch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js
Outdated
Show resolved
Hide resolved
Can you temporarily add 2.x branch to move forward https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/main/.github/workflows/cypress-workflow-bundle-snapshot-based.yml#L4 ? |
Signed-off-by: Yibo Wang <[email protected]>
Signed-off-by: Yibo Wang <[email protected]>
No longer needed. Let's switch back to #316 |
Signed-off-by: Yibo Wang [email protected]
Description
This PR is to check if it can run the workflow in against 2.4.0 version. Our functional test PRs sent to main cannot pass bundle work flow due to opensearch-project/opensearch-build#2743
Background: #325 (comment)
Original PR: #316
Issues Resolved
opensearch-project/OpenSearch-Dashboards#2576
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.