Skip to content

Commit 61ee444

Browse files
sf-emmyzhangsnilakandan13yhsieh1vcua-mobifybendvc
authored
Merge develop into oms feature branch (#3009)
* Added cursor rules * Rules updated * Rules updated * Updated Readme document * Updated rules * updated rules * Cursor Rules for generating components * Added MCP rules for Component creation * @W-18737391 Add developemnt guidelines and page creation rules * remove from .cursor/rules folder * update rule * condense guideliens * update changelog * update rule to help pattern match * Cursor rules and cleanup of tool * Deleting from the monorepo * skip changelog * Update CHANGELOG.md * bump versions * Bump versions in mcp server * added cursor rules * Added options for other * move cursor rules to root * move cursor rules to root * revert change log * Cursor rules for creating new component * nested cursor rules * move to nested rules location * revert create mobify app js * Initial Commit Add initGit option Update readme for create app tool Always use latest for create app npx package version. * Change when git init is run also added basic gitignore for non-extension projects * Update CHANGELOG.md * Fix tests * Rename pwa-kit-mcp project * Update server.js * Include bin entry in package.json * update changelog.md * update changelog.md * Fix dependencies etc * Add example with output dir * remove duplicated rules under assets * @W-19065116 fix formating issue * Punctuation fix in readme * @W-19054407 BOPIS fix bundle inventory and child pickup selection (#2823) * @W-19054407 BOPIS fix bundle inventory and child pickup selection * @W-19054407 BOPIS fix bundle inventory and child pickup selection changlelog * Revert "@W-19054407 BOPIS fix bundle inventory and child pickup selection changlelog" This reverts commit f5be70b. * @W-19054407 BOPIS changelog update --------- Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com> * Update program.json PR feedback on description. Signed-off-by: Ben Chypak <bchypak@mobify.com> * @W-19053749: Updated changelog to match new accepted style (#2837) * Updated changelog * update changelog * revert development guidelines changes * revert development guidelines changes * Rename package to pwa-kit-mcp * Update server json in readme * Update readme and bump version * Ensure the latest version is used in readme example * Version align the mcp server with the platform version * Use --initGit flag and test for .git/ creation * Add flag both commands for template and presets * Ensure gitignore is created * Ensure default command includes --initGit * Update base command * @W-19045349 Add better error handling for Datacloud (#2811) * Add better error handling for Datacloud Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Update use-datacloud.js Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Update use-datacloud.test.js Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Update datacloud-mock-data.js Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Add new dataCloudAPI config Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Update use-datacloud.test.js Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Update use-datacloud.test.js Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Update use-datacloud.test.js Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Update datacloud-mock-data.js Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Refactored to decrease duplicate code Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Fix prettier issues Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Remove comments Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Sync datacloud api values (#2843) * Update CHANGELOG.md Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> --------- Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> Co-authored-by: Vincent Marta <vmarta@salesforce.com> * qa prompt * update * encapulate rule copy logic * update e2e test to verify .cursor folder is generated * feat: add feature flag to enable/disable partial hydration @W-19082948 (#2846) * update changelog * Bump versions * Clean up changelogs * Update usid expiry to match refresh_token expiry * Linting fix * Update changelog * Better prompting for cursor and create app program * Update packages/commerce-sdk-react/src/auth/index.ts Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com> Signed-off-by: Jainam Sheth <99490559+shethj@users.noreply.github.com> * Add unit tests for usid expiry * Remove overlapping test cases * update commerce-sdk-react * update changelog * bump version * bump develop to next dev version * Update changelogs * Change version number * Update readme * Move tools to tools folder * Clean up files/folders, create new tool folder. * Lint * A11y tests - Handle dynamic aria labels generated by chakra UI (#2864) * Handle dynamic aria labels generated by chakra UI * improve sanitization --------- Co-authored-by: Alex Vuong <alex.vuong@salesforce.com> * initial implementation of create page mcp tool * fix * support open url * fix the import * update README and changelog * Modified create page mcp tool * Added Image Componentsupport to Create page MCP tool * Fixed failing tests * Added new and fixed failing tests and corrected linting issues * Added new test and minor update to system prompt * Updated image component functionality * Updated system prompt * Fixed routes issue * Added tests and comments * Fixed merge conflicts and moved cursor to retail-react-app * skip changelog * Removed unused const * Addressed comments * Update reading expiry time for usid * Removed the cursor rule * Update codeowners file to include ownership for specific features (#2921) * Update codeowners * @W-18895609: 🚀 Shopper Agent Experience v3.0 (#2658) * feat: shopper agent experience v3.0 * fix: enabling streaming (#2911) * Committing for Rules and cleanup * skip changelog * Fixed tests * Remove reference to claude and clean up readme * Update CHANGELOG.md * Lint fix * Addressed comments * Make development section more robust. * Removed the flex hardcode in log message * Fixing Page Tool * Fixing Linter * Updating the Page tool * Fix eslint discoverability in the monorepo (@W-19068681@) (#2927) * Attempt at fixing eslint discoverability in the monorepo * Support other packages * Another approach: centralize the eslint dependencies * Add a script to sync eslint stuffs to the root * Update package lock files * Move timing of script to preinstall * Update package lock files * No need for this documentation * Empty commit * Simplify the script's logic * Reverting changes for Page tool * Added comment back * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Fix link * Reverting the test change * Update package description * Remove folder structure section * @W-19179026: disable streaming responses (#2964) * Explicitly added example of what the path to your project might look like. * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * @W-19248293: logMCPMessage is broken * @W-19248293: logMCPMessage is broken * fix lint errors * @W-19251796 MCP a11y performance tool format fix (#3003) * @W-19183433: Add code owners validation to the CI pipeline (#2939) * Update codeowners * Update codeowners * Update codeowners * Add codeowners validator to the pipeline * codeowners validator * codeowners validator * codeowners validator * codeowners validator * codeowners validator * codeowners validator --------- Co-authored-by: Brian Feister <47546998+bfeister@users.noreply.github.com> --------- Signed-off-by: yhsieh1 <yhsieh@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> Signed-off-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> Signed-off-by: Jainam Sheth <99490559+shethj@users.noreply.github.com> Co-authored-by: snilakandan <snilakandan@salesforce.com> Co-authored-by: Yuming Hsieh <yhsieh@salesforce.com> Co-authored-by: vcua-mobify <vcua@salesforce.com> Co-authored-by: snilakandan13 <119348013+snilakandan13@users.noreply.github.com> Co-authored-by: Ben Chypak <bchypak@salesforce.com> Co-authored-by: patricksullivansf <100441292+patricksullivansf@users.noreply.github.com> Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com> Co-authored-by: Ben Chypak <bchypak@mobify.com> Co-authored-by: Daniel Diaz <38542490+ddiazccrz@users.noreply.github.com> Co-authored-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com> Co-authored-by: Vincent Marta <vmarta@salesforce.com> Co-authored-by: Shailesh Zirpe <szirpe+sf@salesforce.com> Co-authored-by: Steffen Eckardt <3235219+seckardt@users.noreply.github.com> Co-authored-by: Jainam Sheth <j.sheth@salesforce.com> Co-authored-by: Jainam Sheth <99490559+shethj@users.noreply.github.com> Co-authored-by: Joel Uong <joel.uong@salesforce.com> Co-authored-by: sf-henry-semaganda <henry.semaganda@salesforce.com> Co-authored-by: Alex Vuong <alex.vuong@salesforce.com> Co-authored-by: Shailesh Zirpe <42553862+szirpesf@users.noreply.github.com> Co-authored-by: wei-liu <wei.liu@salesforce.com> Co-authored-by: atekur <atekur@salesforce.com> Co-authored-by: Aditya Tekur <126732792+aditek-sf@users.noreply.github.com> Co-authored-by: Ujwala <59447810+unandyala@users.noreply.github.com> Co-authored-by: Avinash Kasipathy <akasipathy@salesforce.com> Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Co-authored-by: Brian Feister <47546998+bfeister@users.noreply.github.com>
1 parent f5fd3c3 commit 61ee444

File tree

47 files changed

+6527
-992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+6527
-992
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
description: QA Tests for Template Retail React App Test Generation Rules
3+
globs: ["packages/template-retail-react-app/app/components/**/*-underTest.test.{js,jsx}"]
4+
alwaysApply: false
5+
---
6+
# QA Tests for Template Retail React App Test Patterns
7+
8+
## Purpose
9+
This file contains test cases to verify that the `unit-tests-template-retail-react-app.mdc` rule effectively guides the creation of consistent and robust React component tests.
10+
11+
## Test Cases
12+
13+
### Test 1: DrawerMenu Component Test Generation
14+
**Workflow:** Generate → Analyze → Cleanup (NO test execution)
15+
16+
**Steps:**
17+
1. **Generate:** Create new test file `drawer-menu-underTest.test.js` (colocated with existing drawer-menu component at `packages/template-retail-react-app/app/components/drawer-menu/`)
18+
2. **Apply Rules:** Use `@/testing` (located at `.cursor/rules/testing/unit-tests-generic.mdc` and `.cursor/rules/testing/unit-tests-template-retail-react-app.mdc`)
19+
3. **Prompt:** "Write unit test for drawer-menu component"
20+
4. **Analyze:** Perform static code analysis against verification patterns (see below)
21+
5. **Cleanup:** Delete the generated test file after validation
22+
23+
**Important:** DO NOT run the test after creation - skip test execution entirely
24+
25+
**Verify that the newly generated test file follows these patterns:**
26+
1. Test Setup
27+
- Uses `renderWithProviders` from `@salesforce/retail-react-app/app/utils/test-utils`
28+
- Gets user events from return value: `const {user} = renderWithProviders(...)`
29+
- Includes `beforeEach(() => jest.clearAllMocks())`
30+
31+
2. Import Structure
32+
- Does NOT import `userEvent` directly
33+
- Uses existing mock data from `@salesforce/retail-react-app/app/mocks/`
34+
- Imports `screen` from `@testing-library/react`
35+
36+
3. Test Organization
37+
- Uses `describe` block with component name
38+
- Individual `test` or `it` blocks for different scenarios
39+
- Async/await patterns for user interactions
40+
41+
4. API Mocking
42+
- Uses `prependHandlersToServer` or `msw` for API mocking when needed
43+
44+
**Failure Indicators:**
45+
- Direct import of `userEvent` from `@testing-library/user-event`
46+
- Using custom render function instead of `renderWithProviders`
47+
- Creating new mock data instead of using existing mocks
48+
- Missing Commerce SDK context providers
49+
- Not using async/await for user interactions
50+
51+
**Expected Output:**
52+
Provide a clear, structured report based on **static code analysis only** (no test execution):
53+
- ✅ **PASS** or ❌ **FAIL** for each verification point
54+
- Specific line numbers and code snippets for any failures
55+
- Summary: `X/Y patterns followed correctly`
56+
- Overall result: **RULES EFFECTIVE** or **RULES NEED IMPROVEMENT**
57+
58+
**Cleanup:**
59+
- Delete the generated test file `drawer-menu-underTest.test.js` after QA validation is complete

.github/CODEOWNERS

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,64 @@
11
# https://help.github.com/en/enterprise/2.17/user/articles/about-code-owners
22

3-
# These owners will be the default owners for everything in
4-
# the repo. Unless a later match takes precedence,
5-
# @global-owner1 and @global-owner2 will be requested for
6-
# review when someone opens a pull request.
3+
# Global directories
4+
.cursor/ @SalesforceCommerceCloud/mobifyers
5+
.github/ @SalesforceCommerceCloud/mobifyers
6+
e2e/ @SalesforceCommerceCloud/mobifyers
7+
scripts/ @SalesforceCommerceCloud/mobifyers
8+
9+
# Package-specific ownership
10+
packages/commerce-sdk-react/ @SalesforceCommerceCloud/mobifyers
11+
packages/internal-lib-build/ @SalesforceCommerceCloud/mobifyers
12+
packages/pwa-kit-create-app/ @SalesforceCommerceCloud/mobifyers
13+
packages/pwa-kit-dev/ @SalesforceCommerceCloud/mobifyers
14+
packages/pwa-kit-mcp/ @SalesforceCommerceCloud/mobifyers
15+
packages/pwa-kit-react-sdk/ @SalesforceCommerceCloud/mobifyers
16+
packages/pwa-kit-runtime/ @SalesforceCommerceCloud/mobifyers
17+
packages/template-express-minimal/ @SalesforceCommerceCloud/mobifyers
18+
packages/template-mrt-reference-app/ @SalesforceCommerceCloud/mobifyers
19+
packages/template-retail-react-app/ @SalesforceCommerceCloud/mobifyers
20+
packages/template-typescript-minimal/ @SalesforceCommerceCloud/mobifyers
21+
packages/test-commerce-sdk-react/ @SalesforceCommerceCloud/mobifyers
22+
23+
# Root configuration and documentation files
24+
/README.md @SalesforceCommerceCloud/mobifyers
25+
/CODE_OF_CONDUCT.md @SalesforceCommerceCloud/mobifyers
26+
/CONTRIBUTING.md @SalesforceCommerceCloud/mobifyers
27+
/SECURITY.md @SalesforceCommerceCloud/mobifyers
28+
/STATEMENTS.md @SalesforceCommerceCloud/mobifyers
29+
/TERMS_OF_USE.md @SalesforceCommerceCloud/mobifyers
30+
/LICENSE @SalesforceCommerceCloud/mobifyers
31+
/.eslintrc.js @SalesforceCommerceCloud/mobifyers
32+
/.gitattributes @SalesforceCommerceCloud/mobifyers
33+
/.gitignore @SalesforceCommerceCloud/mobifyers
34+
/.prettierignore @SalesforceCommerceCloud/mobifyers
35+
/.prettierrc.yaml @SalesforceCommerceCloud/mobifyers
36+
/lerna.json @SalesforceCommerceCloud/mobifyers
37+
/package.json @SalesforceCommerceCloud/mobifyers
38+
/package-lock.json @SalesforceCommerceCloud/mobifyers
39+
/playwright.config.js @SalesforceCommerceCloud/mobifyers
40+
/.git2gus/ @SalesforceCommerceCloud/mobifyers
41+
42+
# Specific feature file ownership (overrides package-level rules above)
43+
44+
# BOPIS (Buy Online Pick up In Store) feature files - PR #2646
45+
packages/template-retail-react-app/app/components/store-display/ @SalesforceCommerceCloud/cc-spark
46+
packages/template-retail-react-app/app/hooks/use-selected-store.js @SalesforceCommerceCloud/cc-spark
47+
packages/template-retail-react-app/app/hooks/use-pickup-shipment.js @SalesforceCommerceCloud/cc-spark
48+
packages/template-retail-react-app/app/hooks/use-pickup-shipment.test.js @SalesforceCommerceCloud/cc-spark
49+
e2e/tests/desktop/bopis.spec.js @SalesforceCommerceCloud/cc-spark
50+
51+
# Bonus Products feature files - PR #2704
52+
packages/template-retail-react-app/app/components/product-item/bonus-product-quantity.jsx @SalesforceCommerceCloud/cc-sharks
53+
packages/template-retail-react-app/app/components/product-item/bonus-product-quantity.test.jsx @SalesforceCommerceCloud/cc-sharks
54+
packages/template-retail-react-app/app/components/product-item/product-quantity-picker.jsx @SalesforceCommerceCloud/cc-sharks
55+
packages/template-retail-react-app/app/components/product-item/product-quantity-picker.test.jsx @SalesforceCommerceCloud/cc-sharks
56+
packages/template-retail-react-app/app/pages/cart/partials/bonus-products-title.jsx @SalesforceCommerceCloud/cc-sharks
57+
packages/template-retail-react-app/app/pages/cart/partials/bonus-products-title.test.js @SalesforceCommerceCloud/cc-sharks
58+
59+
# Standard Products feature files - PR #2697
60+
packages/template-retail-react-app/app/mocks/standard-product.js @SalesforceCommerceCloud/cc-sharks
61+
packages/template-retail-react-app/app/utils/add-to-cart-utils.js @SalesforceCommerceCloud/cc-sharks
62+
763

8-
* @SalesforceCommerceCloud/mobifyers
964
#ECCN:Open Source
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Validate CODEOWNERS
2+
3+
# Only run when CODEOWNERS file changes - efficient!
4+
on:
5+
pull_request:
6+
paths:
7+
- '.github/CODEOWNERS'
8+
push:
9+
branches:
10+
- develop
11+
- 'release-*'
12+
paths:
13+
- '.github/CODEOWNERS'
14+
15+
jobs:
16+
validate:
17+
name: Validate CODEOWNERS File
18+
runs-on: ubuntu-latest
19+
# Only run on pushes or PRs from the same repository (not forks)
20+
# This prevents permission issues with GITHUB_TOKEN on external PRs
21+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Validate CODEOWNERS structure
28+
uses: mszostok/codeowners-validator@v0.7.4
29+
with:
30+
# files: paths exist, duppatterns: no duplicates, syntax: valid format
31+
checks: "files,duppatterns,syntax"
32+
github_access_token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)