Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b810cc7
SITES-40396 - Add CIF IT site module with smoke tests and CI integration
alwinjoseph02 Apr 24, 2026
70b99cc
Merge branch 'master' into SITES-40396
alwinjoseph02 Apr 24, 2026
17c9049
SITES-40396: Align aggregator version with submodule parents
alwinjoseph02 Apr 27, 2026
3a4558b
SITES-40396 - Fix it/site build compatibility and update documentation
alwinjoseph02 Apr 27, 2026
326ac2b
SITES-40396 - Add GraphQL endpoint smoke test for CIF IT Site
alwinjoseph02 Apr 27, 2026
547060c
SITES-40396 - Fix CommerceTestBase always targeting ~examples OSGi co…
alwinjoseph02 Apr 27, 2026
3f75e9a
SITES-40396: Resolves the test failure issue
alwinjoseph02 Apr 27, 2026
a0dc586
SITES-40396: Updates the aem-core-cif-component version
alwinjoseph02 Apr 27, 2026
bfdd39c
SITES-40396: Adds debugger logs for test failure
alwinjoseph02 Apr 28, 2026
89a197b
SITES-40396: Removes the core-cif-components from it/site
alwinjoseph02 Apr 28, 2026
72ec485
SITES-40396: Adds aem-core-cif-component as provided it/site for comp…
alwinjoseph02 Apr 28, 2026
5c2613e
Updates the cloud docker image
alwinjoseph02 Apr 28, 2026
208ad3c
Updates the cloud docker image
alwinjoseph02 Apr 28, 2026
57ebdf9
Resolves the MaxPermSize issue
alwinjoseph02 Apr 28, 2026
932572b
SITES-40396: Reverts the debugging log
alwinjoseph02 Apr 28, 2026
49c7b96
SITES-40396: Merge with master
alwinjoseph02 Apr 29, 2026
757adc3
SITES-40396: Removes unwanted files
alwinjoseph02 Apr 29, 2026
132f64c
SITES-40396: Remove ui.frontend module and replace with static CSS
alwinjoseph02 Apr 30, 2026
b6969c8
SITES-40396: Add CIF cache invalidation IT tests and IT site smoke tests
alwinjoseph02 Apr 30, 2026
b117efc
SITES-40396: Resolves the pipeline failure
alwinjoseph02 Apr 30, 2026
08bb479
SITES-40396: Removes unwanted files
alwinjoseph02 May 4, 2026
ad2426d
SITES-40396: Adds more testcases
alwinjoseph02 May 18, 2026
9106fde
SITES-40396: Updates the configuration from get to post to resolve th…
alwinjoseph02 May 18, 2026
b4213d2
SITES-40396: Resolves the format issue
alwinjoseph02 May 18, 2026
7527893
SITES-40396: Expand CacheInvalidationIT — add PDP coverage and Classi…
alwinjoseph02 May 18, 2026
da833ec
SITES-40396: Uses category fixtures in CacheInvalidationIT and restor…
alwinjoseph02 May 18, 2026
f1a999e
SITES-40396: Fixs the flaky issues
alwinjoseph02 May 18, 2026
80a3c6c
SITES-40396: Fixs the flaky issues
alwinjoseph02 May 18, 2026
fe86219
SITES-40396: Resolves the Cacheinvalidation flaky issues
alwinjoseph02 May 18, 2026
40ec2d7
Merge branch 'master' into SITES-40396
alwinjoseph02 May 18, 2026
271042d
SITES-40396: Poll AEM up to 30s and verify Magento GET to stabilize c…
alwinjoseph02 May 18, 2026
56c0d84
SITES-40396: Extend retry+verify pattern to all CacheInvalidationIT w…
alwinjoseph02 May 18, 2026
f00febf
Merge Master branch
alwinjoseph02 May 19, 2026
3fff5ae
Merge branch 'master' into SITES-40396
alwinjoseph02 May 19, 2026
2410716
Merging the master
alwinjoseph02 May 25, 2026
c797f6d
Harden cache invalidation ITs and tidy IT site package.
alwinjoseph02 May 26, 2026
1e1fe7e
SITES-40396: Resolves cacheinvalidation issue by changing httpmethod …
alwinjoseph02 May 26, 2026
16170fe
SITES-40396: Removes the logs
alwinjoseph02 May 26, 2026
15174da
SITES-40396: Configure IT site GraphQL client from COMMERCE_ENDPOINT
alwinjoseph02 May 26, 2026
387f101
Adds debug log for url_path issue for product
alwinjoseph02 May 26, 2026
cd8f1fd
Resolves the format issue
alwinjoseph02 May 26, 2026
39cbef6
Fixs the test failure issue
alwinjoseph02 May 26, 2026
dfa8dc9
SITES-40396: Removes the debug logs
alwinjoseph02 May 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 117 additions & 4 deletions .circleci/ci/it-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const config = ci.restoreConfiguration();
console.log(config);
const qpPath = '/home/circleci/cq';
const buildPath = '/home/circleci/build';
const { TYPE, BROWSER, AEM } = process.env;
const { TYPE, BROWSER, AEM, COMMERCE_ENDPOINT, COMMERCE_INTEGRATION_TOKEN } = process.env;

