Following up with #2077455: Add initial simpletests with a base class where an initial version of Baidu Analytics Test Cases was committed (at 6357889), it seems baidu_analytics.test could probably be further improved:

Test Cases: A few more things we might want to test:

  • Injection of the correct JavaScript Link Tracking code, depending on the configuration for tracking of: Download, Email or Outbound Links.
  • Inclusion of the baidu_analytics.js file in the page if any of the Link Tracking settings is enabled.
  • Tracking of file extensions list should respect configured settings and be inserted in page's JavaScript code if tracking of Downloads is enabled.

 
Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of this feature request, I would be glad to provide more information or explain in more details.

Any questions, feedback, testing, changes, ideas or recommendations would be highly appreciated.
Thanks to all in advance.

Comments

dydave’s picture

Status: Active » Fixed

Quick follow-up on this feature request:

Modified the file baidu_analytics.test to add a new Test Case Class, called BaiduAnalyticsLinksTrackingTest wich performs the tests described in the issue summary:
With tracking enabled for all Links by default, each setting is disabled one by one and test that corresponding codes are displayed or not.
Change the tracked file extensions and check the configured variable is correctly used to generate the JavaScript tracking code.
Ensure baidu_analytics.js is not included in the page if tracking for Links is disabled (all 3 checkboxes unchecked).

I went ahead and committed the changes against the 7.x-1.x branch at 69ca740.

I allowed myself to mark this issue as fixed for now, but feel free to re-open it, or post a new ticket, at any time if you have any further objections with this ticket or related commit 69ca740 (we would surely be happy to hear your feedback).

Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the commit or this feature request in general, I would be glad to provide more information or explain in more details.

Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.