Skip to content

Commit

Permalink
Merge pull request #2337 from openedx/vrusakov/sync-alpha
Browse files Browse the repository at this point in the history
sync: alpha with master
  • Loading branch information
viktorrusakov authored and PKulkoRaccoonGang committed Aug 4, 2024
1 parent 999a2eb commit a8cd687
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Tabs/Tabs.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ describe('<Tabs />', () => {
wrapper.find('.dropdown-item').at(0).simulate('keyPress', { key: 'Enter' });
expect(wrapper.find('[data-rb-event-key="tab_2"]').at(0).hasClass('active')).toEqual(true);
});
it('select dropdown item after pressing Enter', () => {
const wrapper = mount(<TabsTestComponent />);
wrapper.find('#pgn__tab-toggle').at(0).at(0).simulate('click');
wrapper.find('.dropdown-item').at(0).simulate('keyPress', { key: 'Enter' });
expect(wrapper.find('[data-rb-event-key="tab_2"]').at(0).hasClass('active')).toEqual(true);
});
it('invalid child does not render', () => {
const { getByRole } = render(
<Tabs>
Expand Down

0 comments on commit a8cd687

Please sign in to comment.