From 03c9f9b942cf38a1ac0efa73c0d451742fa3ea9b Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 17 Oct 2023 12:33:48 -0400 Subject: [PATCH 1/7] test(split-pane): add base test setup --- .../split-pane/test/multiple/index.html | 61 +++++++++++++++++++ .../test/multiple/split-pane.e2e.ts | 16 +++++ 2 files changed, 77 insertions(+) create mode 100644 core/src/components/split-pane/test/multiple/index.html create mode 100644 core/src/components/split-pane/test/multiple/split-pane.e2e.ts diff --git a/core/src/components/split-pane/test/multiple/index.html b/core/src/components/split-pane/test/multiple/index.html new file mode 100644 index 00000000000..332a6029b5f --- /dev/null +++ b/core/src/components/split-pane/test/multiple/index.html @@ -0,0 +1,61 @@ + + + + + Split Pane - Multiple + + + + + + + + + +
Menu Content One
+
+ +
+ + Page Content One + + +
+
+ + + +
Menu Content Two
+
+ +
+ + Page Content Two + + +
+
+ + + + diff --git a/core/src/components/split-pane/test/multiple/split-pane.e2e.ts b/core/src/components/split-pane/test/multiple/split-pane.e2e.ts new file mode 100644 index 00000000000..c51fb5531dc --- /dev/null +++ b/core/src/components/split-pane/test/multiple/split-pane.e2e.ts @@ -0,0 +1,16 @@ +import { expect } from '@playwright/test'; +import { configs, test, Viewports } from '@utils/test/playwright'; + +configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { + test.describe(title('split-pane: multiple'), () => { + test('using multiple split panes should not hide a menu in another split pane', async ({ page }) => { + await page.setViewportSize(Viewports.large); + await page.goto(`/src/components/split-pane/test/multiple`, config); + + const menuOne = page.locator('ion-menu#menu-one'); + const menuTwo = page.locator('ion-menu#menu-two'); + + await expect(menuOne).toBeVisible(); + }); + }); +}); From 2ef1f1ef262f1e924c8b8f6924383927b89afd96 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 17 Oct 2023 12:45:02 -0400 Subject: [PATCH 2/7] add failing test --- .../split-pane/test/multiple/index.html | 2 +- .../split-pane/test/multiple/split-pane.e2e.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/src/components/split-pane/test/multiple/index.html b/core/src/components/split-pane/test/multiple/index.html index 332a6029b5f..cc7a0d28082 100644 --- a/core/src/components/split-pane/test/multiple/index.html +++ b/core/src/components/split-pane/test/multiple/index.html @@ -21,7 +21,7 @@
Page Content One - +
diff --git a/core/src/components/split-pane/test/multiple/split-pane.e2e.ts b/core/src/components/split-pane/test/multiple/split-pane.e2e.ts index c51fb5531dc..c18cd67cb21 100644 --- a/core/src/components/split-pane/test/multiple/split-pane.e2e.ts +++ b/core/src/components/split-pane/test/multiple/split-pane.e2e.ts @@ -4,12 +4,28 @@ import { configs, test, Viewports } from '@utils/test/playwright'; configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { test.describe(title('split-pane: multiple'), () => { test('using multiple split panes should not hide a menu in another split pane', async ({ page }) => { + test.info().annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/18683', + }); + await page.setViewportSize(Viewports.large); await page.goto(`/src/components/split-pane/test/multiple`, config); const menuOne = page.locator('ion-menu#menu-one'); const menuTwo = page.locator('ion-menu#menu-two'); + const showPaneOne = page.locator('button#show-pane-one'); + const showPaneTwo = page.locator('button#show-pane-two'); + + await expect(menuOne).toBeVisible(); + + await showPaneTwo.click(); + + await expect(menuTwo).toBeVisible(); + + await showPaneOne.click(); + await expect(menuOne).toBeVisible(); }); }); From 30ecadb828dc0e542ec53b6dc91375d088e32dde Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 17 Oct 2023 13:03:27 -0400 Subject: [PATCH 3/7] fix test --- core/src/components/split-pane/test/multiple/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/split-pane/test/multiple/index.html b/core/src/components/split-pane/test/multiple/index.html index cc7a0d28082..8058da1718c 100644 --- a/core/src/components/split-pane/test/multiple/index.html +++ b/core/src/components/split-pane/test/multiple/index.html @@ -34,7 +34,7 @@
Page Content Two - +
From d4377c21499c9e544a931cd057159081d9096bbd Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 17 Oct 2023 14:49:35 -0400 Subject: [PATCH 4/7] add more menus --- .../split-pane/test/multiple/index.html | 16 ++++++++++++---- .../split-pane/test/multiple/split-pane.e2e.ts | 16 +++++++++++----- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/core/src/components/split-pane/test/multiple/index.html b/core/src/components/split-pane/test/multiple/index.html index 8058da1718c..6997755b3ef 100644 --- a/core/src/components/split-pane/test/multiple/index.html +++ b/core/src/components/split-pane/test/multiple/index.html @@ -14,8 +14,8 @@ - -
Menu Content One
+ +
Split One Menu Two
@@ -24,11 +24,15 @@
+ + +
Split One Menu Two
+
- -
Menu Content Two
+ +
Split Two Menu One
@@ -37,6 +41,10 @@
+ + +
Split Two Menu Two
+