Commit 2260e639 authored by Dave Pisek's avatar Dave Pisek

Reviewer feedback: specs improvements

parent 1aad3915
...@@ -5,7 +5,7 @@ import SecurityTrainingPromo from 'ee/security_dashboard/components/shared/secur ...@@ -5,7 +5,7 @@ import SecurityTrainingPromo from 'ee/security_dashboard/components/shared/secur
const SECURITY_CONFIGURATION_PATH = 'foo/bar'; const SECURITY_CONFIGURATION_PATH = 'foo/bar';
const VULNERABILITY_MANAGEMENT_TAB_NAME = 'vulnerability-management'; const VULNERABILITY_MANAGEMENT_TAB_NAME = 'vulnerability-management';
describe('ee/security_dashboard/components/shared/security_training_promo.vue', () => { describe('Security training promo component', () => {
let wrapper; let wrapper;
const createWrapper = () => const createWrapper = () =>
...@@ -27,12 +27,14 @@ describe('ee/security_dashboard/components/shared/security_training_promo.vue', ...@@ -27,12 +27,14 @@ describe('ee/security_dashboard/components/shared/security_training_promo.vue',
describe('banner', () => { describe('banner', () => {
it('should be an introduction that announces the security training feature', () => { it('should be an introduction that announces the security training feature', () => {
const { title, buttonText, content } = SecurityTrainingPromo.i18n;
expect(findBanner().props()).toMatchObject({ expect(findBanner().props()).toMatchObject({
variant: 'introduction', variant: 'introduction',
title: SecurityTrainingPromo.i18n.title, title,
buttonText: SecurityTrainingPromo.i18n.buttonText, buttonText,
}); });
expect(findBanner().text()).toBe(SecurityTrainingPromo.i18n.content); expect(findBanner().text()).toBe(content);
}); });
it(`should link to the security configuration's vulnerability management tab`, () => { it(`should link to the security configuration's vulnerability management tab`, () => {
......
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