Skip to content

Commit e28558d

Browse files
authored
Release/0.9.0 (#162)
* tests: fix confirmation key * chore: update composer deps. * chore: version bump to 0.9.0
1 parent 2a61ee9 commit e28558d

File tree

9 files changed

+198
-160
lines changed

9 files changed

+198
-160
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## v0.9.0 - Conditional Logic Support on Confirmations
4+
5+
This minor release adds the `conditionalLogic` GraphQL fiel to `gravityFormsForm.confirmations`. We also squashed a few bugs and implemented some more WPUnit tests.
6+
7+
*Note*: This release technically contains breaking changes for developers making use of `DataManipulator` class methods in their own code.
8+
9+
- fix: consistently apply Gravity Forms filters and WPGraphQL error checking to `GFUtils::get_forms()`.
10+
- feat: add `conditionalLogic` GraphQL field to `gravityFormsForm.confirmations`.
11+
- dev!: makes `DataManipulator` methods static. If you are using any DataManipulator methods in your custom code, please update accordingly.
12+
- tests: Refactor formField tests to extend `FormFieldTestCase`.
13+
- tests: add WPUnit tests for `HtmlField`, `PageField`, `PhoneField`, `SectionField`, `SelectField`, `RadioField`, and `WebsiteField`.
14+
- chore: update Composer deps.
15+
316
## v0.8.2 - Bugfix
417

518
This minor release fixes `hasNextPage` and `hasPreviousPage` checks on Entry connections.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Project Status: Active.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
44
![Packagist License](https://img.shields.io/packagist/l/harness-software/wp-graphql-gravity-forms?color=green)
55
![Packagist Version](https://img.shields.io/packagist/v/harness-software/wp-graphql-gravity-forms?label=stable)
6-
![GitHub commits since latest release (by SemVer)](https://img.shields.io/github/commits-since/harness-software/wp-graphql-gravity-forms/0.8.2)
6+
![GitHub commits since latest release (by SemVer)](https://img.shields.io/github/commits-since/harness-software/wp-graphql-gravity-forms/0.9.0)
77
![GitHub forks](https://img.shields.io/github/forks/harness-software/wp-graphql-gravity-forms?style=social)
88
![GitHub Repo stars](https://img.shields.io/github/stars/harness-software/wp-graphql-gravity-forms?style=social)
99

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Tested up to: 5.8.1
66
Requires PHP: 7.4
77
Requires Gravity Forms: 2.5.0+
88
Requires WPGraphQL: 1.0.0+
9-
Stable tag: 0.8.2
9+
Stable tag: 0.9.0
1010
Maintained at: https://github.com/harness-software/wp-graphql-gravity-forms
1111
License: GPL-3
1212
License URI: https://www.gnu.org/licenses/gpl-3.0.html

tests/_support/TestCase/FormFieldTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* For testing WPGraphQL responses.
66
*
7-
* @since 0.8.3
7+
* @since 0.9.0
88
* @package Tests\WPGraphQL\Gravity\GravityForms
99
*/
1010

tests/wpunit/FormQueriesTest.php

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public function testFormQuery() : void {
5858
$form_id = $this->form_ids[0];
5959
$global_id = Relay::toGlobalId( 'GravityFormsForm', $form_id );
6060
$form = GFAPI::get_form( $form_id );
61+
$confirmation_key = key( $form['confirmations'] );
62+
6163

6264
$query = $this->get_form_query();
6365

@@ -91,27 +93,27 @@ public function testFormQuery() : void {
9193
],
9294
'confirmations' => [
9395
[
94-
'id' => $form['confirmations']['5cfec9464e7d7']['id'],
95-
'isDefault' => $form['confirmations']['5cfec9464e7d7']['isDefault'],
96-
'message' => $form['confirmations']['5cfec9464e7d7']['message'],
97-
'name' => $form['confirmations']['5cfec9464e7d7']['name'],
98-
'pageId' => $form['confirmations']['5cfec9464e7d7']['pageId'],
99-
'queryString' => $form['confirmations']['5cfec9464e7d7']['queryString'],
100-
'type' => $this->tester->get_enum_for_value( Enum\ConfirmationTypeEnum::$type, $form['confirmations']['5cfec9464e7d7']['type'] ),
101-
'url' => $form['confirmations']['5cfec9464e7d7']['url'],
96+
'id' => $form['confirmations'][ $confirmation_key ]['id'],
97+
'isDefault' => $form['confirmations'][ $confirmation_key ]['isDefault'],
98+
'message' => $form['confirmations'][ $confirmation_key ]['message'],
99+
'name' => $form['confirmations'][ $confirmation_key ]['name'],
100+
'pageId' => $form['confirmations'][ $confirmation_key ]['pageId'],
101+
'queryString' => $form['confirmations'][ $confirmation_key ]['queryString'],
102+
'type' => $this->tester->get_enum_for_value( Enum\ConfirmationTypeEnum::$type, $form['confirmations'][ $confirmation_key ]['type'] ),
103+
'url' => $form['confirmations'][ $confirmation_key ]['url'],
102104
'conditionalLogic' => [
103-
'actionType' => $this->tester->get_enum_for_value( Enum\ConditionalLogicActionTypeEnum::$type, $form['notifications']['5cfec9464e529']['conditionalLogic']['actionType'] ),
104-
'logicType' => $this->tester->get_enum_for_value( Enum\ConditionalLogicLogicTypeEnum::$type, $form['notifications']['5cfec9464e529']['conditionalLogic']['logicType'] ),
105+
'actionType' => $this->tester->get_enum_for_value( Enum\ConditionalLogicActionTypeEnum::$type, $form['confirmations'][ $confirmation_key ]['conditionalLogic']['actionType'] ),
106+
'logicType' => $this->tester->get_enum_for_value( Enum\ConditionalLogicLogicTypeEnum::$type, $form['confirmations'][ $confirmation_key ]['conditionalLogic']['logicType'] ),
105107
'rules' => [
106108
[
107-
'fieldId' => $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][0]['fieldId'],
108-
'operator' => $this->tester->get_enum_for_value( Enum\RuleOperatorEnum::$type, $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][0]['operator'] ),
109-
'value' => $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][0]['value'],
109+
'fieldId' => $form['confirmations'][ $confirmation_key ]['conditionalLogic']['rules'][0]['fieldId'],
110+
'operator' => $this->tester->get_enum_for_value( Enum\RuleOperatorEnum::$type, $form['confirmations'][ $confirmation_key ]['conditionalLogic']['rules'][0]['operator'] ),
111+
'value' => $form['confirmations'][ $confirmation_key ]['conditionalLogic']['rules'][0]['value'],
110112
],
111113
[
112-
'fieldId' => $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][1]['fieldId'],
113-
'operator' => $this->tester->get_enum_for_value( Enum\RuleOperatorEnum::$type, $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][1]['operator'] ),
114-
'value' => $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][1]['value'],
114+
'fieldId' => $form['confirmations'][ $confirmation_key ]['conditionalLogic']['rules'][1]['fieldId'],
115+
'operator' => $this->tester->get_enum_for_value( Enum\RuleOperatorEnum::$type, $form['confirmations'][ $confirmation_key ]['conditionalLogic']['rules'][1]['operator'] ),
116+
'value' => $form['confirmations'][ $confirmation_key ]['conditionalLogic']['rules'][1]['value'],
115117
],
116118
],
117119
],
@@ -275,6 +277,8 @@ public function testFormQuery_empty() : void {
275277

276278
$response = $this->graphql( compact( 'query', 'variables' ) );
277279

280+
codecept_debug( $form['confirmations'] );
281+
278282
$expected =
279283
[
280284
'gravityFormsForm' => [
@@ -289,22 +293,7 @@ public function testFormQuery_empty() : void {
289293
'queryString' => $form['confirmations'][ $confirmation_key ]['queryString'],
290294
'type' => $this->tester->get_enum_for_value( Enum\ConfirmationTypeEnum::$type, $form['confirmations'][ $confirmation_key ]['type'] ),
291295
'url' => $form['confirmations'][ $confirmation_key ]['url'],
292-
'conditionalLogic' => [
293-
'actionType' => $this->tester->get_enum_for_value( Enum\ConditionalLogicActionTypeEnum::$type, $form['notifications']['5cfec9464e529']['conditionalLogic']['actionType'] ),
294-
'logicType' => $this->tester->get_enum_for_value( Enum\ConditionalLogicLogicTypeEnum::$type, $form['notifications']['5cfec9464e529']['conditionalLogic']['logicType'] ),
295-
'rules' => [
296-
[
297-
'fieldId' => $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][0]['fieldId'],
298-
'operator' => $this->tester->get_enum_for_value( Enum\RuleOperatorEnum::$type, $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][0]['operator'] ),
299-
'value' => $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][0]['value'],
300-
],
301-
[
302-
'fieldId' => $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][1]['fieldId'],
303-
'operator' => $this->tester->get_enum_for_value( Enum\RuleOperatorEnum::$type, $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][1]['operator'] ),
304-
'value' => $form['notifications']['5cfec9464e529']['conditionalLogic']['rules'][1]['value'],
305-
],
306-
],
307-
],
296+
'conditionalLogic' => null,
308297
],
309298
],
310299
'cssClass' => null,

vendor/composer/InstalledVersions.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class InstalledVersions
3232
'aliases' =>
3333
array (
3434
),
35-
'reference' => 'f9751ae99297bd26b3966a39003faa70cfee7355',
35+
'reference' => '2a61ee9e338aa45939335316ca996d8d4f95dd5b',
3636
'name' => 'harness-software/wp-graphql-gravity-forms',
3737
),
3838
'versions' =>
@@ -258,12 +258,12 @@ class InstalledVersions
258258
),
259259
'guzzlehttp/psr7' =>
260260
array (
261-
'pretty_version' => '1.8.2',
262-
'version' => '1.8.2.0',
261+
'pretty_version' => '1.8.3',
262+
'version' => '1.8.3.0',
263263
'aliases' =>
264264
array (
265265
),
266-
'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91',
266+
'reference' => '1afdd860a2566ed3c2b0b4a3de6e23434a79ec85',
267267
),
268268
'harness-software/wp-graphql-gravity-forms' =>
269269
array (
@@ -272,7 +272,7 @@ class InstalledVersions
272272
'aliases' =>
273273
array (
274274
),
275-
'reference' => 'f9751ae99297bd26b3966a39003faa70cfee7355',
275+
'reference' => '2a61ee9e338aa45939335316ca996d8d4f95dd5b',
276276
),
277277
'hautelook/phpass' =>
278278
array (
@@ -283,39 +283,39 @@ class InstalledVersions
283283
),
284284
'illuminate/collections' =>
285285
array (
286-
'pretty_version' => 'v8.60.0',
287-
'version' => '8.60.0.0',
286+
'pretty_version' => 'v8.63.0',
287+
'version' => '8.63.0.0',
288288
'aliases' =>
289289
array (
290290
),
291-
'reference' => '18fa841df912ec56849351dd6ca8928e8a98b69d',
291+
'reference' => '8e6c29c49f28b90e9de0cac1c14290feb99202c5',
292292
),
293293
'illuminate/contracts' =>
294294
array (
295-
'pretty_version' => 'v8.60.0',
296-
'version' => '8.60.0.0',
295+
'pretty_version' => 'v8.63.0',
296+
'version' => '8.63.0.0',
297297
'aliases' =>
298298
array (
299299
),
300300
'reference' => 'ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913',
301301
),
302302
'illuminate/macroable' =>
303303
array (
304-
'pretty_version' => 'v8.60.0',
305-
'version' => '8.60.0.0',
304+
'pretty_version' => 'v8.62.0',
305+
'version' => '8.62.0.0',
306306
'aliases' =>
307307
array (
308308
),
309309
'reference' => '300aa13c086f25116b5f3cde3ca54ff5c822fb05',
310310
),
311311
'illuminate/support' =>
312312
array (
313-
'pretty_version' => 'v8.60.0',
314-
'version' => '8.60.0.0',
313+
'pretty_version' => 'v8.63.0',
314+
'version' => '8.63.0.0',
315315
'aliases' =>
316316
array (
317317
),
318-
'reference' => 'c0fbc05c4362de423a7a4da137098e9d1affaf54',
318+
'reference' => '259993e2119e99be17c10486f66c5a13b7fe4a70',
319319
),
320320
'justinrainbow/json-schema' =>
321321
array (
@@ -328,12 +328,12 @@ class InstalledVersions
328328
),
329329
'lucatume/wp-browser' =>
330330
array (
331-
'pretty_version' => '3.0.10',
332-
'version' => '3.0.10.0',
331+
'pretty_version' => '3.0.11',
332+
'version' => '3.0.11.0',
333333
'aliases' =>
334334
array (
335335
),
336-
'reference' => '0754da8955c97762976379a9b2ab7175594ff815',
336+
'reference' => 'c215ae0aff4a4ea58e2172e7014a2a7b0c160e25',
337337
),
338338
'mikehaertl/php-shellcommand' =>
339339
array (
@@ -346,15 +346,15 @@ class InstalledVersions
346346
),
347347
'mikemclin/laravel-wp-password' =>
348348
array (
349-
'pretty_version' => '2.0.1',
350-
'version' => '2.0.1.0',
349+
'pretty_version' => '2.0.3',
350+
'version' => '2.0.3.0',
351351
'aliases' =>
352352
array (
353353
),
354-
'reference' => '84ff1113ff6866cdb0350c176dc3c843383e4819',
354+
'reference' => '5225c95f75aa0a5ad4040ec2074d1c8d7f10b5f4',
355355
'replaced' =>
356356
array (
357-
0 => '2.0.1',
357+
0 => '2.0.3',
358358
),
359359
),
360360
'mustache/mustache' =>
@@ -471,12 +471,12 @@ class InstalledVersions
471471
),
472472
'phpdocumentor/type-resolver' =>
473473
array (
474-
'pretty_version' => '1.4.0',
475-
'version' => '1.4.0.0',
474+
'pretty_version' => '1.5.1',
475+
'version' => '1.5.1.0',
476476
'aliases' =>
477477
array (
478478
),
479-
'reference' => '6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0',
479+
'reference' => 'a12f7e301eb7258bb68acd89d4aefa05c2906cae',
480480
),
481481
'phpspec/prophecy' =>
482482
array (
@@ -552,12 +552,12 @@ class InstalledVersions
552552
),
553553
'phpunit/phpunit' =>
554554
array (
555-
'pretty_version' => '8.5.20',
556-
'version' => '8.5.20.0',
555+
'pretty_version' => '8.5.21',
556+
'version' => '8.5.21.0',
557557
'aliases' =>
558558
array (
559559
),
560-
'reference' => '9deefba183198398a09b927a6ac6bc1feb0b7b70',
560+
'reference' => '50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984',
561561
),
562562
'poolshark/wp-graphql-stubs' =>
563563
array (
@@ -1003,12 +1003,12 @@ class InstalledVersions
10031003
),
10041004
'symfony/translation' =>
10051005
array (
1006-
'pretty_version' => 'v5.3.7',
1007-
'version' => '5.3.7.0',
1006+
'pretty_version' => 'v5.3.9',
1007+
'version' => '5.3.9.0',
10081008
'aliases' =>
10091009
array (
10101010
),
1011-
'reference' => '4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6',
1011+
'reference' => '6e69f3551c1a3356cf6ea8d019bf039a0f8b6886',
10121012
),
10131013
'symfony/translation-contracts' =>
10141014
array (

0 commit comments

Comments
 (0)