Skip to content

Commit

Permalink
fix(admin-ui): write test for all Gluu custom base UI components #290
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrydy committed Oct 27, 2021
1 parent 98d75df commit e6c76c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions app/routes/Apps/Gluu/Tests/GluuAdvancedSearch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import { I18nextProvider } from 'react-i18next'
it('Should render a required label with internationalized text', () => {
const PATTERN_ID = 'patternId'
const LIMIT_ID = 'limitId'
const container = render(
const LIMIT =1000;
render(
<I18nextProvider i18n={i18n}>
<GluuAdvancedSearch patternId={PATTERN_ID} limitId={LIMIT_ID} />
<GluuAdvancedSearch patternId={PATTERN_ID} limitId={LIMIT_ID} limit={LIMIT} />
</I18nextProvider>,
)
screen.findAllByTestId(PATTERN_ID)
//expect(container.firstChild).toHave
//expect(screen.queryByT).toBeInTheDocument;

expect(screen.getByDisplayValue("").id).toBe(PATTERN_ID);
expect(screen.getByDisplayValue(LIMIT).id).toBe(LIMIT_ID);
})
2 changes: 1 addition & 1 deletion app/routes/Apps/Gluu/Tests/GluuLabel.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { render, screen, waitFor } from '@testing-library/react'
import { render, screen, exp } from '@testing-library/react'
import GluuLabel from '../GluuLabel'
import i18n from '../../../../i18n'
import { I18nextProvider } from 'react-i18next'
Expand Down

0 comments on commit e6c76c0

Please sign in to comment.