diff --git a/x-pack/plugins/apm/ftr_e2e/config.ts b/x-pack/plugins/apm/ftr_e2e/config.ts
index 5f919fb7f075d0..12cc8845264c23 100644
--- a/x-pack/plugins/apm/ftr_e2e/config.ts
+++ b/x-pack/plugins/apm/ftr_e2e/config.ts
@@ -35,6 +35,7 @@ async function config({ readConfigFile }: FtrConfigProviderContext) {
...xpackFunctionalTestsConfig.get('kbnTestServer.serverArgs'),
'--home.disableWelcomeScreen=true',
'--csp.strict=false',
+ '--csp.warnLegacyBrowsers=false',
// define custom kibana server args here
`--elasticsearch.ssl.certificateAuthorities=${CA_CERT_PATH}`,
],
diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/settings/custom_links.spec.ts b/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/settings/custom_links.spec.ts
new file mode 100644
index 00000000000000..eeb46db04b9d43
--- /dev/null
+++ b/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/settings/custom_links.spec.ts
@@ -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();
+ });
+});
diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/support/commands.ts b/x-pack/plugins/apm/ftr_e2e/cypress/support/commands.ts
index 31eab9507ef5e6..93dbe4ba51226e 100644
--- a/x-pack/plugins/apm/ftr_e2e/cypress/support/commands.ts
+++ b/x-pack/plugins/apm/ftr_e2e/cypress/support/commands.ts
@@ -11,8 +11,8 @@ Cypress.Commands.add('loginAsReadOnlyUser', () => {
cy.loginAs({ username: 'apm_read_user', password: 'changeme' });
});
-Cypress.Commands.add('loginAsSuperUser', () => {
- cy.loginAs({ username: 'elastic', password: 'changeme' });
+Cypress.Commands.add('loginAsPowerUser', () => {
+ cy.loginAs({ username: 'apm_power_user', password: 'changeme' });
});
Cypress.Commands.add(
diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/support/types.d.ts b/x-pack/plugins/apm/ftr_e2e/cypress/support/types.d.ts
index b47e664e0a0f8a..2d9ef090eef651 100644
--- a/x-pack/plugins/apm/ftr_e2e/cypress/support/types.d.ts
+++ b/x-pack/plugins/apm/ftr_e2e/cypress/support/types.d.ts
@@ -8,7 +8,7 @@
declare namespace Cypress {
interface Chainable {
loginAsReadOnlyUser(): void;
- loginAsSuperUser(): void;
+ loginAsPowerUser(): void;
loginAs(params: { username: string; password: string }): void;
changeTimeRange(value: string): void;
expectAPIsToHaveBeenCalledWith(params: {
diff --git a/x-pack/plugins/apm/public/components/app/Settings/customize_ui/custom_link/EmptyPrompt.tsx b/x-pack/plugins/apm/public/components/app/Settings/customize_ui/custom_link/EmptyPrompt.tsx
index 9d6a3eef3f7eb7..498e17b9c359db 100644
--- a/x-pack/plugins/apm/public/components/app/Settings/customize_ui/custom_link/EmptyPrompt.tsx
+++ b/x-pack/plugins/apm/public/components/app/Settings/customize_ui/custom_link/EmptyPrompt.tsx
@@ -17,6 +17,7 @@ export function EmptyPrompt({
}) {
return (