Add test for select

This commit is contained in:
Shawn Taylor
2023-11-02 11:36:43 -04:00
parent 8e80779b01
commit da02130b58
2 changed files with 26 additions and 0 deletions

View File

@@ -231,6 +231,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
await expect(input).toHaveScreenshot(screenshot(`input-label-layering`));
});
});
test.describe(title('input: floating label custom font size'), () => {
test('large label should be centered when field is not focused', async ({ page }, testInfo) => {
testInfo.annotations.push({

View File

@@ -284,7 +284,32 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
await expect(select).toHaveScreenshot(screenshot(`select-label-slot-truncate`));
});
});
test.describe(title('select: floating label custom font size'), () => {
test('large label should be centered when field is not focused', async ({ page }, testInfo) => {
testInfo.annotations.push({
type: 'issue',
description: 'https://github.com/ionic-team/ionic-framework/issues/27194',
});
await page.setContent(
`
<ion-select
style="font-size: 30px"
fill="outline"
label="Large floating label"
label-placement="floating"
></ion-select>
`,
config
);
const input = page.locator('ion-select');
await expect(input).toHaveScreenshot(screenshot('select-label-large-floating'));
});
});
});
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
test.describe(title('select: alert label'), () => {
test('should use the label prop to set the default header in an alert', async ({ page }) => {