mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(input): clear button uses contrast when setting color on item (#26592)
resolves #26337
This commit is contained in:
@@ -185,7 +185,7 @@ test.describe('input: clear button', () => {
|
||||
*/
|
||||
test('should keep the input focused when the clear button is pressed', async ({ page }) => {
|
||||
await page.setContent(`
|
||||
<ion-input value="abc" clear-input="true"></ion-searchbar>
|
||||
<ion-input value="abc" clear-input="true"></ion-input>
|
||||
`);
|
||||
|
||||
const input = page.locator('ion-input');
|
||||
@@ -200,4 +200,17 @@ test.describe('input: clear button', () => {
|
||||
|
||||
await expect(nativeInput).toBeFocused();
|
||||
});
|
||||
|
||||
test('should inherit color when used in item with color property', async ({ page }) => {
|
||||
await page.setContent(`
|
||||
<ion-item color="primary">
|
||||
<ion-input value="Text" clear-input="true"></ion-input>
|
||||
</ion-item>
|
||||
`);
|
||||
|
||||
const item = page.locator('ion-item');
|
||||
expect(await item.screenshot()).toMatchSnapshot(
|
||||
`input-with-clear-button-item-color-${page.getSnapshotSettings()}.png`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Reference in New Issue
Block a user