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

Migrate existing Cypress tests to Cypress + Cucumber #56970

Closed
wants to merge 30 commits into from

Conversation

mdelapenya
Copy link
Contributor

@mdelapenya mdelapenya commented Feb 6, 2020

Summary

It converts the existing Cypress tests for APM from Cypress to Cypress+Cucumber. To achieve that, it adds a cucumber-preprocessor, as shown in the following examples:

The cypress tests are run using the same npm run cypress:run script, so no CI command should be affected.

As recommended by @elastic/kibana-operations, we moved the dependecies to x-pack's package.json.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials
- [ ] Unit or functional tests were updated or added to match the most common scenarios
- [ ] This was checked for keyboard-only and screenreader accessibility

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately

It seems not relevant to the main purpose of these tests
We are keeping cypress as rootDir to follow project's structure. On the other hand,
having a second cypress directory at the 2nd level is the default structure, as shown
in the examples:
- https://github.com/TheBrainFamily/cypress-cucumber-webpack-typescript-example
- https://github.com/cypress-io/cypress-example-recipes/tree/a240054d7f5626ffcd7bd668dded96d219c4a7eb/examples/preprocessors__typescript-webpack
It was automatically changed by tests
@mdelapenya mdelapenya added the Team:APM All issues that need APM UI Team support label Feb 6, 2020
@mdelapenya mdelapenya requested review from a team as code owners February 6, 2020 12:26
@mdelapenya mdelapenya self-assigned this Feb 6, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@mdelapenya
Copy link
Contributor Author

@elasticmachine merge upstream

@mdelapenya mdelapenya added release_note:skip Skip the PR/issue when compiling release notes v7.6.0 labels Feb 6, 2020
Comment on lines +1 to +9
Feature: APM

Background:
Given a user browses the APM UI application
When the user inspects the opbeans-go service

Scenario: Transaction duration charts
Then should redirect to correct path with correct params
And should have correct y-axis ticks
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @MadameSheema, I'd would love to get your insights about this spec 🙏 😊

@mdelapenya
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💔 Build Failed

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@elastic elastic deleted a comment from kibanamachine Feb 7, 2020
@mdelapenya
Copy link
Contributor Author

@elasticmachine merge upstream

@mdelapenya
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💔 Build Failed

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

renovate lgtm

@mdelapenya
Copy link
Contributor Author

After talking to @sqren, I'm going to close this PR and resend with following changes:

  • rename the top-level cypress dir to e2e or end2end, updating references across project
  • move back dependencies from kibana build to x-pack/apm build, isolating build dependencies and test life cycle (following other teams' approach)

@mdelapenya mdelapenya closed this Feb 10, 2020
@mdelapenya mdelapenya deleted the cypress-cucumber branch February 11, 2020 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants