Add e2e for the apm integration policy form#129860
Conversation
|
Pinging @elastic/apm-ui (Team:apm) |
|
@elasticmachine merge upstream |
There was a problem hiding this comment.
I checked only the required fields here. I think I should write different tests for the form itself.
Let me know your thoughts
There was a problem hiding this comment.
I think having an E2E test that asserts that validation is working in general, and then covering the remaining areas with unit tests, is a good balance.
73fa868 to
1b77ca8
Compare
...lugins/apm/ftr_e2e/cypress/integration/power_user/integration_settings/integration_policy.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts
Show resolved
Hide resolved
.../ftr_e2e/cypress/integration/read_only_user/integration_settings/apm_server_not_installed.ts
Outdated
Show resolved
Hide resolved
dgieselaar
left a comment
There was a problem hiding this comment.
forgot to press submit on a pending review :)
| }); | ||
|
|
||
| describe('creating a new integration policy', () => { | ||
| beforeEach(() => { |
There was a problem hiding this comment.
This feels llike it's mixing assertions with input. IMHO the assertions belong in a test, the input in the body of a beforeEach
There was a problem hiding this comment.
I agree, it seems cleaner the assertions to be in the test
1394538
| cy.get('[data-test-subj="integration-card:epr:apm:featured').click(); | ||
| cy.get('[aria-selected="true"]').contains('Elastic APM in Fleet'); | ||
| cy.contains('Elastic APM now available in Fleet!'); | ||
| cy.contains('a', 'APM integration').click(); | ||
| cy.url().should('include', 'app/integrations/detail/apm/overview'); | ||
| cy.get('[data-test-subj="addIntegrationPolicyButton"]') |
There was a problem hiding this comment.
it's a little hard for me to understand what these statements are actually doing. perhaps it would be benefit by abstracting them into functions or leaving comments?
There was a problem hiding this comment.
I updated it should be more obvious now
#1394538
There was a problem hiding this comment.
I think having an E2E test that asserts that validation is working in general, and then covering the remaining areas with unit tests, is a good balance.
5e342ef to
1641228
Compare
💚 Build SucceededTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
…disable-server-side * 'main' of github.com:elastic/kibana: (35 commits) [Uptime] remove latency limit warnings when using monitor management (elastic#129597) [Security Solution] [ReponseOps] Executes Cases Cypress test when there is a change on cases plugin (elastic#129992) Paramaterized Discover tests (elastic#129684) [Security Solution][Investigations] - Minor bug fixes (elastic#130054) [DOCS} Adds technical preview to Lens annotations (elastic#130058) [Security solution] [Endpoint] Revisit blocklist wrong labels (elastic#128773) [Security Solutions] Adds API docs for value lists (elastic#129962) [CI] Move jest tests to spot instances, and fix spot retries in PRs (elastic#130045) chore(NA): upgrades rules_node_js to v5.4.0 (elastic#130051) [SecuritySolution] Remove the cell hovers actions for agent status (elastic#130042) Upgrade RxJS to 7 (elastic#129087) [SecuritySolution] Clean up CaseContext (elastic#130036) Revert "chore(NA): upgrades rules_node_js to v5.4.0 (elastic#130021)" Use RuleDataReader to query for threshold signal history (elastic#129763) Remove securityRulesCancelEnabled setting and set shorter default timeouts (elastic#129769) Upgrade EUI to v54.0.0 (elastic#129653) [Security Solution] More Ransomware exceptionable fields (elastic#130039) Add e2e for the apm integration policy form (elastic#129860) chore(NA): upgrades rules_node_js to v5.4.0 (elastic#130021) [ML] Fix Single Metric Viewer chart failing to load if no points during calendar event (elastic#130000) ... # Conflicts: # x-pack/plugins/screenshotting/server/screenshots/index.test.ts
Summary
The e2e tests are focused on the apm integration.
closes #123399