Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
1f7a5c0
Add E2E reset command
jakejackson1 Mar 13, 2025
b2320b9
Setup Playwright E2E tooling
jakejackson1 Apr 14, 2026
647225e
Start creating Playwright E2E test
jakejackson1 Mar 20, 2025
d6a9518
Flesh out the [gravitypdf] shortcode Playwright tests
jakejackson1 Mar 25, 2025
6d98774
Continue setting up Playwright E2E tests
jakejackson1 Mar 26, 2025
ded0324
Add Redirect Shortcode confirmation
jakejackson1 Mar 26, 2025
52c0a76
Continue updating playwright
jakejackson1 Mar 26, 2025
4dbb882
Convert Debug Mode to Playwright test
jakejackson1 Mar 31, 2025
c425586
Remove extra steps in Download Shortcode Playwright tests
jakejackson1 Mar 31, 2025
deb6784
Lay the groundwork for a couple of Fixtures
jakejackson1 Mar 31, 2025
67e3436
Fix fatal error if add-on improperly registered
jakejackson1 Aug 22, 2025
062b006
Start restructuring E2E environment and dev tools
jakejackson1 Aug 25, 2025
cc8bafe
Minor tweaks to the playwright tests
jakejackson1 Aug 25, 2025
6bfc4df
Improve fixtures
jakejackson1 Aug 25, 2025
ed7bd09
Test Entry Details View/Download links
jakejackson1 Aug 25, 2025
0f3e459
Test for pretty permalinks in merge tag attribute
jakejackson1 Aug 25, 2025
8ac7e13
Simplify mergetag attributes test
jakejackson1 Aug 25, 2025
482fabf
Continue working on tests
jakejackson1 Aug 25, 2025
4f39a4f
Add inactive PDF test
jakejackson1 Aug 25, 2025
fe3a62d
Add conditional PDF test
jakejackson1 Aug 25, 2025
07a1a18
Continue working on Playwright tests
jakejackson1 Aug 25, 2025
26aa511
Fix some lint issues
jakejackson1 Aug 25, 2025
82e1778
Update caniuse
jakejackson1 Aug 25, 2025
2c3d83e
Add snapshots
jakejackson1 Aug 25, 2025
eb83d71
Fix JS linting errors
jakejackson1 Apr 14, 2026
4a4e6e0
Update deps
jakejackson1 Apr 14, 2026
437a926
Remove unnecessary wp-env reset comment
jakejackson1 Aug 26, 2025
209a529
Remove unneeded configure code
jakejackson1 Aug 26, 2025
ba67c98
Get Playwright tests working correctly after style change
jakejackson1 Aug 26, 2025
e3c2372
Add Notification checkbox test
jakejackson1 Aug 26, 2025
7b1a96c
Force Script Debug mode in wp-env
jakejackson1 Aug 26, 2025
8064161
Check Notification checkboxes save
jakejackson1 Aug 26, 2025
6452430
Fix issue reinitializing merge tags
jakejackson1 Aug 26, 2025
6711227
Fix syncing issue with Font selector
jakejackson1 Aug 27, 2025
9a8c081
Remove React Hot for the moment
jakejackson1 Aug 27, 2025
78efcc3
Add Filename, mergetag, and conditional logic settings test
jakejackson1 Aug 27, 2025
290e96d
Add Paper settings tests
jakejackson1 Aug 27, 2025
d78945f
Add security and toggle tests
jakejackson1 Aug 27, 2025
2c33e03
Add color picker image
jakejackson1 Aug 27, 2025
48bdb61
Add Rich Text test
jakejackson1 Aug 27, 2025
bd1c888
Fix script arguments and lint
jakejackson1 Aug 27, 2025
2e28cb4
Fix up references
jakejackson1 Aug 27, 2025
fdc8fe3
Ensure jest script can run
jakejackson1 Sep 3, 2025
f236da3
Undo `--` addition to package scripts
jakejackson1 Sep 3, 2025
90daf59
Fix Jest errors after merging in the Font selector fix
jakejackson1 Sep 3, 2025
bab8af3
Revert hot-patch merge conflict
jakejackson1 Sep 18, 2025
23b8a22
Replace \GFCommon::$version with \GFForms::$version
jakejackson1 Mar 11, 2026
e5f9713
Update composer lock file
jakejackson1 Mar 11, 2026
7b72b71
Add WordPress as suggested composer package
jakejackson1 Mar 11, 2026
910f848
Fix phpcs lint deprecation
jakejackson1 Mar 11, 2026
f3fc21f
Update the Upload library
jakejackson1 Mar 11, 2026
1eb3526
Continue working on Playwright tests
jakejackson1 Mar 12, 2026
7dc027b
Update unit tests to be compatible with WP7.0 and PHP8.5
jakejackson1 Mar 23, 2026
3adcd81
Update font manager + E2E tests
jakejackson1 Mar 23, 2026
018ed67
Update some failing E2E tests
jakejackson1 Mar 23, 2026
c7efc52
Update some failing E2E tests
jakejackson1 Apr 8, 2026
3820348
Update deps
jakejackson1 Apr 14, 2026
d88e500
Update claude
jakejackson1 Apr 14, 2026
44a8a86
Modernize some of the toolchain
jakejackson1 Apr 14, 2026
181ea4d
Modernize some of the toolchain
jakejackson1 Apr 14, 2026
50e44ef
Modernize some of the toolchain
jakejackson1 Apr 14, 2026
5da3968
Fix bad merge
jakejackson1 Apr 14, 2026
194b786
Resolve ESLint issues
jakejackson1 Apr 14, 2026
07278b9
Remove babel and phpunit config file
jakejackson1 Apr 14, 2026
aa1334a
Fix Jest test issue
jakejackson1 Apr 15, 2026
121cf19
Fix the PHPUnit tests
jakejackson1 Apr 15, 2026
a8bf6ce
Fix Playwright setup issues
jakejackson1 Apr 15, 2026
332f138
Fix playwright tests
jakejackson1 Apr 15, 2026
5ebf9e0
Adjust styles to be compatible with WP 7.0
jakejackson1 Apr 15, 2026
0d1a3ac
Add snapshots on WP7.0
jakejackson1 Apr 15, 2026
bac82ae
Improve E2E tests
jakejackson1 Apr 15, 2026
09ae140
Improve E2E tests
jakejackson1 Apr 15, 2026
71d2322
Update E2E command and GitHub Action
jakejackson1 Apr 15, 2026
eb223bc
Update CLAUDE.md
jakejackson1 Apr 15, 2026
fce2eb7
Update build
jakejackson1 Apr 15, 2026
9c44ed7
Update build
jakejackson1 Apr 15, 2026
93bb9eb
Revert
jakejackson1 Apr 15, 2026
a4c73f3
Add translator comments
jakejackson1 Apr 15, 2026
b620f28
Update @since from hotpatch code
jakejackson1 Apr 15, 2026
0f725d5
Add missing translator comment
jakejackson1 Apr 15, 2026
57bc8ed
Remove non-canonical notice
jakejackson1 Apr 15, 2026
1c9cdad
Revert
jakejackson1 Apr 15, 2026
26d1fdf
Fix playwright error
jakejackson1 Apr 16, 2026
930976c
Tweak styles
jakejackson1 Apr 16, 2026
14a4fc3
Use product build of WP in development
jakejackson1 Apr 16, 2026
fa7e3ab
Update translations
jakejackson1 Apr 16, 2026
039a793
Update translations
jakejackson1 Apr 16, 2026
7bd0970
Update translations
jakejackson1 Apr 16, 2026
f41bedc
Fix color picker
jakejackson1 Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
53 changes: 37 additions & 16 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,55 @@ Gravity PDF is a WordPress plugin that generates PDF documents from Gravity Form
### JavaScript

