Skip to content

Commit

Permalink
test: Remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel.carrera committed Sep 26, 2024
1 parent 087ac0a commit 2ceabc2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/labs-react/search-form/spec/SearchForm.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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('');
Expand Down Expand Up @@ -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();

Expand All @@ -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);

Expand Down

0 comments on commit 2ceabc2

Please sign in to comment.