Skip to content

Commit

Permalink
tests: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine committed Aug 29, 2022
1 parent 08a7013 commit 62d6c3e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mutation/SubmitForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ public static function mutate_and_get_payload() : callable {

$field_values = self::prepare_field_values( $input['fieldValues'], $form, $save_as_draft );

codecept_debug( 'form & field values' );
codecept_debug( $form );
codecept_debug( $field_values );

$submission = GFUtils::submit_form(
$input['id'],
self::get_input_values(
Expand Down
5 changes: 5 additions & 0 deletions src/Mutation/UpdateDraftEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,13 @@ public static function mutate_and_get_payload() : callable {

$entry_data['resumeToken'] = $resume_token;

codecept_debug( 'form, entry data, and updated_entry' );
codecept_debug( $form );
codecept_debug( $entry_data );

// Update the entry.
$resume_token = GFUtils::save_draft_submission( ...array_values( $entry_data ) );
codecept_debug( GFUtils::get_draft_submission( $resume_token ) );

return [
'resumeToken' => $resume_token,
Expand Down
5 changes: 5 additions & 0 deletions src/Mutation/UpdateEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ public static function mutate_and_get_payload() : callable {
return $entry_data;
}

codecept_debug( 'form, entry data, and updated_entry' );
codecept_debug( $form );
codecept_debug( $entry_data );

$updated_entry_id = GFUtils::update_entry( $entry_data );
codecept_debug( GFUtils::get_entry( $updated_entry_id ) );

self::update_post( $updated_entry_id, $form );

Expand Down
3 changes: 3 additions & 0 deletions tests/wpunit/ProductHiddenFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ public function field_value() {
* The graphql field value input.
*/
public function field_value_input() {
codecept_debug( 'field_value');
codecept_debug( $this->field_value );
codecept_debug( $this->fields );
return (string) $this->field_value['quantity'];
}

Expand Down
3 changes: 3 additions & 0 deletions tests/wpunit/ProductSingleFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public function field_value() {
* The graphql field value input.
*/
public function field_value_input() {
codecept_debug( 'field_value');
codecept_debug( $this->field_value );
codecept_debug( $this->fields );
return (string) $this->field_value['quantity'];
}

Expand Down

0 comments on commit 62d6c3e

Please sign in to comment.