-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(admin-ui): write test for all Gluu custom base UI components #290
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
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,26 @@ | ||
import React from 'react' | ||
import GluuSecretDetail from '../GluuSecretDetail' | ||
import { render, screen } from '@testing-library/react' | ||
import i18n from '../../../../i18n' | ||
import { I18nextProvider } from 'react-i18next' | ||
|
||
it('Test GluuSecretDetail component', () => { | ||
const LABEL = 'fields.application_type' | ||
const VALUE = 'computer' | ||
render( | ||
<I18nextProvider i18n={i18n}> | ||
<GluuSecretDetail | ||
doc_category="openid_client" | ||
doc_entry="applicationType" | ||
value={VALUE} | ||
up | ||
label={LABEL} | ||
/> | ||
</I18nextProvider>, | ||
) | ||
screen.getByText(/Application Type:/) | ||
screen.getByText('The OpenID connect Client application type.') | ||
expect( | ||
screen.getByText('The OpenID connect Client application type.'), | ||
).toHaveAttribute('data-id', 'tooltip') | ||
}) |
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