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

Merge onboarding improvements branch into consolidated ad #2627

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
64f51bf
Hides jetpack during onboarding if already connected
dsawardekar Aug 9, 2024
88e0799
Limits jetpack check to only the WPComAccount card
dsawardekar Aug 12, 2024
ad40c2c
Adds e2e tests for jetpack connected & disconnected states
dsawardekar Aug 12, 2024
e2f2420
Refactors variable names in setup flow
dsawardekar Aug 13, 2024
6172e58
Removes language section from onboarding flow
dsawardekar Aug 13, 2024
088fc95
Updates e2e tests for language secton
dsawardekar Aug 13, 2024
f1d84f6
Update e2e tests
joemcgill Aug 13, 2024
7523a05
Fixes linter warnings
dsawardekar Aug 14, 2024
9e606c1
Merge pull request #2521 from woocommerce/update/2487-hide-jetpack-e2…
dsawardekar Aug 14, 2024
5bfa90b
Fixes linter warnings
dsawardekar Aug 14, 2024
40a068a
Fix issue with comma separators
jorgemd24 Aug 14, 2024
d1e147a
Parse cost
jorgemd24 Aug 14, 2024
2912ea4
Move FAQ after the CTA on the setup page.
asvinb Aug 15, 2024
65ba775
Move FAQ after CTA in Ads Campaign component.
asvinb Aug 15, 2024
c00448f
Move FAQs after CTA un SetupPaidAds component.
asvinb Aug 15, 2024
2e0a2db
Add StepContentActions component.
asvinb Aug 15, 2024
bad8197
Use StepContentFooterActions component.
asvinb Aug 15, 2024
f4b9a79
Temporarily rename StepContentActions to TmpStepContentActions.
asvinb Aug 15, 2024
e76eb34
Rename StepContentFooter to StepContentActions.
asvinb Aug 15, 2024
e0fcb70
Bring back StepContentFooter.
asvinb Aug 15, 2024
cd992e6
Fix linting issue.
asvinb Aug 15, 2024
0bbb53a
Remove tmp from class name.
asvinb Aug 16, 2024
3d82e7b
Fix typo.
asvinb Aug 16, 2024
8d6d98b
Bump npm dependencies and upgrade to use Node.js v20.
eason9487 Aug 16, 2024
b8b1129
Fix the build config of Fast Refresh mode.
eason9487 Aug 8, 2024
8dc4a94
Address Sass deprecation warnings.
eason9487 Aug 8, 2024
ddc2b96
Turn off the eslint rule `react/react-in-jsx-scope`.
eason9487 Aug 8, 2024
f6997f7
Turn off the eslint rule `jsdoc/check-line-alignment`.
eason9487 Aug 8, 2024
23536a4
Turn off the eslint rule `import/no-named-as-default`.
eason9487 Aug 9, 2024
cdd9aab
Resolve eslint errors for the `@wordpress/i18n-text-domain` rule.
eason9487 Aug 8, 2024
c41ef64
Resolve eslint errors that can be automatically fixed.
eason9487 Aug 8, 2024
67ef0e2
Resolve eslint errors for the `jsdoc/no-undefined-types` rule.
eason9487 Aug 8, 2024
c4db2a3
Resolve eslint errors for the `import/no-unresolved` rule.
eason9487 Aug 9, 2024
6997b6f
Resolve eslint errors for the `no-redeclare` rule.
eason9487 Aug 9, 2024
47d1f9f
Resolve eslint errors for the `jsdoc/require-yields-check` rule.
eason9487 Aug 9, 2024
9886344
Resolve eslint errors for the `@typescript-eslint/no-use-before-defin…
eason9487 Aug 9, 2024
fccc0cd
Resolve eslint errors for the `jsdoc/tag-lines` rule.
eason9487 Aug 16, 2024
6fb9a6c
Jest: Fix that `[email protected]` doesn't provide the CommonJS build.
eason9487 Aug 12, 2024
d5de474
Jest: Force 'uuid' to resolve with the CommonJS entry point as jest d…
eason9487 Aug 12, 2024
964e769
Jest: Fix `@woocommerce/components` still using incompatible `@woocom…
eason9487 Aug 12, 2024
d8b3d7a
Jest: Ignore that 'qrcode.react' module is incorrectly listed in dev …
eason9487 Aug 12, 2024
76c1efa
Jest: Fix the React versioning conflicts between `@wordpress/*` and `…
eason9487 Aug 12, 2024
e9cbf6a
Jest: Update timer mocks to deprecate the `timers` option.
eason9487 Aug 12, 2024
0c80d4d
Remove prelaunch checklist component.
asvinb Aug 16, 2024
035bb2a
Fix typo in test.
asvinb Aug 16, 2024
da344e3
Jset: Migrate test cases to `@testing-library/user-event` v14.
eason9487 Aug 12, 2024
750f600
Add tests for Continue button.
asvinb Aug 16, 2024
223935e
Updates e2e tests per PR feedack & removes unused code
dsawardekar Aug 19, 2024
38d4563
Resolve eslint errors for the `testing-library/no-wait-for-multiple-a…
eason9487 Aug 19, 2024
b634d9e
Resolve eslint errors for the `testing-library/no-unnecessary-act` rule.
eason9487 Aug 19, 2024
def9cb0
Jest: Prevent form submission during testing.
eason9487 Aug 19, 2024
45f90a7
Jest: The ARIA role of `<img>` is considered as `presentation` if its…
eason9487 Aug 19, 2024
d5e5324
Jest: Prevent the `<Dashboard>` tests from calling `window.fetch`.
eason9487 Aug 19, 2024
ad1daac
Jest: Adjust `<Stepper>` related tests to wait for stepper content to…
eason9487 Aug 19, 2024
b7c6eca
Jest: Update snapshots to reflect the format changes.
eason9487 Aug 19, 2024
49c685e
setting default
kt-12 Aug 19, 2024
7ccf37f
Hide Tax UI during onboarding & keep in edit campaign
dsawardekar Aug 19, 2024
7550060
Merge branch 'develop' into tweak/default-tax-2491
kt-12 Aug 19, 2024
a89e0b2
Jest: Fix `CampaignNameCell` tests by replacing `fireEvent` with `use…
eason9487 Aug 19, 2024
0686dc9
Jest: Ignore the deprecation warnings of `defaultProps` from React by…
eason9487 Aug 19, 2024
9df6ee1
Jest: Remove the `structuredClone` polyfill no longer needed.
eason9487 Aug 19, 2024
757b5c9
Make `<AppTooltip>` compatible with the `placement` prop introduced b…
eason9487 Aug 19, 2024
940649d
Rewrite the replacer of `JSON.stringify` in `getReportKey` to ensure …
eason9487 Aug 19, 2024
8554c2d
Replace deprecated `event.keyCode` with `event.code` for `<Verificati…
eason9487 Aug 19, 2024
e2b305f
Avoid accidentally using the event object to reset the asset group in…
eason9487 Aug 19, 2024
bc232cb
unit test for tax_rate
kt-12 Aug 19, 2024
aa88b50
fix function name
kt-12 Aug 19, 2024
3e72d8e
Fix unit test
kt-12 Aug 19, 2024
ecd25fc
Updates e2e tests per CR feedback
dsawardekar Aug 19, 2024
4a3d08e
define options variable
kt-12 Aug 19, 2024
e0cc337
add unit test for post method
kt-12 Aug 19, 2024
b23328b
Add helper to convert decimals to dot
jorgemd24 Aug 19, 2024
8c863f2
Add tests for conver to decimals helper
jorgemd24 Aug 19, 2024
18d1469
Update parse to use the helper
jorgemd24 Aug 19, 2024
a6407f7
Adjust tests for Zone Parser
jorgemd24 Aug 19, 2024
6310f9c
Convert min amount as it is always int
jorgemd24 Aug 19, 2024
0620121
remove unwanted imports
kt-12 Aug 19, 2024
d6f5658
update package name
kt-12 Aug 19, 2024
0a1f579
Wrap all in components
joemcgill Aug 19, 2024
562e301
Fix file name for AssetGroupFaqsPanel
joemcgill Aug 19, 2024
1f41efc
Fix file paths
joemcgill Aug 19, 2024
f3d0847
Removes tax rate related e2e tests since no onboarding UI
dsawardekar Aug 20, 2024
87d46c2
Fixes linter warnings
dsawardekar Aug 20, 2024
98aa6f0
Fixes linter warnings
dsawardekar Aug 20, 2024
d8d0ba9
Removes unused code in e2e tests
dsawardekar Aug 20, 2024
7acafdf
Removes extra line break
dsawardekar Aug 20, 2024
57ecc5d
Merge branch 'tweak/default-tax-2491' into update/2490-hide-tax-rate-…
dsawardekar Aug 20, 2024
19c069c
Use remote-site-status to check the WPCOM Auth status
puntope Aug 20, 2024
2a24962
Merge branch 'develop' into feature/2492-remove-pre-launch-checklist
asvinb Aug 20, 2024
28a87a9
Remove disabled button.
asvinb Aug 20, 2024
e4dbeb9
Remove policy check request.
asvinb Aug 20, 2024
32bbb30
Remove policy requests.
asvinb Aug 20, 2024
e8e51f3
PHPCS
puntope Aug 20, 2024
8ccaf0e
Removes unused styles per CR feedback
dsawardekar Aug 21, 2024
33146ac
Removes documentation link per CR feedback
dsawardekar Aug 21, 2024
5964f66
Removes unused code per CR feedback
dsawardekar Aug 21, 2024
de9bd60
Tweak function to convert to a valid decimal
jorgemd24 Aug 21, 2024
70b3f1f
PHPCS fix
jorgemd24 Aug 21, 2024
69fc1b4
Add code document for the `replacer` function in js/src/data/utils.js.
eason9487 Aug 22, 2024
c9a259f
Add a more detailed description for the mock `isWpVersion` function.
eason9487 Aug 22, 2024
766e351
Update tracking README.
eason9487 Aug 22, 2024
d09c5eb
remove pre-launch attributes from api
kt-12 Aug 22, 2024
7c4c65e
remove `checked_pre_launch_checklist()` and it's reference
kt-12 Aug 22, 2024
c89bff3
remove the function
kt-12 Aug 22, 2024
dac0fce
unit testing changes
kt-12 Aug 22, 2024
7b29364
fix linting issue
kt-12 Aug 22, 2024
af8c961
update text
kt-12 Aug 22, 2024
16fc14d
Use a fixed SKU number when creating an adapted product
mikkamp Aug 22, 2024
4c9d6db
Test for fixed SKU number
mikkamp Aug 22, 2024
0bb6163
Merge pull request #2516 from woocommerce/update/2487-hide-jetpack-if…
joemcgill Aug 22, 2024
c4bbdf0
Merge pull request #2543 from woocommerce/tweak/default-tax-2491
joemcgill Aug 22, 2024
bfe429d
Merge pull request #2522 from woocommerce/update/2489-hide-language-s…
joemcgill Aug 22, 2024
38254c1
Remove unused dependency
puntope Aug 22, 2024
857e074
Prevent loop and excessive request.
puntope Aug 22, 2024
b2a3d13
Allow npm `^9` because dependabot is using an npm version that doesn'…
eason9487 Aug 23, 2024
c76514b
Add a more detailed code comment to the `jsdoc/no-undefined-types` es…
eason9487 Aug 23, 2024
9cd398f
Hide default prop per CR feedback
dsawardekar Aug 23, 2024
a4abb29
Update error checking to ignore if hideTaxRates is true
dsawardekar Aug 23, 2024
f5a48b1
Make settings an object
puntope Aug 23, 2024
ec86226
Merge pull request #2559 from woocommerce/dev/2556-fixed-sku
mikkamp Aug 23, 2024
fdbd91e
Use the correct namespace for test classes
mikkamp Aug 23, 2024
30fa48f
Remove unused imports
mikkamp Aug 23, 2024
7316de3
Merge pull request #2517 from woocommerce/dev/2002-use-nodejs-20
eason9487 Aug 23, 2024
b22d9c6
Merge pull request #2544 from woocommerce/tweak/2002-jest-for-nodejs-…
eason9487 Aug 23, 2024
e46bd2e
Merge branch 'develop' into dev/use-nodejs-20
eason9487 Aug 23, 2024
981f1a8
Merge pull request #2562 from woocommerce/dev/use-nodejs-20
eason9487 Aug 23, 2024
5f2c5b1
Merge pull request #2557 from woocommerce/tweek/2541-update-copy
eason9487 Aug 23, 2024
4c96cd7
Merge pull request #2561 from woocommerce/dev/unit-test-namespaces
mikkamp Aug 26, 2024
c2c3242
Mock default MC settings with tax_rate set
joemcgill Aug 26, 2024
4870093
Remove unused e2e test helpers
joemcgill Aug 26, 2024
04e1be8
Merge branch 'develop' into fix/flat-method-shipping-cost-with-comma-…
jorgemd24 Aug 27, 2024
fcf936d
Merge branch 'develop' into fix/flat-method-shipping-cost-with-comma-…
jorgemd24 Aug 27, 2024
59ae632
Merge pull request #2527 from woocommerce/fix/flat-method-shipping-co…
jorgemd24 Aug 27, 2024
9774e44
Fix shipping method settings format
jorgemd24 Aug 27, 2024
74a55ad
Add tests for shipping method settings format
jorgemd24 Aug 27, 2024
9548817
Merge branch 'develop' into fix/settings-format
jorgemd24 Aug 27, 2024
5522861
Add tests for setting for a different endpoint than shipping zones me…
jorgemd24 Aug 27, 2024
9981934
Remove converting to object all settings regarless of the endpoint
jorgemd24 Aug 27, 2024
7882202
Merge pull request #2560 from woocommerce/fix/settings-format
jorgemd24 Aug 27, 2024
9be454c
Use a fixed SKU number when creating an adapted product
mikkamp Aug 22, 2024
dd73ec6
Test for fixed SKU number
mikkamp Aug 22, 2024
e85de42
Start `release/2.8.4`.
github-actions[bot] Aug 27, 2024
b5aee0c
Remove older changelog entries
tomalec Aug 27, 2024
ff09561
woorelease: Product version bump update
tomalec Aug 27, 2024
8516d8f
woorelease: Changelog update
tomalec Aug 27, 2024
b34a5c4
Update hooks documentation from branch.
github-actions[bot] Aug 27, 2024
aeb4245
Merge pull request #2569 from woocommerce/release/2.8.4
tomalec Aug 27, 2024
93b4180
Merge pull request #2570 from woocommerce/trunk
tomalec Aug 27, 2024
435b02e
Bump webpack from 5.93.0 to 5.94.0
dependabot[bot] Aug 27, 2024
513c6b9
Move FAQ panel within the footer.
asvinb Aug 29, 2024
be5fbdb
Remove unused code.
asvinb Aug 29, 2024
8096fe1
Add assertions for contact info.
asvinb Aug 29, 2024
75af8e2
Fomat shipping rate to two decimals
jorgemd24 Aug 30, 2024
708910d
Add tests for shipping zone rate with more than 2 decimals
jorgemd24 Aug 30, 2024
1030b8d
Merge pull request #2531 from woocommerce/feature/2488-move-faq
joemcgill Sep 1, 2024
c21b1b5
Merge branch 'feature/2458-streamline-onboarding' into feature/2492-r…
asvinb Sep 2, 2024
f126caa
Add test for is_Ready without health check
puntope Sep 2, 2024
90ed2a4
Update option when there is error.
puntope Sep 2, 2024
ec9e32f
Add more tests
puntope Sep 2, 2024
fd5d8aa
Add more tests
puntope Sep 2, 2024
84d9ad0
Remove the use of WooAdminNavigationTrait
tomalec Sep 2, 2024
e98639a
Remove the `NavigationClassic` use `MainTabNav` directly
tomalec Sep 2, 2024
1958589
Always use `AppSubNav` in `ReportsNavigation`
tomalec Sep 2, 2024
0c1023c
Change `useLegacyMenuEffect` to `useMenuEffect`
tomalec Sep 2, 2024
75a23ce
Always add `marketing` to the breadcrumbs
tomalec Sep 2, 2024
15328f2
Remove `reconnectionLock`
tomalec Sep 2, 2024
9bee30e
Remove `isWCNavigationEnabled`
tomalec Sep 2, 2024
42e55b5
Hide `woocommerce-layout__header` with `display:none` for `full-content`
tomalec Sep 2, 2024
8731dee
Update `useLayout` code comment
tomalec Sep 2, 2024
82ffce8
Merge pull request #2573 from woocommerce/fix/issue-with-syncing-ship…
jorgemd24 Sep 3, 2024
f12ac73
Log exception if asset is enqueued before it's registered
martynmjones Sep 3, 2024
0baf754
Add unit test
martynmjones Sep 3, 2024
baeac50
Merge pull request #2571 from woocommerce/dependabot/npm_and_yarn/web…
eason9487 Sep 4, 2024
d78738a
Remove unused code from pre launch checklist.
asvinb Sep 4, 2024
12c09f8
Merge pull request #2574 from woocommerce/remove/2406-woo-nav
tomalec Sep 4, 2024
c5c547a
check method for exactly 3 get calls and remove redundant 4th step.
kt-12 Sep 4, 2024
7210b14
Merge pull request #2547 from woocommerce/tweak/check-wpcom-api-auth
puntope Sep 5, 2024
debc575
Merge branch 'update/2490-hide-tax-rate-selection-ui-onboarding' of g…
dsawardekar Sep 5, 2024
630c73d
Removes unused function
dsawardekar Sep 5, 2024
3e4910f
Updates props per CR feedback
dsawardekar Sep 5, 2024
bf5c219
Merge pull request #2576 from woocommerce/fix/1659-asset-enqueued-bef…
martynmjones Sep 5, 2024
fe8d923
Start `release/2.8.5`.
github-actions[bot] Sep 5, 2024
9fda021
Update readme.txt
martynmjones Sep 5, 2024
1c6a902
Set WPCOM_API_STATUS transient for tests
martynmjones Sep 5, 2024
5d9eeda
Merge pull request #2588 from woocommerce/fix/2587-e2e-tests
martynmjones Sep 5, 2024
8ce5aef
Merge branch 'develop' into release/2.8.5
martynmjones Sep 5, 2024
59e3fcd
woorelease: Product version bump update
martynmjones Sep 5, 2024
cf76762
woorelease: Changelog update
martynmjones Sep 5, 2024
cf3c765
Update hooks documentation from branch.
github-actions[bot] Sep 5, 2024
6c6002c
Merge pull request #2586 from woocommerce/release/2.8.5
martynmjones Sep 5, 2024
24044c5
Merge pull request #2589 from woocommerce/trunk
martynmjones Sep 5, 2024
40bbf82
Merge pull request #2555 from woocommerce/feature/2494-remove-pre-lau…
joemcgill Sep 5, 2024
f39cf03
Merge pull request #2532 from woocommerce/feature/2492-remove-pre-lau…
joemcgill Sep 6, 2024
ed9c887
Merge branch 'develop' into feature/2458-streamline-onboarding
eason9487 Sep 6, 2024
5db0bad
Updates jsdoc
dsawardekar Sep 11, 2024
bd39f03
Merge branch 'feature/2458-streamline-onboarding' into update/2490-hi…
dsawardekar Sep 11, 2024
8eb1fff
Merge pull request #2542 from woocommerce/update/2490-hide-tax-rate-s…
joemcgill Sep 16, 2024
face49e
Merge branch 'feature/2458-streamline-onboarding' into update/2535-co…
asvinb Sep 27, 2024
b3e3b2a
Fix merge conflict for AdsCampaign.
asvinb Sep 27, 2024
d4c376d
Fix merge conflict for audienceSection test.
asvinb Sep 27, 2024
7cd8c5b
Delete unused file.
asvinb Sep 27, 2024
5d727ba
fix linting issues.
asvinb Sep 27, 2024
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
63 changes: 63 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const jsdocConfig = require( '@wordpress/eslint-plugin/configs/jsdoc' );
const webpackConfig = require( './webpack.config' );

