Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Functional test for datasource creation page #335

wants to merge 3 commits into from

Conversation

yibow98
Copy link
Contributor

@yibow98 yibow98 commented Oct 18, 2022

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

  • Commits are signed per the DCO using --signoff

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.

@yibow98 yibow98 requested a review from a team as a code owner October 18, 2022 03:55
cypress.json Outdated Show resolved Hide resolved
).should('exist');
});

describe('Datasource can be created successfully', () => {
Copy link
Collaborator

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

Copy link
Contributor Author

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', () => {
Copy link
Collaborator

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

Copy link
Contributor Author

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.

@tianleh
Copy link
Member

tianleh commented Oct 18, 2022

@yibow98 yibow98 self-assigned this Oct 18, 2022
@tianleh
Copy link
Member

tianleh commented Oct 18, 2022

No longer needed. Let's switch back to #316

@tianleh tianleh closed this Oct 18, 2022
@seraphjiang seraphjiang added enhancement New feature or request v2.4.0 'Issues and PRs related to version v2.4.0' labels Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2.4.0 'Issues and PRs related to version v2.4.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants