-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add e2e test for errors table on service overview page (#117292)
* Add e2e test for errors table on service overview page * change test flow and improve 'describe' nesting * delete no needed describe Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
d6fad0e
commit 73a2d42
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
...gins/apm/ftr_e2e/cypress/integration/read_only_user/service_overview/errors_table.spec.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,56 @@ | ||
/* | ||
* 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 serviceOverviewHref = url.format({ | ||
pathname: '/app/apm/services/opbeans-java/overview', | ||
query: { rangeFrom: start, rangeTo: end }, | ||
}); | ||
|
||
describe('Errors table', () => { | ||
before(async () => { | ||
await synthtrace.index( | ||
opbeans({ | ||
from: new Date(start).getTime(), | ||
to: new Date(end).getTime(), | ||
}) | ||
); | ||
}); | ||
|
||
after(async () => { | ||
await synthtrace.clean(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.loginAsReadOnlyUser(); | ||
}); | ||
|
||
it('errors table is populated', () => { | ||
cy.visit(serviceOverviewHref); | ||
cy.contains('opbeans-java'); | ||
cy.contains('[MockError] Foo'); | ||
}); | ||
|
||
it('navigates to the errors page', () => { | ||
cy.visit(serviceOverviewHref); | ||
cy.contains('opbeans-java'); | ||
cy.contains('a', 'View errors').click(); | ||
cy.url().should('include', '/opbeans-java/errors'); | ||
}); | ||
|
||
it('navigates to error detail page', () => { | ||
cy.visit(serviceOverviewHref); | ||
cy.contains('a', '[MockError] Foo').click(); | ||
cy.contains('div', 'Exception message'); | ||
}); | ||
}); |