forked from bldrs-ai/Share
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add sample models Dialog * add sample model * add description to the sample model dialog * adjust shortcut models * clean up * clean up * add test + style details * clean up
- Loading branch information
1 parent
f5f872e
commit 1ae384f
Showing
6 changed files
with
265 additions
and
262 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react' | ||
import {render, screen, fireEvent} from '@testing-library/react' | ||
import SampleModelsControl from './SampleModelsControl' | ||
import {MockRoutes} from '../BaseRoutesMock.test' | ||
|
||
|
||
test('renders sample models control', async () => { | ||
const rendered = render( <MockRoutes contentElt = {<SampleModelsControl/>} />) | ||
const sampleModelsButton = screen.getByTitle('Sample Models') | ||
fireEvent.mouseOver(sampleModelsButton) | ||
fireEvent.click(sampleModelsButton) | ||
|
||
const tooltip = await rendered.findByRole('tooltip') | ||
const dialogText = await screen.findByText('wiki') | ||
|
||
expect(sampleModelsButton).toBeInTheDocument() | ||
expect(tooltip).toBeInTheDocument() | ||
expect(dialogText).toBeVisible() | ||
}) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.