```bash
yarn dev # Start webpack dev server with hot reload
yarn build # Production webpack build
yarn test:js # Run Jest unit tests
yarn dev # Start webpack dev server with hot reload
yarn dev:build # One-shot webpack build without watching
yarn build # Production webpack build
yarn test:js # Run Jest unit tests
yarn test:js:watch # Run Jest in watch mode
yarn test:js -- tests/js-unit/react/sagas/fontManager.test.js # Run single test file
yarn test:js -- --testNamePattern="test name" # Run single test by name
yarn lint:js # ESLint check
yarn lint:css # Sass/CSS lint check
yarn format # Auto-fix JS/CSS/PHP formatting
yarn lint:js # ESLint check
yarn lint:js --fix # Auto-fix ESLint errors (e.g. JSDoc alignment)
yarn lint:css # Sass/CSS lint check
yarn format # Auto-fix JS/CSS/PHP formatting
```

### PHP

```bash
npm run test:php # Run PHPUnit in Docker (wp-env required)
npm run test:php -- --filter TestClassName # Run single test class
npm run test:php -- --filter testMethod # Run single test method
npm run test:php:multisite # Run multisite PHPUnit tests
yarn test:php # Run PHPUnit in Docker (`yarn wp-env:integration start` required)
yarn test:php -- --filter TestClassName # Run single test class
yarn test:php -- --filter testMethod # Run single test method
yarn test:php:multisite # Run multisite PHPUnit tests
composer lint # PHPCS check
composer lint:fix # PHPCS auto-fix
```

