Skip to content

Commit

Permalink
fix: fixed test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
preetibansalui committed Apr 24, 2024
1 parent 474bfc2 commit 4b0fc38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 137 deletions.
136 changes: 1 addition & 135 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1116,141 +1116,7 @@ Map {
"type": "bool",
},
"downshiftProps": Object {
"args": Array [
Object {
"children": Object {
"type": "func",
},
"defaultHighlightedIndex": Object {
"type": "number",
},
"defaultIsOpen": Object {
"type": "bool",
},
"environment": Object {
"args": Array [
Object {
"Node": Object {
"isRequired": true,
"type": "func",
},
"addEventListener": Object {
"isRequired": true,
"type": "func",
},
"document": Object {
"args": Array [
Object {
"activeElement": Object {
"isRequired": true,
"type": "any",
},
"body": Object {
"isRequired": true,
"type": "any",
},
"createElement": Object {
"isRequired": true,
"type": "func",
},
"getElementById": Object {
"isRequired": true,
"type": "func",
},
},
],
"isRequired": true,
"type": "shape",
},
"removeEventListener": Object {
"isRequired": true,
"type": "func",
},
},
],
"type": "shape",
},
"getA11yStatusMessage": Object {
"type": "func",
},
"getItemId": Object {
"type": "func",
},
"highlightedIndex": Object {
"type": "number",
},
"id": Object {
"type": "string",
},
"initialHighlightedIndex": Object {
"type": "number",
},
"initialInputValue": Object {
"type": "string",
},
"initialIsOpen": Object {
"type": "bool",
},
"initialSelectedItem": Object {
"type": "any",
},
"inputId": Object {
"type": "string",
},
"inputValue": Object {
"type": "string",
},
"isOpen": Object {
"type": "bool",
},
"itemCount": Object {
"type": "number",
},
"itemToString": Object {
"type": "func",
},
"labelId": Object {
"type": "string",
},
"menuId": Object {
"type": "string",
},
"onChange": Object {
"type": "func",
},
"onInputValueChange": Object {
"type": "func",
},
"onOuterClick": Object {
"type": "func",
},
"onSelect": Object {
"type": "func",
},
"onStateChange": Object {
"type": "func",
},
"onUserAction": Object {
"type": "func",
},
"scrollIntoView": Object {
"type": "func",
},
"selectedItem": Object {
"type": "any",
},
"selectedItemChanged": Object {
"type": "func",
},
"stateReducer": Object {
"type": "func",
},
"suppressRefError": Object {
"type": "bool",
},
},
],
"type": "shape",
"type": "object",
},
"helperText": Object {
"type": "node",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const prefix = 'cds';

const findInputNode = () => screen.getByRole('combobox');
const openMenu = async () => {
await userEvent.click(findInputNode());
await userEvent.click(screen.getByTitle('Open'));
};

describe('FluidComboBox', () => {
Expand Down Expand Up @@ -55,7 +55,7 @@ describe('FluidComboBox', () => {
it('should display the menu of items when a user clicks on the input', async () => {
render(<FluidComboBox {...mockProps} />);

await userEvent.click(findInputNode());
await openMenu();

assertMenuOpen(mockProps);
});
Expand Down

0 comments on commit 4b0fc38

Please sign in to comment.