Commit cfd6d159 authored by Fernando's avatar Fernando

Implement maintainer feedback

* Rename unit test desrriptions to reflect radio buttons
* Remove not so useful asssertion
parent 28227ec4
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AddLicenseForm template does not show dropdown descriptions, if licenseComplianceDeniesMr feature flag is disabled 1`] = ` exports[`AddLicenseForm template does not show radio button descriptions, if licenseComplianceDeniesMr feature flag is disabled 1`] = `
<div <div
class="form-check" class="form-check"
> >
...@@ -26,7 +26,7 @@ exports[`AddLicenseForm template does not show dropdown descriptions, if license ...@@ -26,7 +26,7 @@ exports[`AddLicenseForm template does not show dropdown descriptions, if license
</div> </div>
`; `;
exports[`AddLicenseForm template does not show dropdown descriptions, if licenseComplianceDeniesMr feature flag is disabled 2`] = ` exports[`AddLicenseForm template does not show radio button descriptions, if licenseComplianceDeniesMr feature flag is disabled 2`] = `
<div <div
class="form-check" class="form-check"
> >
......
...@@ -122,7 +122,7 @@ describe('AddLicenseForm', () => { ...@@ -122,7 +122,7 @@ describe('AddLicenseForm', () => {
}); });
}); });
it('shows dropdown descriptions, if licenseComplianceDeniesMr feature flag is enabled', done => { it('shows radio button descriptions, if licenseComplianceDeniesMr feature flag is enabled', done => {
const wrapper = shallowMount(LicenseIssueBody, { const wrapper = shallowMount(LicenseIssueBody, {
propsData: { propsData: {
managedLicenses: [{ name: 'FOO' }], managedLicenses: [{ name: 'FOO' }],
...@@ -134,7 +134,6 @@ describe('AddLicenseForm', () => { ...@@ -134,7 +134,6 @@ describe('AddLicenseForm', () => {
Vue.nextTick(() => { Vue.nextTick(() => {
const descriptionElement = wrapper.findAll('.text-secondary'); const descriptionElement = wrapper.findAll('.text-secondary');
const formCheckElement = wrapper.find('.form-check');
expect(descriptionElement.at(0).text()).toBe( expect(descriptionElement.at(0).text()).toBe(
'Acceptable license to be used in the project', 'Acceptable license to be used in the project',
...@@ -144,13 +143,11 @@ describe('AddLicenseForm', () => { ...@@ -144,13 +143,11 @@ describe('AddLicenseForm', () => {
'Disallow merge request if detected and will instruct developer to remove', 'Disallow merge request if detected and will instruct developer to remove',
); );
expect(formCheckElement).not.toBeNull();
done(); done();
}); });
}); });
it('does not show dropdown descriptions, if licenseComplianceDeniesMr feature flag is disabled', done => { it('does not show radio button descriptions, if licenseComplianceDeniesMr feature flag is disabled', done => {
vm = mountComponent(Component, { managedLicenses: [{ name: 'FOO' }] }); vm = mountComponent(Component, { managedLicenses: [{ name: 'FOO' }] });
vm.licenseName = 'FOO'; vm.licenseName = 'FOO';
Vue.nextTick(() => { Vue.nextTick(() => {
......
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