PHP tests run inside a Docker container via `wp-env` — you cannot run PHPUnit directly. Start the environment first with `yarn wp-env start`.
PHP tests run inside a Docker container via `wp-env` — you cannot run PHPUnit directly. Start the environment first with `yarn wp-env:integration start`.

### E2E Tests (Playwright)

```bash
yarn wp-env:e2e start && yarn wp-env:e2e:permalinks start # Start dedicated E2E environment (port 8702 and 8703)
yarn test:e2e # Run all Playwright tests (headless)
yarn test:e2e:debug # Open Playwright UI for interactive debugging
```

E2E tests live in `tests/playwright/` and are split into two projects:
- `core/` — tests against the standard environment (port 8702, plain permalinks)
- `permalinks/` — tests against an environment with pretty permalinks (port 8703, started automatically)

Artifacts (screenshots, traces) are written to `tmp/artifacts/`.

### Environment

```bash
yarn wp-env start # Start Docker WordPress dev environment
yarn wp-env stop # Stop Docker environment
yarn start # Start environment + hot reload dev server
yarn wp-env start # Start dev environment (port 8700)
yarn wp-env:integration start # Start PHP test environment (port 8701)
yarn wp-env:e2e start # Start E2E test environment (port 8702)
yarn wp-env:e2e:permalinks start # Start E2E test environment with pretty permalinks enabled (port 8703)
yarn wp-env stop # Stop the default dev environment
yarn start # Start dev environment + hot reload dev server
```

## Architecture
Expand Down Expand Up @@ -80,11 +100,12 @@ Legacy jQuery code coexists with the React app; they are separate bundles and do

- **PHP tests**: `tests/phpunit/` mirrors `src/` structure. Extends `WP_UnitTestCase`. Mock data in `tests/phpunit/unit-tests/Mocks/`.
- **JS tests**: `tests/js-unit/` mirrors React source structure. Uses Jest + Enzyme. Coverage threshold: 75%.
- **E2E tests**: `tests/e2e/` uses TestCafe against a running WordPress instance.
- **E2E tests (Playwright)**: `yarn test:e2e` — config at `tools/playwright/config.ts`. Use `yarn test:e2e:playwright` for the interactive UI mode.

### Key Constraints

