-
Notifications
You must be signed in to change notification settings - Fork 116
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
GravityForms connector test implemented #1139
base: develop
Are you sure you want to change the base?
Conversation
|
||
// Do stuff. | ||
$notification = array( | ||
'id' => uniqid(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align assignments.
composer.json
Outdated
@@ -15,7 +15,8 @@ | |||
"wp-cli/wp-cli-bundle": "^2.2", | |||
"wp-coding-standards/wpcs": "^2.2", | |||
"wp-phpunit/wp-phpunit": "^5.4", | |||
"wpsh/local": "^0.2.3" | |||
"wpsh/local": "^0.2.3", | |||
"wp-premium/gravityforms": "^2.4.17" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kidunot89 we need to find another way to pull in this plugin and test. While GPL code on in wp-premium
Org is technically legal (I'm not a lawyer 🤐), we will not support it as it takes away from the developers who built these plugins and poses as a potential security risk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can pull it in as a zip someway? I have a developer's license, so access is not a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to ideas, is there a recommend method you have for pull this plugin in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also open to ideas. One that comes to mind is we have a private S3bucket (or other storage service) from which we can read with private keys in Github. The we can use an archive installer with Composer to pull in those packages.
I checked, but did not find any way to add files to Github or Travis for pulling in the data, but the above solution may be a good start.
@kasparsd any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I'm not sure how to handle this. How about we skip the tests if the dependency is not found for now?
6ed189d
to
2e84b50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kidunot89 The tests alone look great. Could we get those merged in now and leave the plugin dependency out of tracking/dependency list until we find a solid solution for working with commercial plugins that don't have source code available publicly.
@kasparsd I'm not sure about leaving the plugin out, since the tests relies on it. |
@kidunot89 and @kasparsd In order to add the plugin it would need to be done in a way that is progressive and legal. It should not fail a build if the plugin is missing, so tests should only run if installed and active, and while we can install it with Composer I'm not sure if we can gracefully fail. At any rate the minimum changes are that we need to add this object to the
Also, we will need to add There are really only two hurdles:
|
2e84b50
to
99aff43
Compare
@kasparsd @ivankruchkoff The GravityForms package has been updated as @derekherman suggested, and I've added the |
99aff43
to
f06174b
Compare
f06174b
to
fe9f8f1
Compare
fe9f8f1
to
71ce5fc
Compare
71ce5fc
to
74148a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kidunot89 I tried looking into the Travis issue but I'm not sure what is happening. Could it be that some of the dependencies were updated via composer update
? It appears to be happening here:
composer.json
Outdated
"type": "wordpress-plugin", | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://www.gravityhelp.com/wp-content/plugins/gravitymanager/api.php?op=get_plugin&slug=gravityforms&key={%GRAVITYFORMS_KEY}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that mean that only people with GF key will be able to work on the plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kasparsd Yea, it is. 🤔 This might need some further tooling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should skip GravityForms connector test unless the developer installs it as a dev
specifically with composer. Then can probably move the whole GravityForms install process into the Travis-CI script and take it out of the composer.json
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kasparsd ☝️ What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is a good idea! We could even have another composer.json file for installing these external dependencies.
7af0429
to
01a914d
Compare
01a914d
to
595d5ae
Compare
- | | ||
composer config repositories."1" "{ | ||
\"type\": \"package\", | ||
\"package\": { | ||
\"name\": \"gravityforms/gravityforms\", | ||
\"version\": \"2.4.21.3\", | ||
\"type\": \"wordpress-plugin\", | ||
\"dist\": { | ||
\"type\": \"zip\", | ||
\"url\": \"https://www.gravityhelp.com/wp-content/plugins/gravitymanager/api.php?op=get_plugin&slug=gravityforms&key=$GRAVITYFORMS_KEY\" | ||
}, | ||
\"require\": { | ||
\"composer/installers\": \"^1.4\", | ||
\"gotoandplay/gravityforms-composer-installer\": \"^2.3\" | ||
} | ||
} | ||
}" | ||
- npm install | ||
- composer require --dev gravityforms/gravityforms:2.4.21.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kasparsd This should do the trick. I don't think there is a need for an alternative composer.json
, but it does make the repositories array and object.
But I revert it in the before_deploy
🤔.
@@ -50,6 +50,7 @@ jobs: | |||
if: branch IS present AND type = push | |||
script: npm run release | |||
before_deploy: | |||
- git restore composer.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kasparsd This is to revert the changes made in the install
.
Partially fixes #1093
Summary checklist
gform_after_save_form
callback test implemented and passing.gform_delete_lead
callback test implemented and passing.gform_pre_confirmation_save
callback test implemented and passing.gform_pre_notification_save
callback test implemented and passing.gform_pre_notification_deleted
callback test implemented and passing.gform_pre_confirmation_deleted
callback test implemented and passing.gform_confirmation_status
callback test implemented and passing.gform_notification_status
callback test implemented and passing.check
function test implemented and passing.gform_post_note_added
callback test implemented and passing.gform_pre_note_deleted
callback test implemented and passing.gform_update_status
callback test implemented and passing.gform_update_is_read
callback test implemented and passing.gform_update_is_starred
callback test implemented and passing.log_form_action
function test implemented and passing.gform_post_export_entries
callback test implemented and passing.gform_forms_post_import
callback test implemented and passing.gform_export_separator
callback refactored. It's now thegform_export_form
callback and has been tested.gform_export_options
callback. Further inspection is needed to determine it's relevance.