From e05fdf9ebbbcf5071c4b9e0dd48691c9873c3c70 Mon Sep 17 00:00:00 2001 From: "Keith J. Grant" Date: Tue, 13 Apr 2021 13:11:27 -0700 Subject: [PATCH] update tests to match new ids --- .../FieldWithPrompt/FieldWithPrompt.test.jsx | 6 +++--- .../shared/WorkflowJobTemplateForm.test.jsx | 16 ++++------------ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.test.jsx b/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.test.jsx index fcc079875f..21d24444b1 100644 --- a/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.test.jsx +++ b/awx/ui_next/src/components/FieldWithPrompt/FieldWithPrompt.test.jsx @@ -61,8 +61,8 @@ describe('FieldWithPrompt', () => { ); expect(wrapper.find('.pf-c-form__label-required')).toHaveLength(1); - expect(wrapper.find('Popover[data-cy="job-template-limit"]').length).toBe( - 1 - ); + expect( + wrapper.find('Popover[data-cy="job-template-limit-tooltip"]').length + ).toBe(1); }); }); diff --git a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx index ccea65a8b9..f1e81f2fd6 100644 --- a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx +++ b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx @@ -226,22 +226,14 @@ describe('', () => { test('test changes in FieldWithPrompt', async () => { await act(async () => { - wrapper.find('TextInputBase#text-wfjt-scm-branch').prop('onChange')( - 'main' - ); - wrapper.find('TextInputBase#text-wfjt-limit').prop('onChange')( - 1234567890 - ); + wrapper.find('TextInputBase#wfjt-scm-branch').prop('onChange')('main'); + wrapper.find('TextInputBase#wfjt-limit').prop('onChange')(1234567890); }); wrapper.update(); - expect(wrapper.find('input#text-wfjt-scm-branch').prop('value')).toEqual( - 'main' - ); - expect(wrapper.find('input#text-wfjt-limit').prop('value')).toEqual( - 1234567890 - ); + expect(wrapper.find('input#wfjt-scm-branch').prop('value')).toEqual('main'); + expect(wrapper.find('input#wfjt-limit').prop('value')).toEqual(1234567890); }); test('webhooks and enable concurrent jobs functions properly', async () => {