From c103175f90568b82e754a4ef462dd3c435976a23 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 14:11:15 +0000 Subject: [PATCH 1/4] Initial plan From 4714d6a87dd0c4b998a4aca3d5ba59e924b11e0a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 14:24:46 +0000 Subject: [PATCH 2/4] Add extended UI smoke tests for samples/getting-started Agent-Logs-Url: https://github.com/vharseko/OpenIDM/sessions/2edda964-9097-40b3-9951-bcfc868b2854 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com> --- e2e/getting-started.spec.mjs | 122 +++++++++++++++++++++++++++++++++++ e2e/helpers.mjs | 97 ++++++++++++++++++++++++++++ e2e/ui-smoke-test.spec.mjs | 89 +++---------------------- 3 files changed, 229 insertions(+), 79 deletions(-) create mode 100644 e2e/getting-started.spec.mjs create mode 100644 e2e/helpers.mjs diff --git a/e2e/getting-started.spec.mjs b/e2e/getting-started.spec.mjs new file mode 100644 index 000000000..b65b10616 --- /dev/null +++ b/e2e/getting-started.spec.mjs @@ -0,0 +1,122 @@ +/* + * The contents of this file are subject to the terms of the Common Development and + * Distribution License (the License). You may not use this file except in compliance with the + * License. + * + * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the + * specific language governing permission and limitations under the License. + * + * When distributing Covered Software, include this CDDL Header Notice in each file and include + * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL + * Header, with the fields enclosed by brackets [] replaced by your own identifying + * information: "Portions copyright [year] [name of copyright owner]". + * + * Copyright 2026 3A Systems, LLC. + */ + +// @ts-check +import { test, expect } from "@playwright/test"; +import { BASE_URL, assertNoErrors, clickDropdownItem, loginToAdmin } from "./helpers.mjs"; + +const IS_GETTING_STARTED = process.env.OPENIDM_SAMPLE === "samples/getting-started"; +const MAPPING_NAME = "HumanResources_Engineering"; +const MAPPING_PROPERTIES_URL = `${BASE_URL}/admin/#properties/${MAPPING_NAME}/`; +const ENGINEERING_LIST_URL = `${BASE_URL}/admin/#resource/system/engineering/account/list/`; + +async function openMappingsPage(page) { + await clickDropdownItem(page, /configure/i, "#mapping/"); + await expect(page.locator(".mapping-config-body").filter({ hasText: MAPPING_NAME }).first()) + .toBeVisible({ timeout: 30000 }); +} + +async function openMappingProperties(page) { + await page.goto(MAPPING_PROPERTIES_URL); + await expect(page.locator("h1")).toContainText(MAPPING_NAME, { timeout: 30000 }); + await page.locator("#propertiesTab").waitFor({ state: "visible", timeout: 30000 }); + await expect(page.locator("#propertiesTab")).toHaveClass(/active/, { timeout: 30000 }); + await expect(page.locator("#attributesGridHolder")).toBeVisible({ timeout: 30000 }); +} + +async function chooseJaneSanchezSample(page) { + // Selectize replaces the original with a - // generated text input named "-selectized" that the user actually types into. - const sampleSourceInput = page.locator("#findSampleSource-selectized"); + // Selectize is initialized on the original ). Instead it inserts + // a `.selectize-control` wrapper next to the now-hidden . + const sampleSourceInput = page.locator( + '.selectize-control input[placeholder="Search to see preview"]' + ).first(); await sampleSourceInput.waitFor({ state: "visible", timeout: 30000 }); await sampleSourceInput.click(); - await sampleSourceInput.fill("Sanchez"); - - const janeOption = page.locator(".selectize-dropdown .option, .selectize-dropdown .fr-search-option") - .filter({ hasText: /Jane[\s\S]*Sanchez/i }) + // selectize listens to keydown/keyup events to fire its `load` callback, so + // typing one character at a time (instead of `fill`, which only sets value + + // dispatches a single input event) is required to populate the dropdown. + await sampleSourceInput.pressSequentially("Sanchez", { delay: 80 }); + + const janeOption = page + .locator(".selectize-dropdown.active .option, .selectize-dropdown.active .fr-search-option") + .filter({ hasText: /Jane[\s\S]*Sanchez|Sanchez[\s\S]*Jane/i }) .first(); await janeOption.waitFor({ state: "visible", timeout: 15000 }); await janeOption.click(); From 78e4e7144b2273d72afa4ef1ff5b046e9114293e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 16:07:14 +0000 Subject: [PATCH 4/4] Fix selectize dropdown option locator (drop incorrect .active class) Agent-Logs-Url: https://github.com/vharseko/OpenIDM/sessions/e5755235-512c-482d-a409-8039431ee2a8 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com> --- e2e/getting-started.spec.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/getting-started.spec.mjs b/e2e/getting-started.spec.mjs index c435a5e4f..627c7c510 100644 --- a/e2e/getting-started.spec.mjs +++ b/e2e/getting-started.spec.mjs @@ -54,7 +54,7 @@ async function chooseJaneSanchezSample(page) { await sampleSourceInput.pressSequentially("Sanchez", { delay: 80 }); const janeOption = page - .locator(".selectize-dropdown.active .option, .selectize-dropdown.active .fr-search-option") + .locator(".selectize-dropdown .option, .selectize-dropdown .fr-search-option") .filter({ hasText: /Jane[\s\S]*Sanchez|Sanchez[\s\S]*Jane/i }) .first(); await janeOption.waitFor({ state: "visible", timeout: 15000 });