- PRs must target the `development` branch (not `main`)
- Each PR should contain a single commit
- Minimum PHP 7.3 compatibility required
- jQuery is an external (provided by WordPress); never bundle it
- Run `composer prefix` after adding new Composer dependencies to namespace them via php-scoper
- Run `composer prefix` after adding new Composer dependencies to namespace them via php-scoper
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Add a valid Gravity Forms license key. To run PHPUnit locally you will need an Elite License.
GF_LICENSE=00000000000000000000000000000000
WP_BASE_URL=http://localhost
WP_ENV_TESTS_PORT=8889
# Enable AI Translations
# Usage:
# composer run translate
POTOMATIC_OPENAI_API_KEY=
6 changes: 3 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.cache
build
node_modules
.cache
build
node_modules
vendor
14 changes: 13 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@ module.exports = {
rules: {
'no-alert': 'off',
'jest/no-done-callback': 'off',
camelcase: 'off',
'camelcase': 'off',
'jsdoc/empty-tags': ['off', { tags: ['package'] }],
'@typescript-eslint/no-unused-vars': 'off'
},
settings: {
jsdoc: {
mode: 'closure',
},
"import/resolver": {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
"typescript": {}
}
},
};
14 changes: 1 addition & 13 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
/.coveralls.yml export-ignore
/.eslintrc export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.github export-ignore
/.docker export-ignore
/jest.config.js export-ignore
/node_modules export-ignore
/phpcs.xml.dist export-ignore
/phpcompat.xml.dist export-ignore
/phpunit.xml.dist export-ignore
/.env.example export-ignore
/tests export-ignore
/tmp export-ignore

*.sh eol=lf
*.sh eol=lf
68 changes: 17 additions & 51 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,27 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true


jobs:
# Runs PHP coding standards checks.
#
# Violations are reported inline with annotations.
#
# Performs the following steps:
# - Checks out the repository.
# - Configures caching for Composer.
# - Sets up PHP.
# - Logs debug information.
# - Installs Composer dependencies (from cache if possible).
# - Logs PHP_CodeSniffer debug information.
# - Runs PHPCS on the full codebase with warnings suppressed.
# - Runs PHPCS on the `tests` directory without warnings suppressed.
# Only run this action if a Pull Request contains the label 'run-tests'
check_for_string_in_pull_request_comment:
name: Should workflow run?
runs-on: ubuntu-latest
steps:
- if: ${{ github.event_name == 'pull_request' && ! contains(github.event.pull_request.labels.*.name, 'run-tests') }}
uses: action-pack/cancel@v1

phpcs:
name: PHP coding standards
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer, cs2pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Log debug information
run: |
Expand All @@ -49,53 +41,25 @@ jobs:
run: |
composer install --prefer-dist --no-suggest --no-progress --no-ansi --no-interaction --no-scripts
echo "${PWD}/vendor/bin" >> $GITHUB_PATH
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Log PHPCS debug information
run: composer run lint -- -i
run: composer run phpcs:lint .

- name: Run PHP compatibility tests
run: composer run lint -- --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr

- name: Run PHPCS on all plugin files
run: composer run lint -- -q -n --report=checkstyle | cs2pr
run: composer run phpcs:compatibility .

# Runs the JavaScript coding standards checks.
#
# Performs the following steps:
# - Checks out the repository.
# - Logs debug information about the runner container.
# - Installs NodeJS
# - Sets up caching for NPM.
# - Logs updated debug information.
# _ Installs NPM dependencies using install-changed to hash the `package.json` file.
# - Run the Run ESLint checks.
jshint:
name: JavaScript coding standards
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup Node JS
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- name: Cache node modules
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Log debug information
run: |
npm --version
Expand All @@ -106,8 +70,10 @@ jobs:
locale -a

- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: yarn install
run: yarn install --frozen-lockfile

- name: Run ESLint
run: yarn lint:js

- name: Run CSS Lint
run: yarn lint:css
16 changes: 3 additions & 13 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -25,22 +25,12 @@ jobs:
uses: devops-actions/action-get-tag@v1.0.2

- name: Setup Node JS
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- name: General debug information
run: |
npm --version
node --version
yarn --version
curl --version
git --version
php --version
composer --version

- name: Gravity PDF Build
run: bash ./bin/build.sh $SOURCE_TAG
run: bash ./tools/release/build.sh $SOURCE_TAG
env:
SOURCE_TAG: ${{steps.tag.outputs.tag}}

Expand Down
Loading
Loading