const CORE_BUNDLE = 'com.adobe.commerce.cif.core-cif-components-core';
const ADDON_BUNDLE = 'com.adobe.cq.cif.commerce-addon-bundle';
Expand Down Expand Up @@ -96,19 +96,124 @@ const prepareAemForCifTests = () => {
throw new Error(`Timed out after ${AEM_READY_TIMEOUT_MS / 1000}s waiting for AEM to be ready.`);
};

// ---------------------------------------------------------------------------
// IT site OSGi bootstrap (see it/site/README.md — "CircleCI integration tests")
//
// ui.config is correct in Git but the embedded ui.config subpackage is not always
// active on pipeline Quickstart before it/http runs. Without this block, AEM uses
// CIF defaults (url_key URLs, no GraphQL caches). Values below must match:
// it/site/ui.config/.../GraphqlClientImpl~default.cfg.json
// it/site/ui.config/.../UrlProviderImpl.cfg.json
// ---------------------------------------------------------------------------
const IT_SITE_GRAPHQL_CACHE_CONFIGURATIONS = [
'cif-components-it-site/components/commerce/navigation:true:5:300',
'com.adobe.cq.commerce.core.search.services.SearchFilterService:true:10:300',
'cif-components-it-site/components/commerce/breadcrumb:true:1000:300',
'cif-components-it-site/components/commerce/product:true:50:1000',
'cif-components-it-site/components/commerce/productcollection:true:50:1000',
'cif-components-it-site/components/commerce/productlist:true:50:300'
];

