/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/src/components/textarea/test/textarea.spec.tsx
32 строки
1 KB
Liam DeBeasi
fix(input, textarea): bottom content is rendered correctly (#26739)
07 фев 2023, 18:11
Не верифицирован
07 фев 2023, 18:11
39009ac
Код
Авторство
О чём код?
import { newSpecPage } from '@stencil/core/testing'; import { Textarea } from '../textarea'; it('should render bottom content when helper text is defined', async () => { const page = await newSpecPage({ components: [Textarea], html: `<ion-textarea label="Textarea" helper-text="Helper Text"></ion-textarea>`, }); const bottomContent = page.body.querySelector('ion-textarea .textarea-bottom'); expect(bottomContent).not.toBe(null); }); it('should render bottom content when helper text is undefined', async () => { const page = await newSpecPage({ components: [Textarea], html: `<ion-textarea label="Textarea"></ion-textarea>`, }); const bottomContent = page.body.querySelector('ion-textarea .textarea-bottom'); expect(bottomContent).toBe(null); }); it('should render bottom content when helper text is empty string', async () => { const page = await newSpecPage({ components: [Textarea], html: `<ion-textarea label="Textarea" helper-text=""></ion-textarea>`, }); const bottomContent = page.body.querySelector('ion-textarea .textarea-bottom'); expect(bottomContent).toBe(null); });