Check selectors value

parent 68739e70
...@@ -318,10 +318,10 @@ describe('OnDemandScansForm', () => { ...@@ -318,10 +318,10 @@ describe('OnDemandScansForm', () => {
); );
describe.each` describe.each`
profileType | query | field | profiles profileType | query | selector | profiles
${'scanner'} | ${'dastScannerProfiles'} | ${'selectedScannerProfileId'} | ${scannerProfiles} ${'scanner'} | ${'dastScannerProfiles'} | ${ScannerProfileSelector} | ${scannerProfiles}
${'site'} | ${'dastSiteProfiles'} | ${'selectedSiteProfileId'} | ${siteProfiles} ${'site'} | ${'dastSiteProfiles'} | ${SiteProfileSelector} | ${siteProfiles}
`('when there is a single $profileType profile', ({ query, field, profiles }) => { `('when there is a single $profileType profile', ({ query, selector, profiles }) => {
const [profile] = profiles; const [profile] = profiles;
beforeEach(() => { beforeEach(() => {
...@@ -334,7 +334,7 @@ describe('OnDemandScansForm', () => { ...@@ -334,7 +334,7 @@ describe('OnDemandScansForm', () => {
}); });
it('automatically selects the only available profile', () => { it('automatically selects the only available profile', () => {
expect(subject.vm[field]).toBe(profile.id); expect(subject.find(selector).attributes('value')).toBe(profile.id);
}); });
}); });
}); });
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