From 710a3498a51f17abebf5038560451cab6d72d050 Mon Sep 17 00:00:00 2001 From: "Kyle J. Kemp" Date: Fri, 1 Feb 2019 09:58:52 -0600 Subject: [PATCH 1/2] docs(modal): fix typo with returning header (#17333) --- core/src/components/modal/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/modal/readme.md b/core/src/components/modal/readme.md index 17fd4d2547..9830a856c9 100644 --- a/core/src/components/modal/readme.md +++ b/core/src/components/modal/readme.md @@ -36,7 +36,7 @@ instance.prop2 = value2; This way, your component can access the passed params, check the "Usage" section for further code example for each frameworks. -### Retuning data +### Returning data Modals can also return data back to the controller when they are dismissed. From bdcf1686d87ee5d0be5b90c5345aef04f903f80c Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 1 Feb 2019 11:01:11 -0500 Subject: [PATCH 2/2] test(searchbar): update searchbar tests to take focused ss (#17318) - gets focus test working properly - adds a no cancel button focus test this should prevent the regression in #17252 in the future --- .../components/searchbar/test/basic/e2e.ts | 27 ++++++++++++++++--- .../searchbar/test/basic/index.html | 10 +++---- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/core/src/components/searchbar/test/basic/e2e.ts b/core/src/components/searchbar/test/basic/e2e.ts index 138346ad34..bea469b781 100644 --- a/core/src/components/searchbar/test/basic/e2e.ts +++ b/core/src/components/searchbar/test/basic/e2e.ts @@ -7,10 +7,29 @@ test('searchbar: basic', async () => { await page.waitFor(250); - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); + const compares = []; + compares.push(await page.compareScreenshot()); - const searchbar = await page.find('ion-searchbar'); + let searchbar = await page.find('#basic'); await searchbar.callMethod('setFocus'); - expect(await page.compareScreenshot('focused')).toMatchScreenshot(); + + await page.waitFor(250); + searchbar = await page.find('#basic'); + expect(searchbar).toHaveClass('searchbar-has-focus'); + + compares.push(await page.compareScreenshot('focused')); + + // No Cancel Button Searchbar + searchbar = await page.find('#noCancel'); + await searchbar.callMethod('setFocus'); + + await page.waitFor(250); + searchbar = await page.find('#noCancel'); + expect(searchbar).toHaveClass('searchbar-has-focus'); + + compares.push(await page.compareScreenshot('no cancel button, focused')); + + for (const compare of compares) { + expect(compare).toMatchScreenshot(); + } }); diff --git a/core/src/components/searchbar/test/basic/index.html b/core/src/components/searchbar/test/basic/index.html index f58b911383..49cc0501f2 100644 --- a/core/src/components/searchbar/test/basic/index.html +++ b/core/src/components/searchbar/test/basic/index.html @@ -22,7 +22,11 @@
Search - Default
- + + + +
Search - No Cancel Button
+
Search - Danger
@@ -42,10 +46,6 @@ type="number" placeholder="Filter Schedules">
-
Search - No Cancel Button
- - -
Search - Custom Cancel Button Danger