Commit 956554b2 authored by Fernando's avatar Fernando

Update snapshotting of unit test

* Refer to correct element
parent 6079c1d9
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AddLicenseForm template does not show dropdown descriptions, if licenseComplianceDeniesMr feature flag is disabled 1`] = `undefined`;
exports[`AddLicenseForm template does not show dropdown descriptions, if licenseComplianceDeniesMr feature flag is disabled 1`] = `
<div
class="form-check"
>
<input
aria-describedby="js-approved-license-radio"
class="form-check-input"
data-qa-selector="approved_license_radio"
id="js-approved-license-radio"
type="radio"
value="approved"
/>
<label
class="form-check-label pt-1"
for="js-approved-license-radio"
>
Allow
</label>
<!---->
</div>
`;
exports[`AddLicenseForm template does not show dropdown descriptions, if licenseComplianceDeniesMr feature flag is disabled 2`] = `
<div
class="form-check"
>
<input
aria-describedby="js-blacklisted-license-radio"
class="form-check-input"
data-qa-selector="blacklisted_license_radio"
id="js-blacklisted-license-radio"
type="radio"
value="blacklisted"
/>
<label
class="form-check-label pt-1"
for="js-blacklisted-license-radio"
>
Deny
</label>
<!---->
</div>
`;
......@@ -154,9 +154,10 @@ describe('AddLicenseForm', () => {
vm = mountComponent(Component, { managedLicenses: [{ name: 'FOO' }] });
vm.licenseName = 'FOO';
Vue.nextTick(() => {
const formCheckElement = vm.$el.querySelector('.form-check');
const formCheckElements = vm.$el.querySelectorAll('.form-check');
expect(formCheckElement.element).toMatchSnapshot();
expect(formCheckElements[0]).toMatchSnapshot();
expect(formCheckElements[1]).toMatchSnapshot();
done();
});
});
......
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