/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/src/components/card/test/aria.spec.ts
17 строк
520 B
Sean Perkins
fix(item, card): aria-label is reflected to the inner button (#26028)
10 окт 2022, 21:19
Не верифицирован
10 окт 2022, 21:19
3c89ebe
Код
Авторство
О чём код?
import { newSpecPage } from '@stencil/core/testing'; import { Card } from '../card'; describe('card: button', () => { it('should reflect aria-label to button', async () => { const page = await newSpecPage({ components: [Card], html: `<ion-card button="true" aria-label="Test"></ion-card>`, }); const button = page.body.querySelector('ion-card')!.shadowRoot!.querySelector('button')!; const ariaLabel = button.getAttribute('aria-label'); expect(ariaLabel).toEqual('Test'); }); });