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

CI S2 Internal Pipeline Runs with CCV2 #19365

Open
wants to merge 38 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2e4dc16
Test with internal ccv2 env
giancorderoortiz Oct 2, 2024
beb6af0
Merge branch 'develop' into feature/CXSPA-8580_ccv2_ci_trials
giancorderoortiz Oct 2, 2024
ef2b4b7
force run all tests
giancorderoortiz Oct 2, 2024
ac6732f
Merge branch 'feature/CXSPA-8580_ccv2_ci_trials' of https://github.co…
giancorderoortiz Oct 2, 2024
8061c12
Run prettier fix
giancorderoortiz Oct 2, 2024
3309062
Fix typo
giancorderoortiz Oct 2, 2024
245ea1e
Merge branch 'develop' into feature/CXSPA-8580_ccv2_ci_trials
giancorderoortiz Oct 3, 2024
8b450b2
Merge branch 'develop' into feature/CXSPA-8580_ccv2_ci_trials
giancorderoortiz Oct 4, 2024
3968390
Merge branch 'develop' into feature/CXSPA-8580_ccv2_ci_trials
giancorderoortiz Oct 7, 2024
67ca3e8
Merge branch 'develop' into feature/CXSPA-8580_ccv2_ci_trials
giancorderoortiz Oct 8, 2024
2d7c6ee
Update B2B Replenishment Tests
giancorderoortiz Oct 8, 2024
93cecf9
Merge branch 'develop' into feature/CXSPA-8580_ccv2_ci_trials
giancorderoortiz Oct 8, 2024
eb89fca
Ran prettier fix. Placeholder for further comments
giancorderoortiz Oct 8, 2024
a565ffd
Run through internal pipeline. CCV2 server
giancorderoortiz Oct 8, 2024
47636c2
Use s2 server
giancorderoortiz Oct 8, 2024
bec894e
Merge branch 'develop' into feature-CXSPA-8580_ccv2_s2_ci_trials
giancorderoortiz Oct 9, 2024
6bdbd7e
Merge branch 'develop' into feature-CXSPA-8580_ccv2_s2_ci_trials
giancorderoortiz Oct 16, 2024
56fcbf9
Merge branch 'feature-CXSPA-8580_ccv2_s2_ci_trials' of https://github…
giancorderoortiz Oct 17, 2024
1d22018
Merge branch 'develop' into feature-CXSPA-8580_ccv2_s2_ci_trials
giancorderoortiz Oct 17, 2024
90e2d51
Merge branch 'develop' into feature-CXSPA-8580_ccv2_s2_ci_trials
giancorderoortiz Oct 28, 2024
bf5e815
Merge branch 'develop' into feature-CXSPA-8580_ccv2_s2_ci_trials
giancorderoortiz Oct 28, 2024
42c8625
Merge branch 'develop' into feature-CXSPA-8580_ccv2_s2_ci_trials
giancorderoortiz Nov 7, 2024
ff97f7e
Merge branch 'develop' into feature-CXSPA-8580_ccv2_s2_ci_trials
giancorderoortiz Dec 30, 2024
9a15cb1
Merge branch 'feature-CXSPA-8580_ccv2_s2_ci_trials' of https://github…
giancorderoortiz Dec 31, 2024
6931fb1
Trigger e2e test run
giancorderoortiz Dec 31, 2024
62fb196
fix tests
rmch91 Jan 3, 2025
6f06057
Add license header
github-actions[bot] Jan 3, 2025
b32a74b
Revert "Add license header"
rmch91 Jan 3, 2025
d2ea730
Merge remote-tracking branch 'origin/develop' into feature-CXSPA-8580…
rmch91 Jan 3, 2025
7977875
Trigger Build
rmch91 Jan 3, 2025
69a06af
Merge branch 'develop' into feature-CXSPA-8580_ccv2_s2_ci_trials
rmch91 Jan 7, 2025
58db5c4
Merge branch 'develop' into feature-CXSPA-8580_ccv2_s2_ci_trials
rmch91 Jan 8, 2025
0ad2386
Trigger Build
rmch91 Jan 8, 2025
17cab78
change b2b tests
rmch91 Jan 9, 2025
9d46d85
Merge remote-tracking branch 'origin/develop' into feature-CXSPA-8580…
rmch91 Jan 9, 2025
25ddb55
remove comment
rmch91 Jan 9, 2025
6dc620c
prettier ifx
rmch91 Jan 9, 2025
e7de771
Merge remote-tracking branch 'origin/develop' into feature-CXSPA-8580…
rmch91 Jan 9, 2025
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
4 changes: 2 additions & 2 deletions .env-cmdrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dev": {
"CX_BASE_URL": "https://40.76.109.9:9002"
"CX_BASE_URL": "https://api.c432wmya2v-teamspart3-s2-public.model-t.myhybris.cloud"
},
"local": {
"CX_BASE_URL": "https://localhost:9002"
Expand All @@ -9,7 +9,7 @@
"CX_BASE_URL": "http://localhost:9002"
},
"ci": {
"CX_BASE_URL": "https://20.83.184.244:9002"
"CX_BASE_URL": "https://api.c432wmya2v-teamspart3-s2-public.model-t.myhybris.cloud"
},
"ccv2": {
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-p1-public.model-t.myhybris.cloud"
Expand Down
16 changes: 8 additions & 8 deletions ci-scripts/e2e-cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ else
echo '-----'
echo "Running Cypress end to end tests"

if [ "${GITHUB_EVENT_NAME}" == "pull_request" ]; then
if [[ "${GITHUB_HEAD_REF}" == epic/* ]]; then
# if [ "${GITHUB_EVENT_NAME}" == "pull_request" ]; then
# if [[ "${GITHUB_HEAD_REF}" == epic/* ]]; then
# npm run e2e:run:ci"${SUITE}"
# else
# npm run e2e:run:ci:core"${SUITE}"
# fi
# else
npm run e2e:run:ci"${SUITE}"
else
npm run e2e:run:ci:core"${SUITE}"
fi
else
npm run e2e:run:ci"${SUITE}"
fi
# fi
fi
3 changes: 2 additions & 1 deletion projects/storefrontapp-e2e-cypress/cypress.config.ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export default defineConfig({
},
videoUploadOnPasses: false,
env: {
API_URL: 'https://20.83.184.244:9002',
API_URL:
'https://api.c432wmya2v-teamspart3-s2-public.model-t.myhybris.cloud',
BASE_SITE: 'electronics-spa',
BASE_LANG: 'en',
BASE_CURRENCY: 'USD',
Expand Down
3 changes: 2 additions & 1 deletion projects/storefrontapp-e2e-cypress/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export default defineConfig({
env: {
CLIENT_ID: 'mobile_android',
CLIENT_SECRET: 'secret',
API_URL: 'https://40.76.109.9:9002',
API_URL:
'https://api.c432wmya2v-teamspart3-s2-public.model-t.myhybris.cloud',
BASE_SITE: 'electronics-spa',
BASE_LANG: 'en',
BASE_CURRENCY: 'USD',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ describe('Order History with orders', { testIsolation: false }, () => {
b2bCheckout.selectAccountPayment();
});

it('should enter shipping address', () => {
b2bCheckout.selectAccountShippingAddress();
it('should have shipping address', () => {
b2bCheckout.confirmAccountShippingAddress();
});

it('should select delivery mode', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ context(
b2bCheckout.selectAccountPayment();
});

it('should enter shipping address', () => {
b2bCheckout.selectAccountShippingAddress();
it('should have shipping address', () => {
b2bCheckout.confirmAccountShippingAddress();
});

it('should select delivery mode', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ context(
b2bCheckout.selectAccountPayment();
});

it('should enter shipping address', () => {
b2bCheckout.selectAccountShippingAddress();
it('should have shipping address', () => {
b2bCheckout.confirmAccountShippingAddress();
});

it('should select delivery mode', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ context(
b2bCheckout.selectAccountPayment();
});

it('should enter shipping address', () => {
b2bCheckout.selectAccountShippingAddress();
it('should have shipping address', () => {
b2bCheckout.confirmAccountShippingAddress();
});

it('should select delivery mode', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ describe('consignment tracking', () => {
cy.get('.cx-list')
.first()
.within(() => {
cy.get('.cx-code').should('contain', '300938');
cy.get('.cx-code').should('contain', '1992693');
cy.get('.btn-track').click();
});
cy.get('.cx-tracking-event-body').should('have.length', 3);
cy.get('.cx-no-tracking-heading').should('have.length', 1);

cy.get('cx-tracking-events .close').click();
cy.get('.cx-list')
.next()
.first()
.within(() => {
cy.get('.cx-code').should('contain', '1992693');
cy.get('.cx-code').should('contain', '300938');
cy.get('.btn-track').click();
});
cy.get('.cx-no-tracking-heading').should('have.length', 1);
cy.get('.cx-tracking-event-body').should('have.length', 3);
cy.get('cx-tracking-events .close').click();
cy.get('.cx-list')
.last()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
b2bUser,
cartWithB2bProductAndPremiumShipping,
costCenter,
costCenterId,
order_type,
poNumber,
POWERTOOLS_BASESITE,
Expand Down Expand Up @@ -199,6 +200,9 @@ export function selectAccountPayment() {

cy.wait('@getCart').its('response.statusCode').should('eq', 200);

cy.wait(1000);
cy.get('div > label > select').select(costCenterId);

// intercept costCenter list to get Rustic address Id which will be use in delivery addr/mode stubs
cy.wait(`@${getCostCenters}`).then((xhr) => {
if (
Expand All @@ -208,7 +212,11 @@ export function selectAccountPayment() {
// first element of Cost Center is the default one, always match the combo-box selection
b2bDeliveryAddress.id =
xhr.response.body.costCenters[0].unit.addresses[0].id;
cy.log('Cost center update required');
} else {
cy.log('Cost center update not required');
}
// cy.pause();
});
}

Expand All @@ -227,6 +235,23 @@ export function selectCreditCardPayment() {
.should('eq', 200);
}

export function confirmAccountShippingAddress() {
cy.get('.cx-checkout-title').should('contain', 'Shipping Address');
cy.get('cx-order-summary .cx-summary-partials .cx-summary-row')
.first()
.find('.cx-summary-amount')
.should('not.be.empty');

cy.get('cx-card .card-header').should('contain', 'Selected');

verifyTabbingOrder(
'cx-page-layout.MultiStepCheckoutSummaryPageTemplate',
config.shippingAddressAccount
);

cy.get('button.btn-primary').should('be.enabled').click();
}

export function selectAccountShippingAddress() {
const getCheckoutDetails = interceptCheckoutB2BDetailsEndpoint(
b2bDeliveryAddressStub,
Expand All @@ -248,8 +273,10 @@ export function selectAccountShippingAddress() {
cy.get('.cx-card-label-bold').should('not.be.empty');
});

cy.get('cx-card .card-header').should('contain', 'Selected');
cy.wait(2000);
cy.get('.card-body').click({ force: true });

cy.get('cx-card .card-header').should('contain', 'Selected');
/**
* Delivery mode PUT intercept is not in selectAccountDeliveryMode()
* because it doesn't choose a delivery mode and the intercept might have missed timing depending on cypress's performance
Expand All @@ -260,7 +287,6 @@ export function selectAccountShippingAddress() {
'getDeliveryPage'
);

// Accessibility
verifyTabbingOrder(
'cx-page-layout.MultiStepCheckoutSummaryPageTemplate',
config.shippingAddressAccount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const USER_REQUEST_ENDPOINT = 'orgUsers';
export const ORDER_REQUEST_ENDPOINT = 'replenishmentOrders';
export const poNumber = '123';
export const costCenter = 'Rustic Global';
export const costCenterId = 'Rustic_Global';
export const b2bUnit = 'Rustic';
export const replenishmentDay = '8';
export const replenishmentDate = '2100-01-01';
Expand Down
Loading