Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('does not render the "Actions" field', () => {
createComponent({ members, tableFields: ['actions'] });
expect(within(wrapper.element).queryByTestId('col-actions')).toBe(null);
});
});
it('does not render 2FA badge when `canManageMembers` is `false`', () => {
createComponent({ member: member2faEnabled }, { canManageMembers: false });
expect(within(wrapper.element).queryByText('2FA')).toBe(null);
});
});
const queryByText = (text) => within(wrapper.element).queryByText(text);
const findAllProjectsRadio = () => queryByLabelText('All projects');
const getByText = (text, options) =>
createWrapper(within(wrapper.element).getByText(text, options));
const getByText = (text, options) =>
createWrapper(within(findModal().element).getByText(text, options));
const getByText = (text, options) =>
createWrapper(within(wrapper.element).findByText(text, options));
const getDropdownMenu = () => within(wrapper.element).getByRole('menu');
const getByTextInDropdownMenu = (text, options = {}) =>
const getByText = (text, options) =>
createWrapper(within(wrapper.element).getByText(text, options));
const withinComponent = () => within(wrapper.element);
const findAlert = () => wrapper.find(GlAlert);
const getByTextInDropdownMenu = (text, options = {}) =>
createWrapper(within(getDropdownMenu()).getByText(text, options));
const getDropdownItemByText = (text) =>