Skip to content

Commit

Permalink
Update eula component unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Sep 29, 2022
1 parent a88a212 commit 548c8f6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion assets/js/components/Eula/Eula.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,24 @@ import { setEulaVisible } from '@state/settings';
import Eula from '.';

describe('Eula component', () => {
it('should render correctly', () => {
it('should render community eula correctly', () => {
const [statefulEula, store] = withState(<Eula />);

store.dispatch(setEulaVisible());

render(statefulEula);
expect(screen.getByRole('button')).toHaveTextContent('Accept');
expect(screen.getByText(/Trento Community/)).toBeTruthy();
});

// it('should render premium eula correctly', () => {
// const [statefulEula, store] = withState(<Eula />);

// store.dispatch(setEulaVisible());
// store.dispatch(setIsPremium());

// render(statefulEula);
// expect(screen.getByRole('button')).toHaveTextContent('Accept');
// expect(screen.getByText(/Trento Premium/)).toBeTruthy();
// });
});

0 comments on commit 548c8f6

Please sign in to comment.