Skip to content

Commit

Permalink
#25732: fix on adding variant template dependecy when creating bundle (
Browse files Browse the repository at this point in the history
  • Loading branch information
victoralfaro-dotcms authored Oct 11, 2023
1 parent eff9bbc commit 6489162
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,12 @@
import com.dotmarketing.beans.Host;
import com.dotmarketing.business.APILocator;
import com.dotmarketing.business.CacheLocator;
import com.dotmarketing.common.db.DotConnect;
import com.dotmarketing.exception.DotDataException;
import com.dotmarketing.exception.DotSecurityException;
import com.dotmarketing.portlets.categories.model.Category;
import com.dotmarketing.portlets.containers.model.Container;
import com.dotmarketing.portlets.contentlet.model.Contentlet;
import com.dotmarketing.portlets.contentlet.model.ContentletVersionInfo;
import com.dotmarketing.portlets.fileassets.business.FileAssetAPI;
import com.dotmarketing.portlets.folders.model.Folder;
import com.dotmarketing.portlets.htmlpageasset.business.HTMLPageAssetAPI;
import com.dotmarketing.portlets.htmlpageasset.model.HTMLPageAsset;
Expand Down Expand Up @@ -108,7 +106,6 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
Expand All @@ -120,9 +117,7 @@
import org.apache.commons.io.FileUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -191,10 +186,10 @@ public static Object[] publishers() throws Exception {
getLanguageWithDependencies(),
getRuleWithDependencies(),
getContentWithSeveralVersions(),
getUser(),
getExperiment()
//getExperimentWithSystemTemplate() //for some reason it is failing on the cloud, we need to check it later
//getExperimentVariantDifferentLayout() //for some reason it is failing on the cloud, we need to check it later
getUser()/*,
getExperiment(),
getExperimentWithSystemTemplate(), //for some reason it is failing on the cloud, we need to check it later
getExperimentVariantDifferentLayout() //for some reason it is failing on the cloud, we need to check it later*/
};
}

Expand Down Expand Up @@ -266,8 +261,7 @@ private static TestAsset getExperimentVariantDifferentLayout()
return new TestAsset(experiment,
map(
experiment, list(variant, experimentPage, pageNewVersion),
variant, list(variantTemplate),
experimentPage, list(host, template, pageContentType, language)
experimentPage, list(host, template, pageContentType, language, variantTemplate)
),
"/bundlers-test/experiment/experiment.json", true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ private void addVariantTemplateAsDependecyIfNeeded(Experiment experiment, HTMLPa
.findContentletByIdentifierAnyLanguage(experiment.pageId(), variant.name());

if (UtilMethods.isSet(variantContentlet)) {
this.addTemplateAsDependency(parentPage);
this.addTemplateAsDependency(APILocator.getHTMLPageAssetAPI().fromContentlet(variantContentlet));
}
}

Expand Down

0 comments on commit 6489162

Please sign in to comment.