From 2ceabc2fcfd3e88205a677770e8c520b6fe1db83 Mon Sep 17 00:00:00 2001 From: "manuel.carrera" Date: Thu, 26 Sep 2024 14:41:46 -0600 Subject: [PATCH] test: Remove commented out code --- modules/labs-react/search-form/spec/SearchForm.spec.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/labs-react/search-form/spec/SearchForm.spec.tsx b/modules/labs-react/search-form/spec/SearchForm.spec.tsx index c8095d2df5..1ee8e06160 100644 --- a/modules/labs-react/search-form/spec/SearchForm.spec.tsx +++ b/modules/labs-react/search-form/spec/SearchForm.spec.tsx @@ -18,7 +18,7 @@ describe('SearchForm', () => { fireEvent.submit(screen.getByRole('search', {name: inputLabelText})); expect(cb).toHaveBeenCalledTimes(0); - // expect(screen.getByRole('combobox', {name: inputLabelText})).toHaveFocus(); + expect(screen.getByRole('combobox', {name: inputLabelText})).toHaveFocus(); }); test('Searching empty string should call callback, when allowEmptyStringSearch is true', () => { @@ -60,7 +60,7 @@ describe('SearchForm', () => { inputLabel={inputLabelText} /> ); - console.log(expect(screen.getByRole('combobox')).toHaveValue(text)); //? + expect(screen.getByRole('combobox', {name: inputLabelText})).toHaveValue(text); fireEvent.click(screen.getByLabelText(label)); expect(screen.getByRole('combobox', {name: inputLabelText})).toHaveValue(''); @@ -96,7 +96,7 @@ describe('SearchForm', () => { const openButton = screen.getByLabelText(openLabel); const closeButton = screen.getByLabelText(closeLabel); - // expect(screen.queryByRole('combobox', {name: inputLabel})).toEqual(null); + expect(screen.queryByRole('combobox', {name: inputLabel})).toEqual(null); expect(closeButton).not.toBeVisible(); expect(openButton).toBeVisible(); @@ -105,7 +105,7 @@ describe('SearchForm', () => { expect(screen.getByRole('combobox', {name: inputLabel})).toBeVisible(); expect(closeButton).toBeVisible(); expect(openButton).not.toBeVisible(); - // expect(screen.getByRole('combobox', {name: inputLabel})).toHaveFocus(); + expect(screen.getByRole('combobox', {name: inputLabel})).toHaveFocus(); fireEvent.click(closeButton);