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

[MD] functional test for datasource creation page #316

Merged
merged 5 commits into from
Oct 18, 2022
Merged

[MD] functional test for datasource creation page #316

merged 5 commits into from
Oct 18, 2022

Conversation

yibow98
Copy link
Contributor

@yibow98 yibow98 commented Sep 30, 2022

Signed-off-by: Yibo Wang yibow@amazon.com

Description

Functional test for datasource creation page

1_create_datasource.spec.copy.js.mp4

Issues Resolved

opensearch-project/OpenSearch-Dashboards#2576
#337

To do:

  • Create a test domain and update the endpoint URL environment variable. Currently is a dummy URL for testing.

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 September 30, 2022 17:22
@tianleh
Copy link
Member

tianleh commented Oct 3, 2022

check my comment on this PR #314 (comment) Could you sync up with @mpabba3003 to see who can create the feature flag first?

@yibow98
Copy link
Contributor Author

yibow98 commented Oct 3, 2022

check my comment on this PR #314 (comment) Could you sync up with @mpabba3003 to see who can create the feature flag first?

Sure! Will do.

@noCharger
Copy link
Contributor

Will this PR depends on opensearch-project/OpenSearch-Dashboards#2501?

@yibow98
Copy link
Contributor Author

yibow98 commented Oct 6, 2022

Will this PR depends on opensearch-project/OpenSearch-Dashboards#2501?

Yes, will modify the tests after PR merge into main.

Copy link
Contributor

@noCharger noCharger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent job figuring out the configuration override. Can we provide more descriptive messages in describe() instead of adding comments to test cases?

cypress.json Outdated Show resolved Hide resolved
.github/workflows/release-e2e-workflow-template.yml Outdated Show resolved Hide resolved
cypress.json Outdated
"VISBUILDER_ENABLED": false
"VISBUILDER_ENABLED": false,
"DATASOURCE_MANAGEMENT_ENABLED": false,
"OSD_TEST_DOMAIN_ENDPOINT_URL": "https://test",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need the endpoint as constant in cypress.json? I would prefer either use github secret if it's actual endpoint or constant string in test cases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my local, I used environment variable to define the URL and the current OSD_TEST_DOMAIN_ENDPOINT_URL is a dummy url. We will create an official test domain later and use github secret then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting problem! I am ok to move forward for now.

We may need to brainstorm a bit how to support such when the tests run from our org's infra team https://github.com/opensearch-project/opensearch-build cc @seraphjiang @kavilla @CCongWang @kristenTian

@yibow98
Copy link
Contributor Author

yibow98 commented Oct 17, 2022

Excellent job figuring out the configuration override. Can we provide more descriptive messages in describe() instead of adding comments to test cases?

I think the current description in describe is clear for each test case. The reason I add comments is that I want to make it more readable. The comments are same as messages in describe() .

@tianleh
Copy link
Member

tianleh commented Oct 18, 2022

Could you check this comment to see if you can run the workflow against 2.4.0?

#325 (comment)

@yibow98
Copy link
Contributor Author

yibow98 commented Oct 18, 2022

Could you check this comment to see if you can run the workflow against 2.4.0?

#325 (comment)

Sure thing! Will do it.

@yibow98
Copy link
Contributor Author

yibow98 commented Oct 18, 2022

Could you check this comment to see if you can run the workflow against 2.4.0?

#325 (comment)

I raised a PR #335 against 2.x branch and the Bundle Snapshot based E2E Cypress tests workflow for core Dashboards" is successful against 2.4.0. Reference: https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions/runs/3275360924/jobs/5390106545. Please ignore the one of cypress test case failed, I will fix it in my code. All other check pass.

@tianleh
Copy link
Member

tianleh commented Oct 18, 2022

Is backport to 2.x needed? If yes, please add such label. See this example. #325 With this label, it will automatically create a new PR to backport after your current PR is merged.

@yibow98 yibow98 added the v2.4.0 'Issues and PRs related to version v2.4.0' label Oct 18, 2022
@yibow98
Copy link
Contributor Author

yibow98 commented Oct 18, 2022

Is backport to 2.x needed? If yes, please add such label. See this example. #325 With this label, it will automatically create a new PR to backport after your current PR is merged.

Added!

@tianleh
Copy link
Member

tianleh commented Oct 18, 2022

Please sync from main and resolve the conflict. @yibow98

@yibow98
Copy link
Contributor Author

yibow98 commented Oct 18, 2022

Please sync from main and resolve the conflict. @yibow98

Done

cypress.json Outdated Show resolved Hide resolved
Copy link
Member

@tianleh tianleh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can git checkout those two files. Ideally they shall not show up in the diff.

Signed-off-by: Yibo Wang <yibow@amazon.com>
Signed-off-by: Yibo Wang <yibow@amazon.com>
Signed-off-by: Yibo Wang <yibow@amazon.com>
Signed-off-by: Yibo Wang <yibow@amazon.com>
Signed-off-by: Yibo Wang <yibow@amazon.com>
@yibow98
Copy link
Contributor Author

yibow98 commented Oct 18, 2022

You can git checkout those two files. Ideally they shall not show up in the diff.

Solved. Now it should be ready to be merged. Thanks!

@tianleh tianleh merged commit 7755b38 into opensearch-project:main Oct 18, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 18, 2022
* [MD] functional test for datasource creation page

Signed-off-by: Yibo Wang <yibow@amazon.com>

* Set up environment variables for endpoint url and username&password

Signed-off-by: Yibo Wang <yibow@amazon.com>

* Update functional test & add a feature flag

Signed-off-by: Yibo Wang <yibow@amazon.com>

* Resolved comments

Signed-off-by: Yibo Wang <yibow@amazon.com>

* Move url variable to constant.js & remove some comments in code

Signed-off-by: Yibo Wang <yibow@amazon.com>

Signed-off-by: Yibo Wang <yibow@amazon.com>
(cherry picked from commit 7755b38)
jakubp-eliatra pushed a commit to sebastianmichalski/opensearch-dashboards-functional-test that referenced this pull request Mar 24, 2023
…#316)

* [MD] functional test for datasource creation page

Signed-off-by: Yibo Wang <yibow@amazon.com>

* Set up environment variables for endpoint url and username&password

Signed-off-by: Yibo Wang <yibow@amazon.com>

* Update functional test & add a feature flag

Signed-off-by: Yibo Wang <yibow@amazon.com>

* Resolved comments

Signed-off-by: Yibo Wang <yibow@amazon.com>

* Move url variable to constant.js & remove some comments in code

Signed-off-by: Yibo Wang <yibow@amazon.com>

Signed-off-by: Yibo Wang <yibow@amazon.com>
Signed-off-by: Jakub Przybylski <jakub.przybylski@eliatra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x 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.

5 participants