From ec1e258682107db266a894ec085365cef81a72a3 Mon Sep 17 00:00:00 2001 From: Benjamin Kane Date: Fri, 20 Sep 2024 10:45:18 -0400 Subject: [PATCH 1/3] fix fallback slice --- app/packages/state/src/hooks/useSetExpandedSample.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/packages/state/src/hooks/useSetExpandedSample.ts b/app/packages/state/src/hooks/useSetExpandedSample.ts index d5f7f270be..13ac9475e8 100644 --- a/app/packages/state/src/hooks/useSetExpandedSample.ts +++ b/app/packages/state/src/hooks/useSetExpandedSample.ts @@ -27,9 +27,9 @@ export default () => { .filter(({ mediaType }) => !THREE_D.has(mediaType)) .map(({ name }) => name) .sort()[0]; - } - set(groupAtoms.modalGroupSlice, fallback); + set(groupAtoms.modalGroupSlice, fallback); + } }, [] ); From 1b5757beda5a6a129ace0f71f391c82d402b8311 Mon Sep 17 00:00:00 2001 From: Benjamin Kane Date: Tue, 24 Sep 2024 14:26:45 -0400 Subject: [PATCH 2/3] group slice assertion when navigating samples --- e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts b/e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts index a4178cd2ef..be528ecd97 100644 --- a/e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts +++ b/e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts @@ -92,6 +92,12 @@ test.describe("quickstart-groups", () => { expect(await modal.sidebar.getSampleFilepath(false)).toEqual( FIRST_SAMPLE_FILENAME ); + + await modal.navigateSlice("group", "right"); + await modal.navigateNextSample(); + expect(await modal.sidebar.getSidebarEntryText("group.name")).toEqual( + "right" + ); }); test("group media visibility toggle works", async ({ modal }) => { From 9986cc47880f8690c1c1bd10e741c16959d7d48b Mon Sep 17 00:00:00 2001 From: Benjamin Kane Date: Tue, 24 Sep 2024 15:48:14 -0400 Subject: [PATCH 3/3] fix test --- e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts b/e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts index be528ecd97..9a52106600 100644 --- a/e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts +++ b/e2e-pw/src/oss/specs/smoke-tests/quickstart-groups.spec.ts @@ -93,7 +93,8 @@ test.describe("quickstart-groups", () => { FIRST_SAMPLE_FILENAME ); - await modal.navigateSlice("group", "right"); + await modal.sidebar.toggleSidebarGroup("GROUP"); + await modal.navigateSlice("group.name", "right"); await modal.navigateNextSample(); expect(await modal.sidebar.getSidebarEntryText("group.name")).toEqual( "right"