Skip to content
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Magento PWA Studio is a collection of tools that lets developers build complex P

## Contributions


Are you interested in contributing to the PWA Studio project?
Check out the [community wiki][] to learn how to contribute to PWA Studio.

Expand Down
Binary file modified packages/venia-ui/venia-static/icons/venia_circle_144.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/venia-ui/venia-static/icons/venia_circle_192.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/venia-ui/venia-static/icons/venia_circle_512.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions venia-integration-tests/cypress.config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"baseUrl": "https://develop.pwa-venia.com",
"defaultCommandTimeout": 30000,
"defaultCommandTimeout": 90000,
"supportFile": "src/support/index.js",
"pluginsFile": "src/plugins/index.js",
"fixturesFolder": "src/fixtures",
"integrationFolder": "src/tests",
"screenshotsFolder": "src/snapshots",
"video": false,
"pageLoadTimeout": 30000,
"requestTimeout": 60000,
"pageLoadTimeout": 90000,
"requestTimeout": 120000,
"responseTimeout": 120000,
"testFiles": "**/*.spec.js",
"viewportHeight": 900,
"viewportWidth": 1440,
Expand Down
4 changes: 3 additions & 1 deletion venia-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
},
"author": "Adobe Commerce",
"license": "MIT",
"dependencies": {},
"dependencies": {
"dompurify": "~3.2.4"
},
"devDependencies": {
"cypress": "~9.4.0",
"cypress-grep": "~2.13.1",
Expand Down
91 changes: 91 additions & 0 deletions venia-integration-tests/src/support/multiStoreHelper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/**
* Helper functions for multi-store configuration checks
*/

/**
* Check if multi-store is configured by querying availableStores
* @returns {Cypress.Chainable<boolean>} - Returns true if multiple stores exist
*/
export const isMultiStoreConfigured = () => {
return cy
.request({
method: 'POST',
url: Cypress.config('baseUrl') + '/graphql',
body: {
query: `{
availableStores {
store_code
store_name
}
}`
},
failOnStatusCode: false
})
.then(response => {
if (response.status !== 200 || !response.body.data) {
cy.log('❌ Failed to fetch availableStores');
return false;
}

const stores = response.body.data.availableStores;
const storeCount = stores ? stores.length : 0;

cy.log(`📊 Found ${storeCount} store(s)`);

if (storeCount > 1) {
cy.log('✅ Multi-store IS configured');
return true;
} else {
cy.log(
'⚠️ Multi-store NOT configured (only ' +
storeCount +
' store)'
);
return false;
}
});
};

/**
* Skip test if multi-store is not configured
* Usage:
* beforeEach(() => {
* skipIfSingleStore();
* });
*/
export const skipIfSingleStore = () => {
isMultiStoreConfigured().then(isConfigured => {
if (!isConfigured) {
cy.log('⏭️ Skipping test: Multi-store not configured');
// @ts-ignore
this.skip();
}
});
};

/**
* Check store count and return it
* @returns {Cypress.Chainable<number>}
*/
export const getStoreCount = () => {
return cy
.request({
method: 'POST',
url: Cypress.config('baseUrl') + '/graphql',
body: {
query: `{
availableStores {
store_code
store_name
}
}`
},
failOnStatusCode: false
})
.then(response => {
if (response.status !== 200 || !response.body.data) {
return 0;
}
return response.body.data.availableStores?.length || 0;
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ describe(

cy.visit(productValeriaTwoLayeredTank.url);
cy.wait(['@gqlGetProductDetailForProductPageQuery'], {
timeout: 60000
timeout: 120000
});

selectOptionsFromProductPage();
setQuantityFromProductPage(2);
addToCartFromProductPage();
cy.wait(['@gqlAddProductToCartMutation'], {
timeout: 60000
timeout: 120000
});
triggerMiniCart();
moveToCheckoutFromMiniCart();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,25 @@ describe(

cy.visit(categorySweaters);
cy.wait(['@gqlGetCategoriesQuery'], {
timeout: 60000
timeout: 120000
});

cy.wait(['@gqlGetStoreConfigDataForGallery'], {
timeout: 60000
timeout: 120000
});

addProductToCartFromCategoryPage(carinaCardigan.name);

cy.wait(['@gqlGetProductDetailForProductPageQuery'], {
timeout: 60000
timeout: 120000
});
cy.checkUrlPath(carinaCardigan.url);

assertCartIsEmpty();
cy.visit(categoryJewelry);

cy.wait(['@gqlGetCategoriesQuery'], {
timeout: 60000
timeout: 120000
});
addProductToCartFromCategoryPage(silverAmorBangleSet.name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ describe(
'@gqlGetProductSearchQuery'
],
{
timeout: 60000
timeout: 120000
}
);

cy.wait(['@gqlGetStoreConfigDataForGallery'], {
timeout: 60000
timeout: 120000
});

addProductToCartFromSearchPage(carinaCardigan.name);
cy.wait(['@gqlGetProductDetailForProductPageQuery'], {
timeout: 60000
timeout: 120000
});
cy.checkUrlPath(carinaCardigan.url);
assertCartIsEmpty();
Expand All @@ -81,7 +81,7 @@ describe(
'@gqlGetProductSearchQuery'
],
{
timeout: 60000
timeout: 120000
}
);
addProductToCartFromSearchPage(semperBangleSet.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,36 +53,36 @@ describe(
// Test - Add configurable product to cart from Product Page
cy.visit(productValeriaTwoLayeredTank.url);
cy.wait(['@gqlGetProductDetailForProductPageQuery'], {
timeout: 60000
timeout: 120000
});

selectOptionsFromProductPage();
setQuantityFromProductPage(2);
addToCartFromProductPage();
cy.wait(['@gqlAddProductToCartMutation'], {
timeout: 60000
timeout: 120000
});

assertCartTriggerCount(2);

// Test - Add simple product to cart from Product Page
cy.visit(productCarminaEarrings.url);
cy.wait(['@gqlGetProductDetailForProductPageQuery'], {
timeout: 60000
timeout: 120000
});

setQuantityFromProductPage(2);
addToCartFromProductPage();
cy.wait(['@gqlAddProductToCartMutation'], {
timeout: 60000
timeout: 120000
});

assertCartTriggerCount(4);

// Test - Products are in Cart Page
cy.visit(cartPageRoute);
cy.wait(['@gqlGetProductListingQuery'], {
timeout: 60000
timeout: 120000
});

assertProductInCartPage(productValeriaTwoLayeredTank.name);
Expand All @@ -91,14 +91,14 @@ describe(
// Test - Remove products from Cart
removeProductFromCart(productValeriaTwoLayeredTank.name);
cy.wait(['@gqlremoveItemMutation'], {
timeout: 60000
timeout: 120000
});

assertCartTriggerCount(2);

removeProductFromCart(productCarminaEarrings.name);
cy.wait(['@gqlremoveItemMutation'], {
timeout: 60000
timeout: 120000
});

assertCartIsEmpty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ describe(
// Test - Add configurable products to cart from Product Pages
cy.visit(productValeriaTwoLayeredTank.url);
cy.wait(['@gqlGetProductDetailForProductPageQuery'], {
timeout: 60000
timeout: 120000
});

selectOptionsFromProductPage();
setQuantityFromProductPage(2);
addToCartFromProductPage();
cy.wait(['@gqlAddProductToCartMutation'], {
timeout: 60000
timeout: 120000
});

assertCartTriggerCount(2);
Expand All @@ -95,7 +95,7 @@ describe(
'@gqlGetAppliedGiftCardsQuery'
],
{
timeout: 60000
timeout: 120000
}
);

Expand All @@ -106,7 +106,7 @@ describe(
setCouponCodeFromCartPage(Cypress.env('defaultData_couponCode'));

cy.wait(['@gqlapplyCouponToCartMutation'], {
timeout: 60000
timeout: 120000
});

assertAppliedCouponCodeInCartPage();
Expand All @@ -116,7 +116,7 @@ describe(
setGiftCardFromCartPage(Cypress.env('defaultData_giftCardNumber'));

cy.wait(['@gqlapplyGiftCardToCartMutation'], {
timeout: 60000
timeout: 120000
});

assertAppliedGiftCardInCartPage();
Expand All @@ -125,7 +125,7 @@ describe(
removeCouponCodeFromCartPage();

cy.wait(['@gqlremoveCouponFromCartMutation'], {
timeout: 60000
timeout: 120000
});

assertNoCouponCodeInCartPage();
Expand All @@ -134,7 +134,7 @@ describe(
removeGiftCardsFromCartPage();

cy.wait(['@gqlremoveGiftCardMutation'], {
timeout: 60000
timeout: 120000
});

assertNoGiftCardInCartPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe(
cy.visit(homePage);

cy.wait(['@gqlGetCMSPageQuery'], {
timeout: 60000
timeout: 120000
});

toggleHeaderNav();
Expand All @@ -73,7 +73,7 @@ describe(
selectCategoryFromMegaMenu(categoryBelts);

cy.wait(['@getCategoryDataCallQuery'], {
timeout: 60000
timeout: 120000
});

assertCategoryTitle(categoryBelts);
Expand All @@ -82,13 +82,13 @@ describe(
cy.visit(homePage);

cy.wait(['@gqlGetCMSPageQuery'], {
timeout: 60000
timeout: 120000
});

clickOnBannerElementContaining(buttonShopNow);

cy.wait(['@getCategoryDataCallQuery'], {
timeout: 60000
timeout: 120000
});

assertCategoryTitle(categoryShopTheLook);
Expand Down
Loading
Loading