Skip to content

Commit 3bbcc78

Browse files
m3hranshJenkins
authored andcommitted
OTel: Access the Custom Services Entry Point
- Add empty ModeCustomServices page as the navigable target - Register the mode (mode_registry) for Ultimate, UltimateMT and Cloud - Wire the entry point into UltimateMT (was missing) - Add E2E test + page object for navigating to the page - Update wato menu snapshot tests for all three editions CMK-36034 Change-Id: I4818bf6d753fb94d878ad6e1a64ed9fd88581914
1 parent 439bda7 commit 3bbcc78

2 files changed

Lines changed: 47 additions & 2 deletions

File tree

module_layers.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ allows = [
10061006
"cmk.multi_tenancy.shared",
10071007
"cmk.metric_backend.gui",
10081008
"cmk.otel_collector.gui",
1009-
"cmk.telemetry.gui.register",
1009+
"cmk.telemetry.gui",
10101010
"cmk.piggyback",
10111011
"cmk.robotmk.gui",
10121012
"cmk.ruleset_matcher",
@@ -1034,7 +1034,7 @@ allows = [
10341034
"cmk.liveproxyd.gui",
10351035
"cmk.metric_backend.gui.register",
10361036
"cmk.otel_collector.gui",
1037-
"cmk.telemetry.gui.register",
1037+
"cmk.telemetry.gui",
10381038
"cmk.shared_typing",
10391039
"cmk.utils.agent_registration",
10401040
"cmk.utils.config_warnings",
@@ -1780,6 +1780,7 @@ allows = [
17801780
"cmk.fields",
17811781
"cmk.gui",
17821782
"cmk.metric_backend.gui",
1783+
"cmk.otel_collector.gui",
17831784
"cmk.shared_typing.vue_formspec_components",
17841785
"cmk.telemetry.host_name_template",
17851786
]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env python3
2+
# Copyright (C) 2026 Checkmk GmbH - License: GNU General Public License v2
3+
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
4+
# conditions defined in the file COPYING, which is part of this source code package.
5+
import logging
6+
import re
7+
from typing import override
8+
9+
from playwright.sync_api import Locator
10+
11+
from tests.system.gui.testlib.playwright.helpers import DropdownListNameToID
12+
from tests.system.gui.testlib.playwright.pom.page import CmkPage
13+
14+
logger = logging.getLogger(__name__)
15+
16+
17+
class CustomServices(CmkPage):
18+
"""Represent the page `Setup -> Telemetry -> Custom Services`."""
19+
20+
page_title = "Custom Services"
21+
main_menu_name = "Custom Services"
22+
empty_state_text = "No custom services yet"
23+
24+
@override
25+
def navigate(self) -> None:
26+
logger.info("Navigate to '%s' page", self.page_title)
27+
self.click_and_wait_for_navigation(
28+
self.main_menu.setup_menu(self.main_menu_name, exact=True),
29+
frame_url=re.compile("mode=otel_custom_services"),
30+
)
31+
self.validate_page()
32+
33+
@override
34+
def validate_page(self) -> None:
35+
logger.info("Validate that current page is '%s' page", self.page_title)
36+
self.main_area.check_page_title(self.page_title)
37+
38+
@override
39+
def _dropdown_list_name_to_id(self) -> DropdownListNameToID:
40+
return DropdownListNameToID()
41+
42+
@property
43+
def empty_state(self) -> Locator:
44+
return self.main_area.locator("div.no-config-bundles")

0 commit comments

Comments
 (0)