From 3a18f0716634a034652d7208263ae47522f0efb6 Mon Sep 17 00:00:00 2001 From: Markus Bucher Date: Tue, 12 Mar 2024 12:52:43 +0100 Subject: [PATCH] Fixes #37240 - Fix CCV duplicate repo warning --- .../ContentViews/Publish/CVPublishForm.js | 2 +- .../__tests__/publishContentView.test.js | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/webpack/scenes/ContentViews/Publish/CVPublishForm.js b/webpack/scenes/ContentViews/Publish/CVPublishForm.js index 299c4761337..978be2e5eb1 100644 --- a/webpack/scenes/ContentViews/Publish/CVPublishForm.js +++ b/webpack/scenes/ContentViews/Publish/CVPublishForm.js @@ -66,7 +66,7 @@ const CVPublishForm = ({ ) } {!duplicateReposAlertDismissed && composite && - (duplicateRepos !== null || duplicateRepos.length > 0) && + (duplicateRepos !== null && duplicateRepos.length > 0) && ( { + const cvCompositeDetailsData = cvDetailData; + cvCompositeDetailsData.composite = true; + cvCompositeDetailsData.duplicate_repositories_to_publish = []; + const scope = nockInstance + .get(environmentPathsPath) + .query(true) + .reply(200, environmentPathsData); + const filterScope = nockInstance + .get(cvFiltersPath) + .reply(200, contentViewFilterData); + + const { getByText } = renderWithRedux( { }} + />); + + await patientlyWaitFor(() => { + expect(getByText('Publish new version - 6.0')).toBeInTheDocument(); + expect(screen.queryByText('Repositories common to the selected content view versions will merge, resulting in a composite content view that is a union of all content from each of the content view versions.')).not.toBeInTheDocument(); + }); + + assertNockRequest(scope); + assertNockRequest(filterScope, done); +}); + test('Can show Wizard and show environment paths', async (done) => { const scope = nockInstance .get(environmentPathsPath)