-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[APM] Fix transaction action menu for trace explorer and dependency operations #162213
Merged
gbamparop
merged 6 commits into
elastic:main
from
gbamparop:fix-transaction-action-menu
Jul 19, 2023
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
46250e6
Fix transaction action menu
gbamparop bffeb57
Fix Jest tests
gbamparop dba357e
Add cypress tests
gbamparop c912348
Fix types
gbamparop 6327c9d
Fix action menu in mobile transaction details page
gbamparop 89e4bec
Merge branch 'main' into fix-transaction-action-menu
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...ns/apm/ftr_e2e/cypress/e2e/read_only_user/dependency_operation/dependency_operation.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import url from 'url'; | ||
import { synthtrace } from '../../../../synthtrace'; | ||
import { opbeans } from '../../../fixtures/synthtrace/opbeans'; | ||
|
||
const start = '2021-10-10T00:00:00.000Z'; | ||
const end = '2021-10-10T00:15:00.000Z'; | ||
|
||
const dependencyOperationHref = url.format({ | ||
pathname: '/app/apm/dependencies/operation', | ||
query: { | ||
dependencyName: 'postgresql', | ||
spanName: 'SELECT * FROM product', | ||
environment: 'ENVIRONMENT_ALL', | ||
rangeFrom: start, | ||
rangeTo: end, | ||
}, | ||
}); | ||
|
||
describe('Dependency operation', () => { | ||
before(() => { | ||
synthtrace.index( | ||
opbeans({ | ||
from: new Date(start).getTime(), | ||
to: new Date(end).getTime(), | ||
}) | ||
); | ||
}); | ||
|
||
after(() => { | ||
synthtrace.clean(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.loginAsViewerUser(); | ||
}); | ||
|
||
it('opens the action menu popup when clicking the investigate button', () => { | ||
cy.visitKibana(dependencyOperationHref); | ||
cy.getByTestSubj('apmActionMenuButtonInvestigateButton').click(); | ||
cy.getByTestSubj('apmActionMenuInvestigateButtonPopup'); | ||
}); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the test! |
47 changes: 47 additions & 0 deletions
47
...ck/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/mobile/mobile_transaction_details.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import url from 'url'; | ||
import { synthtrace } from '../../../../synthtrace'; | ||
import { generateMobileData } from './generate_data'; | ||
|
||
const start = '2021-10-10T00:00:00.000Z'; | ||
const end = '2021-10-10T00:15:00.000Z'; | ||
|
||
const mobileTransactionDetailsPageHref = url.format({ | ||
pathname: '/app/apm/mobile-services/synth-android/transactions/view', | ||
query: { | ||
rangeFrom: start, | ||
rangeTo: end, | ||
transactionName: 'Start View - View Appearing', | ||
}, | ||
}); | ||
|
||
describe('Mobile transaction details page', () => { | ||
before(() => { | ||
synthtrace.index( | ||
generateMobileData({ | ||
from: new Date(start).getTime(), | ||
to: new Date(end).getTime(), | ||
}) | ||
); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.loginAsViewerUser(); | ||
}); | ||
|
||
after(() => { | ||
synthtrace.clean(); | ||
}); | ||
|
||
it('opens the action menu popup when clicking the investigate button', () => { | ||
cy.visitKibana(mobileTransactionDetailsPageHref); | ||
cy.getByTestSubj('apmActionMenuButtonInvestigateButton').click(); | ||
cy.getByTestSubj('apmActionMenuInvestigateButtonPopup'); | ||
}); | ||
}); |
51 changes: 51 additions & 0 deletions
51
x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/trace_explorer/trace_explorer.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import url from 'url'; | ||
import { synthtrace } from '../../../../synthtrace'; | ||
import { opbeans } from '../../../fixtures/synthtrace/opbeans'; | ||
|
||
const start = '2021-10-10T00:00:00.000Z'; | ||
const end = '2021-10-10T00:15:00.000Z'; | ||
|
||
const traceExplorerHref = url.format({ | ||
pathname: '/app/apm/traces/explorer', | ||
query: { | ||
environment: 'ENVIRONMENT_ALL', | ||
rangeFrom: start, | ||
rangeTo: end, | ||
}, | ||
}); | ||
|
||
describe('Trace Explorer', () => { | ||
before(() => { | ||
synthtrace.index( | ||
opbeans({ | ||
from: new Date(start).getTime(), | ||
to: new Date(end).getTime(), | ||
}) | ||
); | ||
|
||
cy.updateAdvancedSettings({ | ||
'observability:apmTraceExplorerTab': true, | ||
}); | ||
}); | ||
|
||
after(() => { | ||
synthtrace.clean(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.loginAsViewerUser(); | ||
}); | ||
|
||
it('opens the action menu popup when clicking the investigate button', () => { | ||
cy.visitKibana(traceExplorerHref); | ||
cy.getByTestSubj('apmActionMenuButtonInvestigateButton').click(); | ||
cy.getByTestSubj('apmActionMenuInvestigateButtonPopup'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment: Almost every test generates 15min of data. I wonder if we should reduce it to 1 min, and only increase the time range where needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think that this will reduce the execution time?