Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/engineering_platform/assets/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4774,6 +4774,7 @@ function populateLogComponentFilter(model = latestPlatformHealth?.component_mode
select.replaceChildren(new Option(t("filter.all_ep_components"), ""));
model.forEach((component) => select.append(new Option(t(component.name_key), component.id)));
select.value = [...select.options].some((option) => option.value === selected) ? selected : "";
syncDashboardSelectPicker(select);
}
function refreshComponentLogsForFilters() {
independentLogPageStates.platform = 1;
Expand Down
14 changes: 14 additions & 0 deletions tests/engineering/dashboard.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,20 @@ test.describe("Engineering Status browser smoke", () => {
await expect(picker.locator("[role=option]")).toHaveText(["Informatie", "Debug"]);
});

test("fills the component log picker from the initial platform-health model", async ({ page }) => {
await page.goto(dashboardUrl, { waitUntil: "domcontentloaded" });
await waitForDashboardReady(page);
const select = page.locator("#logComponentFilter");
const nativeOptionCount = await select.locator("option").count();
expect(nativeOptionCount).toBeGreaterThan(1);
await page.locator("#componentLogs").evaluate((element) => { element.open = true; });
const picker = select.locator("+ .dashboard-select-picker");
await openDashboardPicker(picker);
await expect(picker.locator("[role=option]")).toHaveCount(nativeOptionCount);
await expect(picker.locator('[data-dashboard-select-value="ep_server"]')).toBeVisible();
await expect(picker.locator('[data-dashboard-select-value="file_inbox_ingress"]')).toBeVisible();
});

test("does not move focus after a pointer chooses a log-settings pulldown value", async ({ page }) => {
await page.goto(dashboardUrl, { waitUntil: "domcontentloaded" });
await waitForDashboardReady(page);
Expand Down
Loading