From 4c039fc5a847db229df83f6fe6c138e57a3cb75f Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Mon, 2 Oct 2023 16:04:42 -0400 Subject: [PATCH] Add a test case. --- src/www/views/contact_view/index.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/www/views/contact_view/index.spec.ts b/src/www/views/contact_view/index.spec.ts index f3af08e8f23..70bacf30983 100644 --- a/src/www/views/contact_view/index.spec.ts +++ b/src/www/views/contact_view/index.spec.ts @@ -60,6 +60,18 @@ describe('ContactView client variant', () => { expect(exitCard.textContent).toContain('experiencing high support volume'); }); + it('resets the view on `reset()`', async () => { + const radioButton = el.shadowRoot!.querySelectorAll('mwc-formfield mwc-radio')[0] as HTMLElement; + radioButton.click(); + await nextFrame(); + + el.reset(); + await nextFrame(); + + const exitCard = el.shadowRoot!.querySelector('outline-card')!; + expect(exitCard).toBeNull(); + }); + describe('when the user selects that they have no open tickets', () => { let issueSelector: Select;