const webpackResolver = {
Expand Down Expand Up @@ -39,19 +40,81 @@ module.exports = {
getComputedStyle: 'readonly',
},
rules: {
'@wordpress/i18n-text-domain': [
'error',
{ allowedTextDomain: 'google-listings-and-ads' },
],
'@wordpress/no-unsafe-wp-apis': 1,
'react/react-in-jsx-scope': 'off',
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: 'useSelect',
},
],
// compatibility-code "WC < 7.6"
//
// Turn it off because:
// - `import { CurrencyFactory } from '@woocommerce/currency';`
// It's supported only since WC 7.6.0
// - `import { userEvent } from '@testing-library/user-event';`
// It works but the official documentation also recommends using the default export
'import/no-named-as-default': 'off',
'jest/expect-expect': [
'warn',
{ assertFunctionNames: [ 'expect', 'expect[A-Z]\\w*' ] },
],
// Turn it off temporarily because it involves a lot of re-alignment. We can revisit it later.
'jsdoc/check-line-alignment': 'off',
// Originally, `@fires` tag indicates that when a method is called, it fires
// a specified type of event that can be listened to, e.g. a native `CustomEvent`.
// The JS package `tracking-jsdoc` changes the definition of the `@fires` tag to
// be able to indicate a tracking event will be sent. Therefore, here we list
// shared `@event` names to avoid false alarms.
'jsdoc/no-undefined-types': [
'error',
{
definedTypes: [
...jsdocConfig.rules[ 'jsdoc/no-undefined-types' ][ 1 ]
.definedTypes,
'gla_datepicker_update',
'gla_documentation_link_click',
'gla_faq',
'gla_filter',
'gla_google_account_connect_button_click',
'gla_google_mc_link_click',
'gla_launch_paid_campaign_button_click',
'gla_mc_account_switch_account_button_click',
'gla_modal_closed',
'gla_modal_open',
'gla_paid_campaign_step',
'gla_setup_ads',
'gla_setup_mc',
'gla_table_go_to_page',
'gla_table_page_click',
],
},
],
},
overrides: [
{
files: [ 'js/src/external-components/woocommerce/**' ],
rules: {
'@wordpress/i18n-text-domain': [
'error',
{ allowedTextDomain: 'woocommerce' },
],
},
},
{
files: [ 'js/src/external-components/wordpress/**' ],
rules: {
'@wordpress/i18n-text-domain': [
'error',
{ allowedTextDomain: '' },
],
},
},
{
files: [ 'tests/e2e/**/*.js' ],
rules: {
Expand Down
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
engine-strict=true

# The legacy-peer-deps option eliminates React versioning conflicts in npm peer
# dependencies between @wordpress/* and @woocommerce/*. It should be removed
# after they don't have versioning conflicts.
legacy-peer-deps=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v20
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ Now you can build the files using one of these commands:

Notice this repository has `engine-strict=true` directive set. That means you cannot install dependencies with other Node engines rather than the ones defined in the `engines` directive inside [package.json](./package.json). It's recommended to use [NVM](https://github.com/nvm-sh/nvm) and run `nvm use` before installing the dependencies to be sure you're using the recommended Node version.

We added Node `^18` and npm `^9` to allow dependabot to update our dependencies. But these are not supported versions.
The `engines` in package.json includes npm `^9` to allow dependabot to update our dependencies. However, it's not the version intended to be used in development.

- See https://github.com/dependabot/dependabot-core/issues/9277

## Working with DEWP

Expand Down
20 changes: 20 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
*** Google for WooCommerce Changelog ***

= 2.8.5 - 2024-09-05 =
* Break - Remove WooCommerce Navigation integration.
* Fix - Issue with syncing shipping rates with more than two decimals.
* Fix - Log exceptions triggered by assets being enqueued before being registered.
* Tweak - Use remote-site-status to check the WPCOM Auth status.
* Tweak - WC 9.3.0 compatibility.

= 2.8.4 - 2024-08-28 =
* Dev - Align namespaces for unit tests.
* Dev - Avoid accidentally using the event object to reset the asset group values in the CampaignAssetsForm component.
* Dev - Migrate jest tests to use Node.js 20.
* Dev - Rewrite the replacer of JSON.stringify in getReportKey to ensure it returns the same key regardless of the query keys' order.
* Dev - Upgrade to use Node.js 20 and bump npm dependencies.
* Dev - Use a fixed SKU number when testing product adapter.
* Fix - issue with comma separators for Shipping Rates.
* Tweak - Connect Test Page errors when WPCOM token is not connected.
* Tweak - Make the Tooltip use the new placement prop when WordPress >= 6.4.
* Tweak - Replace deprecated event.keyCode with event.code for the verification code inputs in the contact information setting.
* Tweak - Update the copy in the "Linked accounts" of the accounts connection setting to include Google Ads account.

= 2.8.3 - 2024-08-20 =
* Fix - Return empty array props as empty objects in WCOM Proxy responses.
* Tweak - Display additional context in error message when Google Ads account limit reached.
Expand Down
6 changes: 3 additions & 3 deletions google-listings-and-ads.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Google for WooCommerce
* Plugin URL: https://wordpress.org/plugins/google-listings-and-ads/
* Description: Native integration with Google that allows merchants to easily display their products across Google’s network.
* Version: 2.8.3
* Version: 2.8.5
* Author: WooCommerce
* Author URI: https://woocommerce.com/
* Text Domain: google-listings-and-ads
Expand All @@ -13,7 +13,7 @@
* Requires PHP Architecture: 64 bits
* Requires Plugins: woocommerce
* WC requires at least: 6.9
* WC tested up to: 9.2.0
* WC tested up to: 9.3.0
* Woo:
*
* @package WooCommerce\Admin
Expand All @@ -30,7 +30,7 @@

defined( 'ABSPATH' ) || exit;

define( 'WC_GLA_VERSION', '2.8.3' ); // WRCS: DEFINED_VERSION.
define( 'WC_GLA_VERSION', '2.8.5' ); // WRCS: DEFINED_VERSION.
define( 'WC_GLA_MIN_PHP_VER', '7.4' );
define( 'WC_GLA_MIN_WC_VER', '6.9' );

Expand Down
27 changes: 23 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
setupFiles: [ 'core-js', '<rootDir>/js/src/tests/jest-unit.setup.js' ],
transformIgnorePatterns: [
// Fix that `[email protected]` doesn't provide the CommonJS build, so it needs to be transformed.
'<rootDir>/node_modules/(?!is-plain-obj/)',
'<rootDir>/node_modules/(?!@woocommerce/components/node_modules/is-plain-obj/)',
],
moduleNameMapper: {
'\\.(png|jpg)$': '<rootDir>/tests/mocks/assets/imageMock.js',
Expand All @@ -20,6 +20,18 @@ module.exports = {
'<rootDir>/js/src/tests/dependencies/woocommerce/settings',
'@automattic/calypso-config':
'<rootDir>/js/src/tests/dependencies/automattic/calypso-config',
// Ignore that 'qrcode.react' module is incorrectly listed in dev dependencies of '@automattic/components'.
// Ref: https://github.com/Automattic/wp-calypso/blob/%40automattic/components%402.1.1/packages/components/package.json#L72
'@automattic/components':
'<rootDir>/js/src/tests/dependencies/automattic/components',
// Fix `@woocommerce/components` still using incompatible `@woocommerce/currency`.
'@woocommerce/currency': require.resolve( '@woocommerce/currency' ),
// Fix the React versioning conflicts between @wordpress/* and @woocommerce/*.
// It should be removed after they don't have versioning conflicts.
'^react$': require.resolve( 'react' ),
// Force 'uuid' to resolve with the CommonJS entry point, because jest doesn't
// support `package.json.exports`.
'^uuid$': require.resolve( 'uuid' ),
},
// Exclude e2e tests from unit testing.
testPathIgnorePatterns: [
Expand All @@ -38,9 +50,16 @@ module.exports = {
'<rootDir>/js/build-dev',
],
globals: {
wcAdminFeatures: {
navigation: false,
wcSettings: {
currency: {
code: 'USD',
precision: 2,
symbol: '$',
symbolPosition: 'left',
decimalSeparator: '.',
priceFormat: '%1$s%2$s',
thousandSeparator: ',',
},
},
},
timers: 'fake',
};
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@
};

const handleClose = () => {
if ( deleting ) return;
if ( deleting ) {
return;

Check warning on line 59 in js/src/attribute-mapping/attribute-mapping-delete-rule-modal.js

View check run for this annotation

Codecov / codecov/patch

js/src/attribute-mapping/attribute-mapping-delete-rule-modal.js#L59

Added line #L59 was not covered by tests
}
onRequestClose( 'dismiss' );
};

return (
<AppModal
onRequestClose={ handleClose }
title={ __( 'Delete attribute rule?', ' google-listings-and-ads' ) }
title={ __( 'Delete attribute rule?', 'google-listings-and-ads' ) }
buttons={ [
<AppButton
disabled={ deleting }
Expand Down
8 changes: 5 additions & 3 deletions js/src/attribute-mapping/attribute-mapping-rule-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@
};

const handleClose = () => {
if ( saving ) return;
if ( saving ) {
return;

Check warning on line 165 in js/src/attribute-mapping/attribute-mapping-rule-modal.js

View check run for this annotation

Codecov / codecov/patch

js/src/attribute-mapping/attribute-mapping-rule-modal.js#L165

Added line #L165 was not covered by tests
}
onRequestClose( 'dismiss' );
};

Expand All @@ -172,8 +174,8 @@
className="gla-attribute-mapping__rule-modal"
title={
rule
? __( 'Manage attribute rule', ' google-listings-and-ads' )
: __( 'Create attribute rule', ' google-listings-and-ads' )
? __( 'Manage attribute rule', 'google-listings-and-ads' )
: __( 'Create attribute rule', 'google-listings-and-ads' )
}
buttons={ [
<AppButton
Expand Down
4 changes: 2 additions & 2 deletions js/src/attribute-mapping/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { __ } from '@wordpress/i18n';
import Section from '.~/wcdl/section';
import AttributeMappingDescription from './attribute-mapping-description';
import AttributeMappingTable from './attribute-mapping-table';
import NavigationClassic from '.~/components/navigation-classic';
import MainTabNav from '.~/components/main-tab-nav';
import RebrandingTour from '.~/components/tours/rebranding-tour';
import './index.scss';

Expand All @@ -21,7 +21,7 @@ import './index.scss';
const AttributeMapping = () => {
return (
<div className="gla-attribute-mapping">
<NavigationClassic />
<MainTabNav />
<RebrandingTour />
<Section
title={ __( 'Manage attributes', 'google-listings-and-ads' ) }
Expand Down
24 changes: 15 additions & 9 deletions js/src/attribute-mapping/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ describe( 'Attribute Mapping', () => {
} );

test( 'Add new Attribute mapping - Enum', async () => {
const user = userEvent.setup();
const { queryByText, findByRole } = render( <AttributeMapping /> );

// Modal is open when clicking th button
Expand All @@ -198,11 +199,11 @@ describe( 'Attribute Mapping', () => {
expect( buttonSave ).toBeTruthy();
expect( buttonSave ).toBeDisabled();

userEvent.selectOptions( select, 'adult' );
await user.selectOptions( select, 'adult' );
const enumSelect = await findByRole( 'combobox', {
name: 'Select default value',
} );
userEvent.selectOptions( enumSelect, 'no' );
await user.selectOptions( enumSelect, 'no' );

expect( buttonSave ).toBeEnabled();
fireEvent.click( buttonSave );
Expand All @@ -216,6 +217,7 @@ describe( 'Attribute Mapping', () => {
} );

test( 'Add new Attribute mapping - Field / Fixed value', async () => {
const user = userEvent.setup();
const { queryByText, findByRole } = render( <AttributeMapping /> );

// Modal is open when clicking th button
Expand All @@ -226,26 +228,27 @@ describe( 'Attribute Mapping', () => {
const select = await findByRole( 'combobox', {
name: 'Select a Google attribute that you want to manage',
} );
userEvent.selectOptions( select, 'brands' );
await user.selectOptions( select, 'brands' );

// Show fixed value when we check "Set a fixed value" radio
const setFixedRadio = await findByRole( 'radio', {
name: 'Set a fixed value',
} );
userEvent.click( setFixedRadio );
await user.click( setFixedRadio );
await findByRole( 'textbox' );

// Show selector value when we check "Use value from existing product field" radio
const setFieldRadio = await findByRole( 'radio', {
name: 'Use value from existing product field',
} );
userEvent.click( setFieldRadio );
await user.click( setFieldRadio );
await findByRole( 'combobox', {
name: 'Use value from existing product field',
} );
} );

test( 'Update Attribute mapping Rule', async () => {
const user = userEvent.setup();
const { queryAllByText, queryByText, findByRole } = render(
<AttributeMapping />
);
Expand All @@ -260,7 +263,7 @@ describe( 'Attribute Mapping', () => {

const buttonSave = queryByText( 'Save rule' );
expect( buttonSave ).toBeDisabled();
userEvent.selectOptions( enumSelect, 'no' );
await user.selectOptions( enumSelect, 'no' );
expect( buttonSave ).toBeEnabled();
fireEvent.click( buttonSave );

Expand Down Expand Up @@ -304,6 +307,7 @@ describe( 'Attribute Mapping', () => {
} );

test( 'Renders categories helper', async () => {
const user = userEvent.setup();
const { queryByText, findByText } = render(
<AttributeMappingTableCategories
categories={ '1' }
Expand All @@ -313,11 +317,12 @@ describe( 'Attribute Mapping', () => {
expect( queryByText( 'All except' ) ).toBeTruthy();
const category = queryByText( '1 category' );
expect( category ).toBeTruthy();
userEvent.hover( category );
await user.hover( category );
await findByText( 'Category 1' );
} );

test( 'Renders categories helper with tons of categories', async () => {
const user = userEvent.setup();
const { queryByText, findByText } = render(
<AttributeMappingTableCategories
categories={ '1,2,3,1,2,3,1,2,3,1,2,3' }
Expand All @@ -328,14 +333,15 @@ describe( 'Attribute Mapping', () => {
expect( queryByText( 'Only in' ) ).toBeTruthy();
const categories = queryByText( '12 categories' );
expect( categories ).toBeTruthy();
userEvent.hover( categories );
await user.hover( categories );
await findByText(
'Category 1, Category 2, Category 3, Category 1, Category 2'
);
await findByText( '+ 7 more' );
} );

test( 'Shows deleted categories', async () => {
const user = userEvent.setup();
const { queryByText, findByText } = render(
<AttributeMappingTableCategories
categories={ '1,6' }
Expand All @@ -346,7 +352,7 @@ describe( 'Attribute Mapping', () => {
expect( queryByText( 'Only in' ) ).toBeTruthy();
const categories = queryByText( '2 categories' );
expect( categories ).toBeTruthy();
userEvent.hover( categories );
await user.hover( categories );
await findByText( 'Category 1, Category ID 6 (deleted)' );
} );

Expand Down
Loading
Loading