I have added test coverage to the module in a fork that I created at https://github.com/juampynr/adobe_analytics.
Here is a summary of my changes:
- Tests now pass. There is a functional test that I took from the Drupal 7 branch, plus I wrote a kernel test for the helper service.
- I ported variable name validation from the Drupal 7 branch.
- I fixed cacheability so it takes into account roles and invalidates when the config form is updated.
- I added CircleCI integration so I could show test results and coverage reports.
- Fixed schema errors, which closes #2880940: Error: Configuration property extra_variables.0.name doesn't exist.
- Converted README to markdown and added CircleCI and Coveralls status badges.
Here is a full diff with my changes.
If you think that this is all good to commit, here is how to add my work into this repository:
git clone git clone --branch 8.x-1.x https://git.drupal.org/project/adobe_analytics.git
git remote add github git@github.com:juampynr/adobe_analytics.git
git pull github 8.x-1.x
git push origin 8.x-1.x
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | adobe_analytics-fix_tests-2962039-15.patch | 44.69 KB | juampynr |
| #14 | adobe_analytics-fix_tests-2962039-14.patch | 44.85 KB | juampynr |
| #14 | Selection_003.png | 75.38 KB | juampynr |
| #12 | adobe_analytics-fix_tests-2962039-12.patch | 30.73 KB | juampynr |
| #8 | adobe_analytics-fix_tests-2962039-8.patch | 39.83 KB | juampynr |
Comments
Comment #2
juampynr commentedComment #3
juampynr commentedComment #4
juampynr commentedComment #5
juampynr commentedJust pushed another commit to fix code to adhere to Drupal's coding standards and best practices. It's currently being evaluated by CircleCI at https://circleci.com/gh/juampynr/adobe_analytics/tree/8.x-1.x.
Once CircleCI completes, the status badge at https://github.com/juampynr/adobe_analytics should show PASSED in green.
Comment #6
juampynr commentedComment #7
naveenvalechaCan you post the patch here on the issue?
Comment #8
juampynr commentedYep! Here it is.
Comment #9
kmoll commented@juampynr, sorry for the delay, I'm going through this now. Is it common for modules to include circle ci test configuration? I've seen some modules add travis. Just curious as I've not seen it in other modules before.
Comment #10
juampynr commentedHi @kmoll!
It's not needed at Drupal.org but I use it at https://github.com/juampynr/adobe_analytics to verify that things work. I could create a patch without it if you prefer. Once the patch gets approved I will mark https://github.com/juampynr/adobe_analytics as obsolete and point it to this project's URL.
Comment #11
kmoll commented@juampynr yeah, lets remove the circleci stuff from the patch for now. If we determine we want to use a testing platform for it we can then decide to add it back or go with travis.
Comment #12
juampynr commentedSure, here you are.
Comment #13
naveenvalechaOverall looks solid. We're near to RTBC great work.
I'm fine with renaming it to Readme.md from the txt file. Please remove the CIRCLE CI information from it.
😍
😍
I love this change but this service is public and any module using this service will break due to the arguments change.However, let's go with this change but mention on the release Notes in bold about this change
We don't need these dev requirements because drupal CI will take care of coding standards and coder
Let's remove this as well.
This change will be covered as part of the service definition change.
Let's do it 😍
😍
Comment #14
juampynr commentedThanks for the feedback! Here is a new patch.
There was a patch from the Drupal 7 version that I was interested in: #2193069: Entity variable overrides. I went ahead and implemented that as a field, like Metatag does. Here is the field form in an article:
Comment #15
juampynr commentedHere is a new patch where I have removed a white space from the README.
Comment #16
kmoll commented@juampynr I think that adding the field moves it out of the scope of the ticket. I think we can add that in, but wonder if we can do it in a separate task and patch. It makes it easier to review. Or can you at least post the interdiff so its easier to see the field related differences.
Comment #17
kmoll commented@juampynr actually no need, I am reviewing now and can review it all together.
Comment #18
kmoll commentedI think the patch looks good. It works as expected and code looks good. The only thing I am thinking is that this be updated:
I feel like this should be opt-in rather than opt-out with defaults set. I know its technically the same thing, but I am wonder if the text should read "Exclude custom variables from config." and "Exclude main Javascript code from config." and have default be FALSE. Technically its a minor thing, but from a user perspective, I think that it is a better way.
Just a discussion point.
Other than that I think it looks good.
Comment #19
kmoll commentedAfter thinking about it more I think that we can just merge as is. I will get this merged today.
Comment #21
kmoll commentedCommitted, thanks juampynr!