webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js in katello-4.4.2.2 vs webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js in katello-4.5.0.rc1

- old
+ new

@@ -73,11 +73,10 @@ test('Can open Remove wizard and remove version from simple environment', async (done) => { const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl); const scope = nockInstance .get(cvVersions) - .times(2) .query(true) .reply(200, cvVersionsData); const envPathRemovalScope = nockInstance .get(environmentPathsPath) @@ -113,20 +112,19 @@ expect(getByText('Remove Version')).toBeInTheDocument(); }); fireEvent.click(getByLabelText('Select row 1')); fireEvent.click(getByText('Next')); await patientlyWaitFor(() => { - expect(getByText('Review Details')).toBeInTheDocument(); + expect(getByText('Review details')).toBeInTheDocument(); }); expect(getAllByText('qa1')[0].closest('a')) .toHaveAttribute('href', '/lifecycle_environments/4'); fireEvent.click(getAllByText('Remove')[0]); assertNockRequest(scope); assertNockRequest(autocompleteScope); assertNockRequest(envPathRemovalScope); - assertNockRequest(versionRemovalScope); - assertNockRequest(scope, done); + assertNockRequest(versionRemovalScope, done); }); test('Can open Remove wizard and remove version from environment with hosts', async (done) => { const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl); const hostAutocompleteUrl = '/hosts/auto_complete_search'; @@ -134,11 +132,10 @@ const hostSearchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0); const hostAutoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing'); const scope = nockInstance .get(cvVersions) - .times(2) .query(true) .reply(200, cvVersionsData); const envPathRemovalScope = nockInstance .get(environmentPathsPath) @@ -201,11 +198,11 @@ expect(getByText('cv2')).toBeInTheDocument(); }); fireEvent.click(getByText('cv2')); fireEvent.click(getByText('Next')); await patientlyWaitFor(() => { - expect(getByText('Review Details')).toBeInTheDocument(); + expect(getByText('Review details')).toBeInTheDocument(); expect(getByText('1 host will be moved to content view cv2 in')).toBeInTheDocument(); }); fireEvent.click(getAllByText('Remove')[0]); assertNockRequest(scope); assertNockRequest(autocompleteScope); @@ -213,12 +210,11 @@ assertNockRequest(hostSearchDelayScope); assertNockRequest(hostAutoSearchScope); assertNockRequest(hostScope); assertNockRequest(cVDropDownOptionsScope); assertNockRequest(envPathRemovalScope); - assertNockRequest(versionRemovalScope); - assertNockRequest(scope, done); + assertNockRequest(versionRemovalScope, done); }); test('Can open Remove wizard and remove version from environment with activation keys', async (done) => { const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl); const akAutocompleteUrl = '/activation_keys/auto_complete_search'; @@ -226,11 +222,10 @@ const akSearchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0); const akAutoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing'); const scope = nockInstance .get(cvVersions) - .times(2) .query(true) .reply(200, cvVersionsData); const envPathRemovalScope = nockInstance .get(environmentPathsPath) @@ -293,11 +288,11 @@ expect(getByText('cv2')).toBeInTheDocument(); }); fireEvent.click(getByText('cv2')); fireEvent.click(getByText('Next')); await patientlyWaitFor(() => { - expect(getByText('Review Details')).toBeInTheDocument(); + expect(getByText('Review details')).toBeInTheDocument(); expect(getByText('1 activation key will be moved to content view cv2 in')).toBeInTheDocument(); }); fireEvent.click(getAllByText('Remove')[0]); assertNockRequest(scope); @@ -306,8 +301,7 @@ assertNockRequest(akSearchDelayScope); assertNockRequest(akAutoSearchScope); assertNockRequest(activationKeysScope); assertNockRequest(cVDropDownOptionsScope); assertNockRequest(envPathRemovalScope); - assertNockRequest(versionRemovalScope); - assertNockRequest(scope, done); + assertNockRequest(versionRemovalScope, done); });