Skip to content

Commit

Permalink
fixes tests and deep links
Browse files Browse the repository at this point in the history
  • Loading branch information
ogupte committed Oct 29, 2022
1 parent b475f32 commit 6277761
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('APM deep links', () => {
cy.getByTestSubj('nav-search-input').type('APM');
cy.contains('APM');
cy.contains('APM / Services');
cy.contains('APM / Service groups');
cy.contains('APM / Traces');
cy.contains('APM / Service Map');

Expand All @@ -28,6 +29,11 @@ describe('APM deep links', () => {
cy.contains('APM / Services').click({ force: true });
cy.url().should('include', '/apm/services');

cy.getByTestSubj('nav-search-input').type('APM');
// navigates to service groups page
cy.contains('APM / Service groups').click({ force: true });
cy.url().should('include', '/apm/service-groups');

cy.getByTestSubj('nav-search-input').type('APM');
// navigates to traces page
cy.contains('APM / Traces').click({ force: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('Service inventory - header filters', () => {
specialServiceName,
})
);
cy.dismissServiceGroupsTour();
});

after(() => {
Expand Down
10 changes: 10 additions & 0 deletions x-pack/plugins/apm/ftr_e2e/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ Cypress.Commands.add(
}
);

Cypress.Commands.add('dismissServiceGroupsTour', () => {
window.localStorage.setItem(
'apm.serviceGroupsTour',
JSON.stringify({
createGroup: false,
editGroup: false,
})
);
});

// A11y configuration

const axeConfig = {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/apm/ftr_e2e/cypress/support/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ declare namespace Cypress {
}): void;
updateAdvancedSettings(settings: Record<string, unknown>): void;
getByTestSubj(selector: string): Chainable<JQuery<Element>>;
dismissServiceGroupsTour(): void;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import React from 'react';
import { ElasticDocsLink } from '../../shared/links/elastic_docs_link';

export type TourType = 'createGroup' | 'editGroup' | 'serviceGroupsAllServices';
export type TourType = 'createGroup' | 'editGroup';

interface Props {
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { TourType } from './service_groups_tour';
const INITIAL_STATE: Record<TourType, boolean> = {
createGroup: true,
editGroup: true,
serviceGroupsAllServices: true,
};

export function useServiceGroupsTour(type: TourType) {
Expand Down
9 changes: 8 additions & 1 deletion x-pack/plugins/apm/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ const servicesTitle = i18n.translate('xpack.apm.navigation.servicesTitle', {
defaultMessage: 'Services',
});

const serviceGroupsTitle = i18n.translate(
'xpack.apm.navigation.serviceGroupsTitle',
{
defaultMessage: 'Service groups',
}
);

const tracesTitle = i18n.translate('xpack.apm.navigation.tracesTitle', {
defaultMessage: 'Traces',
});
Expand Down Expand Up @@ -270,7 +277,7 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {
deepLinks: [
{
id: 'service-groups-list',
title: servicesTitle,
title: serviceGroupsTitle,
path: '/service-groups',
},
{
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -7431,7 +7431,6 @@
"xpack.apm.mlCallout.updateAvailableCalloutButtonText": "Mettre à jour les tâches",
"xpack.apm.mlCallout.updateAvailableCalloutText": "Nous avons mis à jour les tâches de détection des anomalies qui fournissent des indications sur la dégradation des performances et ajouté des détecteurs de débit et de taux de transactions ayant échoué. Si vous choisissez de mettre à jour, nous créerons les nouvelles tâches et fermerons les tâches héritées. Les données affichées dans l'application APM passeront automatiquement aux nouvelles. Veuillez noter que l'option de migration de toutes les tâches existantes ne sera pas disponible si vous choisissez de créer une nouvelle tâche.",
"xpack.apm.mlCallout.updateAvailableCalloutTitle": "Mises à jour disponibles",
"xpack.apm.navigation.allServicesTitle": "Tous les services",
"xpack.apm.navigation.apmSettingsTitle": "Paramètres",
"xpack.apm.navigation.dependenciesTitle": "Dépendances",
"xpack.apm.navigation.serviceMapTitle": "Carte des services",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -7419,7 +7419,6 @@
"xpack.apm.mlCallout.updateAvailableCalloutButtonText": "ジョブの更新",
"xpack.apm.mlCallout.updateAvailableCalloutText": "劣化したパフォーマンスに関する詳細な分析を提供する異常検知ジョブを更新し、スループットと失敗したトランザクションレートの検知機能を追加しました。アップグレードを選択する場合は、新しいジョブが作成され、既存のレガシージョブが終了します。APMアプリに表示されるデータは自動的に新しいジョブに切り替わります。新しいジョブの作成を選択した場合は、すべての既存のジョブを移行するオプションを使用できません。",
"xpack.apm.mlCallout.updateAvailableCalloutTitle": "更新が可能です",
"xpack.apm.navigation.allServicesTitle": "すべてのサービス",
"xpack.apm.navigation.apmSettingsTitle": "設定",
"xpack.apm.navigation.dependenciesTitle": "依存関係",
"xpack.apm.navigation.serviceMapTitle": "サービスマップ",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -7435,7 +7435,6 @@
"xpack.apm.mlCallout.updateAvailableCalloutButtonText": "更新作业",
"xpack.apm.mlCallout.updateAvailableCalloutText": "我们已更新有助于深入了解性能降级的异常检测作业,并添加了检测工具以获取吞吐量和失败事务率。如果您选择进行升级,我们将创建新作业,并关闭现有的旧版作业。APM 应用中显示的数据将自动切换到新数据。请注意,如果您选择创建新作业,用于迁移所有现有作业的选项将不可用。",
"xpack.apm.mlCallout.updateAvailableCalloutTitle": "可用更新",
"xpack.apm.navigation.allServicesTitle": "所有服务",
"xpack.apm.navigation.apmSettingsTitle": "设置",
"xpack.apm.navigation.dependenciesTitle": "依赖项",
"xpack.apm.navigation.serviceMapTitle": "服务地图",
Expand Down

0 comments on commit 6277761

Please sign in to comment.