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

Move over remaining AD tests; clean up cypress run scripts #89

Merged
merged 3 commits into from
Feb 10, 2022

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Feb 7, 2022

Signed-off-by: Tyler Ohlsen ohltyler@amazon.com

Description

This PR moves over the remaining AD cypress tests, including detector list page tests and create detector workflow tests. Refactors the dashboard tests by adding the test suite directly in anomaly-detection folder, instead of abstracting the test in cypress/integration/common.

It also adds some useful scripts in package.json to reduce some code duplication used in the github workflows.

Issues Resolved

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.

@ohltyler ohltyler requested a review from a team as a code owner February 7, 2022 19:24
@ohltyler
Copy link
Member Author

ohltyler commented Feb 7, 2022

@amitgalitz @ylwu-amzn feel free to add any thoughts you have here as well. A follow-up to this will be removing cypress dependency + tests from AD Dashboards plugin.

@tianleh
Copy link
Member

tianleh commented Feb 9, 2022

Noticed the test failure which is tracked here #90

@Flyingliuhub is working on a PR to skip it. Once it is done, @ohltyler can merge that one to get rid of the check failure.

@ohltyler, I merged the change in already for skipping failed test, it should unblock you now.

package.json Outdated Show resolved Hide resolved
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

export const TEST_DETECTOR_ID = 'ulgqpXEBqtadYz9j2MHG';

// TODO: when repo is onboarded to typescript we can convert these detector states into an enum
Copy link
Member

Choose a reason for hiding this comment

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

Feel free to create a feature request issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

#93

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
@ohltyler
Copy link
Member Author

@tianleh @Tengda-He please have another quick look at the latest commit when you get the chance. Basically the baseUrl had a bug which was causing the AD tests to visit incorrect paths, and silently pass the tests without running them properly. When fixed, I found the issues with the fixtures, such as incorrect paths and missing files altogether. They've all been fixed now and are passing. I confirmed by running in browser locally, that the fixture data is coming up for each test.

@tianleh
Copy link
Member

tianleh commented Feb 10, 2022

@tianleh @Tengda-He please have another quick look at the latest commit when you get the chance. Basically the baseUrl had a bug which was causing the AD tests to visit incorrect paths, and silently pass the tests without running them properly. When fixed, I found the issues with the fixtures, such as incorrect paths and missing files altogether. They've all been fixed now and are passing. I confirmed by running in browser locally, that the fixture data is coming up for each test.

Great dive deep!

@ohltyler ohltyler merged commit 755b6b6 into opensearch-project:main Feb 10, 2022
@ohltyler ohltyler deleted the add-ad branch February 10, 2022 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants