-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core/chip): adjust width on outline variant (#1312)
- Loading branch information
1 parent
e74e830
commit f4eeebf
Showing
10 changed files
with
92 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@siemens/ix': patch | ||
--- | ||
|
||
fix(core/chip): adjust width on outline variant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
import { test } from '@utils/test'; | ||
import { expect } from '@playwright/test'; | ||
|
||
test('renders', async ({ mount, page }) => { | ||
await mount(`<ix-chip></ix-chip>`); | ||
const datePicker = page.locator('ix-chip'); | ||
await expect(datePicker).toHaveClass(/hydrated/); | ||
}); | ||
|
||
test.describe('chip test', () => { | ||
test.beforeEach(async ({ mount }) => { | ||
await mount( | ||
` | ||
<ix-chip>Label</ix-chip> | ||
<ix-chip outline>Label</ix-chip> | ||
` | ||
); | ||
}); | ||
|
||
test('outline and normal variant should have the same width', async ({ | ||
page, | ||
}) => { | ||
await page.waitForSelector('ix-chip'); | ||
|
||
const normalChipElement = page.locator('ix-chip').first(); | ||
const outlineChipElement = page.locator('ix-chip').last(); | ||
|
||
const normalChipSize = await normalChipElement.boundingBox(); | ||
const outlineChipSize = await outlineChipElement.boundingBox(); | ||
|
||
expect(normalChipSize.width).toEqual(outlineChipSize.width); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+299 Bytes
(100%)
...chip/chip.e2e.ts-snapshots/chip-basic-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+326 Bytes
(100%)
...hip/chip.e2e.ts-snapshots/chip-basic-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+446 Bytes
(100%)
...hip/chip.e2e.ts-snapshots/chip-custom-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+282 Bytes
(100%)
...ip/chip.e2e.ts-snapshots/chip-custom-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+89 Bytes
(100%)
...pill/pill.e2e.ts-snapshots/pill-basic-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+90 Bytes
(100%)
...ill/pill.e2e.ts-snapshots/pill-basic-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.