update tests to match new ids

This commit is contained in:
Keith J. Grant
2021-04-13 13:11:27 -07:00
parent 1dc3b80c68
commit e05fdf9ebb
2 changed files with 7 additions and 15 deletions

View File

@@ -61,8 +61,8 @@ describe('FieldWithPrompt', () => {
</Formik> </Formik>
); );
expect(wrapper.find('.pf-c-form__label-required')).toHaveLength(1); expect(wrapper.find('.pf-c-form__label-required')).toHaveLength(1);
expect(wrapper.find('Popover[data-cy="job-template-limit"]').length).toBe( expect(
1 wrapper.find('Popover[data-cy="job-template-limit-tooltip"]').length
); ).toBe(1);
}); });
}); });

View File

@@ -226,22 +226,14 @@ describe('<WorkflowJobTemplateForm/>', () => {
test('test changes in FieldWithPrompt', async () => { test('test changes in FieldWithPrompt', async () => {
await act(async () => { await act(async () => {
wrapper.find('TextInputBase#text-wfjt-scm-branch').prop('onChange')( wrapper.find('TextInputBase#wfjt-scm-branch').prop('onChange')('main');
'main' wrapper.find('TextInputBase#wfjt-limit').prop('onChange')(1234567890);
);
wrapper.find('TextInputBase#text-wfjt-limit').prop('onChange')(
1234567890
);
}); });
wrapper.update(); wrapper.update();
expect(wrapper.find('input#text-wfjt-scm-branch').prop('value')).toEqual( expect(wrapper.find('input#wfjt-scm-branch').prop('value')).toEqual('main');
'main' expect(wrapper.find('input#wfjt-limit').prop('value')).toEqual(1234567890);
);
expect(wrapper.find('input#text-wfjt-limit').prop('value')).toEqual(
1234567890
);
}); });
test('webhooks and enable concurrent jobs functions properly', async () => { test('webhooks and enable concurrent jobs functions properly', async () => {