From 7bddc6093580b347b9e0f074a7fb3169ca17b90d Mon Sep 17 00:00:00 2001 From: jeripeierSBB Date: Tue, 8 Jun 2021 15:14:22 +0200 Subject: [PATCH] test(material/chips): prevent unintentional test success In 'MatChipInput' test, `MatInputModule` was not imported and therefore the `matInput` directive was not interpreted. If importing `MatInputModule` into the testing module, the `matInput` directive gets applied and the test 'MatChipInput basic behavior should be aria-required if the list is required' would fail because of side effects by setting the `aria-required` attribute. Obviously, `matInput` does not remove the `aria-required` attribute, while the chips implementation is doing so (chips is interpreting false as null, while `matInput` leaves 'false' as-is). --- src/material-experimental/mdc-chips/chip-input.spec.ts | 2 +- src/material/chips/chip-input.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/material-experimental/mdc-chips/chip-input.spec.ts b/src/material-experimental/mdc-chips/chip-input.spec.ts index a05c94531b65..2388927b48ee 100644 --- a/src/material-experimental/mdc-chips/chip-input.spec.ts +++ b/src/material-experimental/mdc-chips/chip-input.spec.ts @@ -238,7 +238,7 @@ describe('MDC-based MatChipInput', () => { Hello - diff --git a/src/material/chips/chip-input.spec.ts b/src/material/chips/chip-input.spec.ts index fce0f6801548..8000b6f35b41 100644 --- a/src/material/chips/chip-input.spec.ts +++ b/src/material/chips/chip-input.spec.ts @@ -247,7 +247,7 @@ describe('MatChipInput', () => { Hello -