Skip to content

Commit 646a856

Browse files
- remove highlight styles for ionic theme;
- add tests for ionic solid input;
1 parent ceb1a3d commit 646a856

File tree

2 files changed

+90
-18
lines changed

2 files changed

+90
-18
lines changed

core/src/components/input/input.ionic.scss

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -331,24 +331,6 @@
331331
--background: #{globals.$ion-primitives-neutral-100};
332332
}
333333

334-
// Input Highlight
335-
// ----------------------------------------------------------------
336-
337-
.input-highlight {
338-
@include globals.position(null, null, -1px, 0);
339-
340-
position: absolute;
341-
342-
width: 100%;
343-
height: globals.$ion-border-size-050;
344-
345-
transform: scale(0);
346-
347-
transition: transform globals.$ion-transition-time-200;
348-
349-
background: var(--border-color);
350-
}
351-
352334
// Input Focus
353335
// ----------------------------------------------------------------
354336

core/src/components/input/test/states/input.e2e.ts

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,62 @@ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screensh
137137
config
138138
);
139139

140+
const container = page.locator('.container');
141+
await expect(container).toHaveScreenshot(screenshot(`input-disabled-outline`));
142+
});
143+
});
144+
test.describe(title('solid'), () => {
145+
test('should render disabled input correctly', async ({ page }) => {
146+
await page.setContent(
147+
`
148+
<div class="container">
149+
<ion-input
150+
fill="solid"
151+
label="Email"
152+
153+
helper-text="Enter an email"
154+
counter="true"
155+
maxlength="20"
156+
disabled="true"
157+
></ion-input>
158+
159+
<ion-input
160+
fill="solid"
161+
label="Email"
162+
163+
helper-text="Enter an email"
164+
counter="true"
165+
maxlength="20"
166+
class="ion-valid has-focus"
167+
disabled="true"
168+
></ion-input>
169+
170+
<ion-input
171+
fill="solid"
172+
label="Email"
173+
174+
error-text="Please enter a valid email"
175+
counter="true"
176+
maxlength="20"
177+
class="ion-touched ion-invalid"
178+
disabled="true"
179+
></ion-input>
180+
181+
<ion-input
182+
fill="solid"
183+
label="Email"
184+
185+
helper-text="Enter an email"
186+
counter="true"
187+
maxlength="20"
188+
disabled="true"
189+
color="warning"
190+
></ion-input>
191+
</div>
192+
`,
193+
config
194+
);
195+
140196
const container = page.locator('.container');
141197
await expect(container).toHaveScreenshot(screenshot(`input-disabled-outline`));
142198
});
@@ -166,6 +222,16 @@ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screensh
166222
maxlength="20"
167223
class="has-focus"
168224
></ion-input>
225+
226+
<ion-input
227+
fill="solid"
228+
label="Email"
229+
230+
helper-text="Enter an email"
231+
counter="true"
232+
maxlength="20"
233+
class="has-focus"
234+
></ion-input>
169235
</div>
170236
`,
171237
config
@@ -223,6 +289,30 @@ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screensh
223289
await expect(container).toHaveScreenshot(screenshot(`input-readonly-outline`));
224290
});
225291
});
292+
293+
test.describe(title('solid'), () => {
294+
test('should render readonly input correctly', async ({ page }) => {
295+
await page.setContent(
296+
`
297+
<div class="container">
298+
<ion-input
299+
fill="solid"
300+
label="Email"
301+
302+
helper-text="Enter an email"
303+
counter="true"
304+
maxlength="20"
305+
readonly="true"
306+
></ion-input>
307+
</div>
308+
`,
309+
config
310+
);
311+
312+
const container = page.locator('.container');
313+
await expect(container).toHaveScreenshot(screenshot(`input-readonly-solid`));
314+
});
315+
});
226316
});
227317
});
228318
});

0 commit comments

Comments
 (0)