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
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
class="form-check"
>
......@@ -26,7 +26,7 @@ exports[`AddLicenseForm template does not show dropdown descriptions, if license
</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
class="form-check"
>
......
......@@ -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, {
propsData: {
managedLicenses: [{ name: 'FOO' }],
......@@ -134,7 +134,6 @@ describe('AddLicenseForm', () => {
Vue.nextTick(() => {
const descriptionElement = wrapper.findAll('.text-secondary');
const formCheckElement = wrapper.find('.form-check');
expect(descriptionElement.at(0).text()).toBe(
'Acceptable license to be used in the project',
......@@ -144,13 +143,11 @@ describe('AddLicenseForm', () => {
'Disallow merge request if detected and will instruct developer to remove',
);
expect(formCheckElement).not.toBeNull();
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.licenseName = 'FOO';
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