Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
949a4a6
commit 96e79a8
Showing
8 changed files
with
96 additions
and
57 deletions.
There are no files selected for viewing
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
37 changes: 37 additions & 0 deletions
37
x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/settings/custom_links.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,37 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
const basePath = '/app/apm/settings/customize-ui'; | ||
|
||
describe('Custom links', () => { | ||
beforeEach(() => { | ||
cy.loginAsPowerUser(); | ||
}); | ||
|
||
it('shows empty message and create button', () => { | ||
cy.visit(basePath); | ||
cy.contains('No links found'); | ||
cy.contains('Create custom link'); | ||
}); | ||
|
||
it('creates custom link', () => { | ||
cy.visit(basePath); | ||
const emptyPrompt = cy.get('[data-test-subj="customLinksEmptyPrompt"]'); | ||
cy.contains('Create custom link').click(); | ||
cy.contains('Create link'); | ||
cy.contains('Save').should('be.disabled'); | ||
cy.get('input[name="label"]').type('foo'); | ||
cy.get('input[name="url"]').type('https://foo.com'); | ||
cy.contains('Save').should('not.be.disabled'); | ||
cy.contains('Save').click(); | ||
emptyPrompt.should('not.exist'); | ||
cy.contains('foo'); | ||
cy.contains('https://foo.com'); | ||
cy.get('[data-test-subj="editCustomLink"]').click(); | ||
cy.contains('Delete').click(); | ||
}); | ||
}); |
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
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