From bad935e1b4d1cdf4aaca0b25c80bde55c8d3a812 Mon Sep 17 00:00:00 2001 From: Benjamin Kane Date: Fri, 27 Sep 2024 12:02:07 -0400 Subject: [PATCH] e2e fixes --- .../src/components/Sidebar/Entries/PathValueEntry.tsx | 9 +++++---- e2e-pw/src/oss/poms/modal/modal-sidebar.ts | 6 +++--- e2e-pw/src/oss/specs/smoke-tests/summary-fields.spec.ts | 6 ++++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/packages/core/src/components/Sidebar/Entries/PathValueEntry.tsx b/app/packages/core/src/components/Sidebar/Entries/PathValueEntry.tsx index 497622791c..d4114821fa 100644 --- a/app/packages/core/src/components/Sidebar/Entries/PathValueEntry.tsx +++ b/app/packages/core/src/components/Sidebar/Entries/PathValueEntry.tsx @@ -197,6 +197,7 @@ const ListValueEntry = ({ { event.preventDefault(); @@ -255,7 +256,7 @@ const ListLoadable = ({ path }: { path: string }) => { }, [data, field, fields, timeZone]); return ( - + {values.map((v, i) => (
{v === null ? "None" : v} @@ -531,12 +532,12 @@ const formatObject = ({ return (
- {k} - {text} + {k} + {text}
); }) diff --git a/e2e-pw/src/oss/poms/modal/modal-sidebar.ts b/e2e-pw/src/oss/poms/modal/modal-sidebar.ts index c1de8fc406..7a7ae699cc 100644 --- a/e2e-pw/src/oss/poms/modal/modal-sidebar.ts +++ b/e2e-pw/src/oss/poms/modal/modal-sidebar.ts @@ -131,10 +131,10 @@ class SidebarAsserter { for (const k in obj) { const v = obj[k]; - const entry = locator.getByTestId(`${k}-${v}`); + const entry = locator.getByTestId(`key-value-${k}-${v}`); - await expect(entry.getByTestId(k)).toHaveText(k); - await expect(entry.getByTestId(v)).toHaveText(v); + await expect(entry.getByTestId(`key-${k}`)).toHaveText(k); + await expect(entry.getByTestId(`value-${v}`)).toHaveText(v); } } diff --git a/e2e-pw/src/oss/specs/smoke-tests/summary-fields.spec.ts b/e2e-pw/src/oss/specs/smoke-tests/summary-fields.spec.ts index 2d72eb3dfd..42d492153d 100644 --- a/e2e-pw/src/oss/specs/smoke-tests/summary-fields.spec.ts +++ b/e2e-pw/src/oss/specs/smoke-tests/summary-fields.spec.ts @@ -42,6 +42,7 @@ test.describe("summary fields", () => { }); test("modal sidebar summary fields render", async ({ + eventUtils, fiftyoneLoader, grid, modal, @@ -54,7 +55,12 @@ test.describe("summary fields", () => { one: "two", three: "four", }); + const entryExpandPromise = eventUtils.getEventReceivedPromiseForPredicate( + "animation-onRest", + () => true + ); await modal.sidebar.clickFieldDropdown("summaries"); + await entryExpandPromise; await modal.sidebar.assert.verifyObject("summaries", { five: "six", seven: "eight",