fix(chip): remove reflect & optimize screenshots

This commit is contained in:
Sean Perkins
2024-04-10 18:01:26 -04:00
parent 8c5b28cac2
commit 53cd9f4279
6 changed files with 5 additions and 5 deletions

View File

@ -347,7 +347,7 @@ ion-chip,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "second
ion-chip,prop,disabled,boolean,false,false,false ion-chip,prop,disabled,boolean,false,false,false
ion-chip,prop,mode,"ios" | "md",undefined,false,false ion-chip,prop,mode,"ios" | "md",undefined,false,false
ion-chip,prop,outline,boolean,false,false,false ion-chip,prop,outline,boolean,false,false,false
ion-chip,prop,shape,"rectangular" | "round" | undefined,undefined,false,true ion-chip,prop,shape,"rectangular" | "round" | undefined,undefined,false,false
ion-chip,prop,theme,"ios" | "md" | "ionic",undefined,false,false ion-chip,prop,theme,"ios" | "md" | "ionic",undefined,false,false
ion-chip,css-prop,--background ion-chip,css-prop,--background
ion-chip,css-prop,--color ion-chip,css-prop,--color

View File

@ -39,7 +39,7 @@ export class Chip implements ComponentInterface {
/** /**
* Define the Chip corner shape, when using the Ionic Theme. * Define the Chip corner shape, when using the Ionic Theme.
*/ */
@Prop({ reflect: true }) shape?: 'round' | 'rectangular'; @Prop() shape?: 'round' | 'rectangular';
render() { render() {
const { shape } = this; const { shape } = this;

View File

@ -49,15 +49,15 @@ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screensh
test.describe(title('chip: focus state'), () => { test.describe(title('chip: focus state'), () => {
test('should render focus state', async ({ page }) => { test('should render focus state', async ({ page }) => {
await page.setContent( await page.setContent(
`<ion-content class="ion-padding"> `<div id="container" class="ion-padding">
<ion-chip class="ion-focused"> <ion-chip class="ion-focused">
<ion-label>Focused</ion-label> <ion-label>Focused</ion-label>
</ion-chip> </ion-chip>
</ion-content>`, </div>`,
config config
); );
const chip = page.locator('ion-content'); const chip = page.locator('#container');
await expect(chip).toHaveScreenshot(screenshot(`chip-focused`)); await expect(chip).toHaveScreenshot(screenshot(`chip-focused`));
}); });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB