Commit 6722462e authored by Jannik Lehmann's avatar Jannik Lehmann

Enhanced Specs

parent 2cc869a4
......@@ -34,6 +34,7 @@ describe('User Popover Component', () => {
const findUserStatus = () => wrapper.find('.js-user-status');
const findTarget = () => document.querySelector('.js-user-link');
const findUserName = () => wrapper.find(UserNameWithStatus);
const findSecurityBotDocsLink = () => findByTestId('user-popover-bot-docs-link');
const createWrapper = (props = {}, options = {}) => {
wrapper = shallowMount(UserPopover, {
......@@ -83,6 +84,12 @@ describe('User Popover Component', () => {
expect(iconEl.props('name')).toEqual('location');
});
it("should not show a link to bot's documentation", () => {
createWrapper();
const securityBotDocsLink = findSecurityBotDocsLink();
expect(securityBotDocsLink.exists()).toBe(false);
});
});
describe('job data', () => {
......@@ -235,7 +242,6 @@ describe('User Popover Component', () => {
websiteUrl: '/security/bot/docs',
bot: true,
};
const findSecurityBotDocsLink = () => findByTestId('user-popover-bot-docs-link');
it("shows a link to the bot's documentation", () => {
createWrapper({ user: SECURITY_BOT_USER });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment