From 494991e9fbb61b346390d1e40d756e22fb7c7741 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 12 Apr 2019 13:23:04 -0400 Subject: [PATCH] fix(textarea): float label when a value is changed async (#18024) emits styles to the parent item on value change so that the item will get the proper class to float the label fixes #17555 fixes #17559 --- .../src/components/textarea/test/basic/e2e.ts | 12 +++++-- .../components/textarea/test/basic/index.html | 31 ++++++++----------- core/src/components/textarea/textarea.tsx | 1 + 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/core/src/components/textarea/test/basic/e2e.ts b/core/src/components/textarea/test/basic/e2e.ts index e2b86aced1..736ae9ccab 100644 --- a/core/src/components/textarea/test/basic/e2e.ts +++ b/core/src/components/textarea/test/basic/e2e.ts @@ -5,6 +5,14 @@ test('textarea: basic', async () => { url: '/src/components/textarea/test/basic?ionic:_testing=true' }); - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); + const compares = []; + + compares.push(await page.compareScreenshot()); + + page.waitFor(2000); + compares.push(await page.compareScreenshot('value changed')); + + for (const compare of compares) { + expect(compare).toMatchScreenshot(); + } }); diff --git a/core/src/components/textarea/test/basic/index.html b/core/src/components/textarea/test/basic/index.html index 3ab24fd5f8..3e69d417cf 100644 --- a/core/src/components/textarea/test/basic/index.html +++ b/core/src/components/textarea/test/basic/index.html @@ -29,7 +29,7 @@ - Fixed Label + Fixed Label @@ -38,13 +38,13 @@ - Stacked Label + Stacked Label - Floating Label - + Floating Label + @@ -58,24 +58,14 @@ - Dynamic Value - - - - - Dynamic Value - + Dynamic Value + Clear on Edit - - - Clear on Edit - -
@@ -87,17 +77,22 @@ Toggle Readonly - + Toggle Value - + Clear Value