Skip to content

Commit f3e166a

Browse files
authored
fix: chip alignment (#213)
* fix: chip text is centered Should not be centered. * test: visual test for select behavior
1 parent 960ad51 commit f3e166a

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

src/autocomplete/chip.css.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default css`
3131
white-space: nowrap;
3232
flex: auto;
3333
min-width: 16px;
34-
text-align: center;
3534
}
3635
3736
.clear {

test/e2e/visual.spec.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ test('basic render', async ({ page }) => {
2121
});
2222

2323
test('basic excluding', async ({ page }) => {
24-
await page.goto('iframe.html?id=autocomplete-excluding--basic&viewMode=story/');
24+
await page.goto(
25+
'iframe.html?id=autocomplete-excluding--basic&viewMode=story/',
26+
);
2527
await expect(page).toHaveScreenshot();
2628

2729
await page.click('cosmoz-autocomplete-excluding');
@@ -35,4 +37,15 @@ test('basic excluding', async ({ page }) => {
3537

3638
await page.getByTitle('Red').locator('span').click();
3739
await expect(page).toHaveScreenshot();
38-
});
40+
});
41+
42+
test('basic select', async ({ page }) => {
43+
await page.goto('iframe.html?id=autocomplete--select&viewMode=story/');
44+
await expect(page).toHaveScreenshot();
45+
46+
await page.getByText('Choose color').click();
47+
await expect(page).toHaveScreenshot();
48+
49+
await page.getByRole('option', { name: 'Blue' }).click();
50+
await expect(page).toHaveScreenshot();
51+
});
6.59 KB
Loading
12.2 KB
Loading
6.43 KB
Loading

0 commit comments

Comments
 (0)