Removing email prop and fixing test (#11108)
This commit is contained in:
parent
651f55b331
commit
c9014a7835
2 changed files with 3 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { h } from 'preact';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const ModFaqSection = ({ email, currentMembershipRole }) => {
|
||||
const ModFaqSection = ({ currentMembershipRole }) => {
|
||||
if (currentMembershipRole === 'member') {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -24,7 +24,6 @@ const ModFaqSection = ({ email, currentMembershipRole }) => {
|
|||
};
|
||||
|
||||
ModFaqSection.propTypes = {
|
||||
email: PropTypes.string.isRequired,
|
||||
currentMembershipRole: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,18 +5,17 @@ import ModFaqSection from '../ChatChannelSettings/ModFaqSection';
|
|||
|
||||
describe('<ChannelDescriptionSection />', () => {
|
||||
it('should have no a11y violations', async () => {
|
||||
const { container } = render(<ModFaqSection email="jane@doe.com" />);
|
||||
const { container } = render(<ModFaqSection />);
|
||||
const results = await axe(container);
|
||||
|
||||
expect(results).toHaveNoViolations();
|
||||
});
|
||||
|
||||
it('should render', () => {
|
||||
const { queryByText } = render(<ModFaqSection email="jane@doe.com" />);
|
||||
const { queryByText } = render(<ModFaqSection />);
|
||||
|
||||
expect(
|
||||
queryByText(/^Questions about Connect Channel moderation\? Contact/),
|
||||
).toBeDefined();
|
||||
expect(queryByText('jane@doe.com')).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue