webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js in katello-4.3.0.rc1 vs webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js in katello-4.3.0.rc2

- old
+ new

@@ -73,20 +73,22 @@ const cvDetailsScope = nockInstance .get(cvDetailsPath) .query(true) .reply(200, cvDetailsData); - const { getByText, getAllByLabelText, queryByText } = + const { + getAllByText, getByText, getAllByLabelText, queryByText, + } = renderWithRedux(<ContentViewsPage />, renderOptions); expect(queryByText(firstCV.name)).toBeNull(); // Assert that the CV name is now showing on the screen, but wait for it to appear. await patientlyWaitFor(() => expect(queryByText(firstCV.name)).toBeInTheDocument()); expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'false'); fireEvent.click(getAllByLabelText('Actions')[0]); expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'true'); fireEvent.click(getByText('Delete')); - await patientlyWaitFor(() => expect(queryByText('Remove versions from environments')).toBeInTheDocument()); + await patientlyWaitFor(() => expect(getAllByText('Remove versions from environments')[1]).toBeInTheDocument()); assertNockRequest(scope); assertNockRequest(scopeBookmark); assertNockRequest(autocompleteScope); assertNockRequest(envPathDeleteScope); @@ -130,11 +132,11 @@ destroy_content_view: true, system_content_view_id: 2, system_environment_id: 9, key_content_view_id: 2, key_environment_id: 9, - id: '20', + id: 20, }; const cvDeleteScope = nockInstance .put(cvDeleteUrl, cvDeleteParams) .reply(202, cvDeleteResponse); @@ -164,11 +166,11 @@ expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'false'); fireEvent.click(getAllByLabelText('Actions')[0]); expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'true'); fireEvent.click(getByText('Delete')); await patientlyWaitFor(() => { - expect(queryByText('Remove versions from environments')).toBeInTheDocument(); + expect(getAllByText('Remove versions from environments')[1]).toBeInTheDocument(); expect(queryByText('Version 1.0')).toBeInTheDocument(); }); fireEvent.click(getByText('Next')); await patientlyWaitFor(() => { expect(getByText('Select lifecycle environment')).toBeInTheDocument(); @@ -208,10 +210,10 @@ }); fireEvent.click(getByText('cv2')); // Move to Review fireEvent.click(getByText('Next')); await patientlyWaitFor(() => { - expect(getByText('Review Details')).toBeInTheDocument(); + expect(getAllByText('Review details')[1]).toBeInTheDocument(); expect(getByText('Environments')).toBeInTheDocument(); expect(getByText('Content hosts')).toBeInTheDocument(); expect(getByText('1 host will be moved to content view cv2 in')).toBeInTheDocument(); expect(getByText('Activation keys')).toBeInTheDocument(); expect(getByText('1 activation key will be moved to content view cv2 in')).toBeInTheDocument();