Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIF-2007 - Use latest releases of CIF Add-on for IT and UI tests #132

Merged
merged 6 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions .circleci/ci/it-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,39 @@
const ci = new (require('./ci.js'))();
ci.context();
const qpPath = '/home/circleci/cq';
const buildPath = '/home/circleci/build';
const { TYPE, BROWSER } = process.env;

try {
ci.stage("Integration Tests");
let veniaVersion = ci.sh('mvn help:evaluate -Dexpression=project.version -q -DforceStdout', true);
let cifVersion = ci.sh('mvn help:evaluate -Dexpression=core.cif.components.version -q -DforceStdout', true);
let wcmVersion = ci.sh('mvn help:evaluate -Dexpression=core.wcm.components.version -q -DforceStdout', true);
let connectorVersion = '1.8.0-magento242ee';
let graphqlClientVersion = ci.sh('mvn help:evaluate -Dexpression=graphql.client.version -q -DforceStdout', true);
let classifier = process.env.AEM;

ci.dir(qpPath, () => {
// Connect to QP
ci.sh('./qp.sh -v bind --server-hostname localhost --server-port 55555');

// We install the graphql-client by default except with the CIF Add-On
let extras = `--bundle com.adobe.commerce.cif:graphql-client:${graphqlClientVersion}:jar`;
let extras;
if (classifier == 'classic') {
// Install CIF connector
extras += ` --bundle com.adobe.commerce.cif:cif-connector-all:${connectorVersion}:zip`;
// Download latest add-on for AEM 6.5 release from artifactory
ci.sh(`mvn -s ${buildPath}/.circleci/settings.xml com.googlecode.maven-download-plugin:download-maven-plugin:1.6.3:artifact -Partifactory-cloud -DgroupId=com.adobe.cq.cif -DartifactId=commerce-addon-aem-650-all -Dversion=LATEST -Dtype=zip -DoutputDirectory=${buildPath}/dependencies -DoutputFileName=addon-650.zip`);
extras = ` --install-file ${buildPath}/dependencies/addon-650.zip`;

// The core components are already installed in the Cloud SDK
extras += ` --bundle com.adobe.cq:core.wcm.components.all:${wcmVersion}:zip`;

} else if (classifier == 'cloud') {
// Download the CIF Add-On
ci.sh(`curl -s "${process.env.CIF_ADDON_URL}" -o cif-addon.far`);
extras = '--install-file cif-addon.far';
// Download latest add-on release from artifactory
ci.sh(`mvn -s ${buildPath}/.circleci/settings.xml com.googlecode.maven-download-plugin:download-maven-plugin:1.6.3:artifact -Partifactory-cloud -DgroupId=com.adobe.cq.cif -DartifactId=cif-cloud-ready-feature-pkg -Dversion=LATEST -Dtype=far -Dclassifier=cq-commerce-addon-authorfar -DoutputDirectory=${buildPath}/dependencies -DoutputFileName=addon.far`);
extras = ` --install-file ${buildPath}/dependencies/addon.far`;
}

// Install SNAPSHOT or current version of CIF examples bundle
if (cifVersion.endsWith('-SNAPSHOT')) {
let jar = `core-cif-components-examples-bundle-${cifVersion}.jar`;
extras += ` --install-file /home/circleci/build/dependencies/aem-core-cif-components/examples/bundle/target/${jar}`;
extras += ` --install-file ${buildPath}/dependencies/aem-core-cif-components/examples/bundle/target/${jar}`;
} else {
extras += ` --bundle com.adobe.commerce.cif:core-cif-components-examples-bundle:${cifVersion}:jar`;
}
Expand All @@ -58,7 +58,7 @@ try {
ci.sh(`./qp.sh -v start --id author --runmode author --port 4502 --qs-jar /home/circleci/cq/author/cq-quickstart.jar \
--bundle org.apache.sling:org.apache.sling.junit.core:1.0.23:jar \
${extras} \
--install-file /home/circleci/build/all/target/venia.all-${veniaVersion}-${classifier}.zip \
--install-file ${buildPath}/all/target/venia.all-${veniaVersion}-${classifier}.zip \
--vm-options \\\"-Xmx1536m -XX:MaxPermSize=256m -Djava.awt.headless=true -javaagent:${process.env.JACOCO_AGENT}=destfile=crx-quickstart/jacoco-it.exec\\\"`);
});

Expand Down
84 changes: 84 additions & 0 deletions .circleci/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
| Copyright 2021 Adobe Systems Incorporated
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<profiles>
<profile>
<id>artifactory-cloud</id>

<properties>
<releaseRepository-Id>maven-adobe-cif-release</releaseRepository-Id>
<releaseRepository-Name>maven-adobe-cif-release</releaseRepository-Name>
<releaseRepository-URL>https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-release</releaseRepository-URL>

<snapshotRepository-Id>maven-adobe-cif-snapshot</snapshotRepository-Id>
<snapshotRepository-Name>maven-adobe-cif-snapshot</snapshotRepository-Name>
<snapshotRepository-URL>https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-snapshot</snapshotRepository-URL>
</properties>

<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>maven-adobe-cif-release</id>
<name>maven-adobe-cif-release</name>
<url>https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-release</url>
</repository>
<repository>
<snapshots />
<id>maven-adobe-cif-snapshot</id>
<name>maven-adobe-cif-snapshot</name>
<url>https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-snapshot</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>maven-adobe-cif-release</id>
<name>maven-adobe-cif-release</name>
<url>https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>maven-adobe-cif-snapshot</id>
<name>maven-adobe-cif-snapshot</name>
<url>https://artifactory-uw2.adobeitc.com/artifactory/maven-adobe-cif-snapshot</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<servers>
<server>
<id>maven-adobe-cif-release</id>
<username>${env.DOCKER_USER}</username>
<password>${env.DOCKER_PASS}</password>
</server>
<server>
<id>maven-adobe-cif-snapshot</id>
<username>${env.DOCKER_USER}</username>
<password>${env.DOCKER_PASS}</password>
</server>
</servers>

</settings>
13 changes: 3 additions & 10 deletions ui.tests/test-module/specs/venia/xf-page-dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,9 @@ describe('XF Page Component Dialog', function() {
commerceTab.click();

expect($('h3=Commerce Pages')).toBeDisplayed();

if (config.aem.type === 'cloud') {
expect($('h3=Product selection')).toBeDisplayed();
expect($('h3=Category selection')).toBeDisplayed();
expect($('h3=Catalog placeholder location')).toBeDisplayed();
} else {
expect($$('h3=Product selection').length).toBe(0);
expect($$('h3=Category selection').length).toBe(0);
expect($$('h3=Catalog placeholder location').length).toBe(0);
}
expect($('h3=Product selection')).toBeDisplayed();
expect($('h3=Category selection')).toBeDisplayed();
expect($('h3=Catalog placeholder location')).toBeDisplayed();
});

});