Skip to content

Commit

Permalink
test: more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Oct 11, 2024
1 parent 34f76e6 commit de1be9e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/library-authoring/component-picker/ComponentPicker.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,19 @@ describe('<ComponentPicker />', () => {
}));
});
});

it('should return to library selection', async () => {
render(<ComponentPicker />);

expect(await screen.findByText('Test Library 1')).toBeInTheDocument();
fireEvent.click(screen.getByDisplayValue(/lib:sampletaxonomyorg1:tl1/i));

fireEvent.click(screen.getByText('Next'));

// Wait for the content library to load
await screen.findByText(/← Change Library/i);
fireEvent.click(screen.getByText(/← Change Library/i));

await screen.findByText('Select which Library would you like to reference components from.');
});
});

0 comments on commit de1be9e

Please sign in to comment.