const encodeOsgiFormBody = (formData) => {
const parts = [];
for (const [key, value] of Object.entries(formData)) {
if (Array.isArray(value)) {
for (const item of value) {
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(item)}`);
}
} else {
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
}
}
return parts.join('&');
};

const postOsgiConfig = (configPath, formData) => {
ci.sh(`curl -sf 'http://localhost:4502/system/console/configMgr/${configPath}' \
-H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
-u 'admin:admin' \
--data-raw '${encodeOsgiFormBody(formData)}'`);
};

// IT site commerce pages use GraphqlClientImpl~default. Apply full IT ui.config (not url/httpMethod only).
const configureItSiteGraphqlClient = () => {
if (!COMMERCE_ENDPOINT) {
console.log('Skipping GraphqlClientImpl~default: COMMERCE_ENDPOINT is not set');
return;
}

const propertyNames = [
'identifier',
'url',
'httpMethod',
'connectionTimeout',
'socketTimeout',
'maxHttpConnections',
'requestPoolTimeout',
'acceptSelfSignedCertificates',
'allowHttpProtocol',
'cacheConfigurations'
];
const formData = {
apply: true,
action: 'ajaxConfigManager',
factoryPid: 'com.adobe.cq.commerce.graphql.client.impl.GraphqlClientImpl',
identifier: 'default',
url: COMMERCE_ENDPOINT,
httpMethod: 'POST',
connectionTimeout: '5000',
socketTimeout: '5000',
maxHttpConnections: '20',
requestPoolTimeout: '2000',
acceptSelfSignedCertificates: 'true',
allowHttpProtocol: 'true',
cacheConfigurations: IT_SITE_GRAPHQL_CACHE_CONFIGURATIONS,
propertylist: propertyNames.join(',')
};
if (AEM === 'classic' || AEM === 'lts') {
formData.allowInsecure = 'true';
propertyNames.push('allowInsecure');
formData.propertylist = propertyNames.join(',');
}

postOsgiConfig('com.adobe.cq.commerce.graphql.client.impl.GraphqlClientImpl~default', formData);
};

// Mirrors it/site/ui.config/.../UrlProviderImpl.cfg.json (CI ui.config package is not always applied).
const configureItSiteUrlProvider = () => {
postOsgiConfig('com.adobe.cq.commerce.core.components.internal.services.UrlProviderImpl', {
apply: true,
action: 'ajaxConfigManager',
productPageUrlFormat: '{{page}}.html/{{url_path}}.html#{{variant_sku}}',
enableContextAwareProductUrls: 'true',
categoryPageUrlFormat: '{{page}}.html/{{url_path}}.html',
propertylist: 'productPageUrlFormat,enableContextAwareProductUrls,categoryPageUrlFormat'
});
};

try {
ci.stage("Integration Tests");
let wcmVersion = ci.sh('mvn help:evaluate -Dexpression=core.wcm.components.version -q -DforceStdout', true);
let magentoGraphqlVersion = ci.sh('mvn help:evaluate -Dexpression=magento.graphql.version -q -DforceStdout', true);
let excludedCategory;
if (AEM === 'classic') {
excludedCategory = 'junit.category.IgnoreOn65';
} else if (AEM === 'lts') {
excludedCategory = 'junit.category.IgnoreOnLts';
} else {
// LTS and cloud-ready: exclude @Category(IgnoreOnCloud) tests (same as master for LTS).
// IgnoreOnLts does not exist yet; add it when we have LTS-only @Category annotations.
excludedCategory = 'junit.category.IgnoreOnCloud';
}

// Build it/site with the appropriate profile
ci.dir('it/site', () => {
const profile = (AEM === 'classic' || AEM === 'lts') ? ' -Pclassic' : '';
ci.sh(`mvn -B clean install${profile}`);
});

let itSitePackage = (AEM === 'classic' || AEM === 'lts')
? ci.addQpFileDependency(config.modules['cif-components-it-site.all-classic'])
: ci.addQpFileDependency(config.modules['cif-components-it-site.all']);

ci.dir(qpPath, () => {
// Connect to QP
ci.sh('./qp.sh -v bind --server-hostname localhost --server-port 55555');
Expand Down Expand Up @@ -148,6 +253,7 @@ try {
${ci.addQpFileDependency(config.modules['core-cif-components-examples-apps'])} \
${ci.addQpFileDependency(config.modules['core-cif-components-examples-content'])} \
${ci.addQpFileDependency(config.modules['core-cif-components-it-tests-content'])} \
${itSitePackage} \
--vm-options \\\"-Xmx1536m ${maxMetaspace} -Djava.awt.headless=true -javaagent:${process.env.JACOCO_AGENT}=destfile=crx-quickstart/jacoco-it.exec,output=tcpserver,port=6300\\\"`);
});

Expand Down Expand Up @@ -175,15 +281,22 @@ try {
.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
.join('&')}'`);

configureItSiteGraphqlClient();
configureItSiteUrlProvider();

// Run integration tests
if (TYPE === 'integration') {
const commerceEndpoint = COMMERCE_ENDPOINT ? `-DCOMMERCE_ENDPOINT="${COMMERCE_ENDPOINT}"` : '';
const integrationToken = COMMERCE_INTEGRATION_TOKEN ? `-DCOMMERCE_INTEGRATION_TOKEN="${COMMERCE_INTEGRATION_TOKEN}"` : '';
ci.dir('it/http', () => {
ci.sh(`mvn clean verify -U -B \
-Ptest-all \
-Dexclude.category=${excludedCategory} \
-Dsling.it.instance.url.1=http://localhost:4502 \
-Dsling.it.instance.runmode.1=author \
-Dsling.it.instances=1`);
-Dsling.it.instances=1 \
${commerceEndpoint} \
${integrationToken}`);
});
}

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Ignore things generated by Java

*.class
.java-version
.classpath
.project
.settings
Expand Down Expand Up @@ -44,6 +45,7 @@ hs_err_pid*

# Javascript things
**/node_modules/**
**/node/**
**/karma-junit/**
**/coverage/**
**/test-results/**
Expand Down
2 changes: 1 addition & 1 deletion it/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ This folder contains integration tests that test all the components based on the

To execute the tests, simply run `mvn clean verify -Ptest-all`

You can also execute the tests in your favorite IDE.
You can also execute the tests in your favorite IDE.
Loading