Skip to content
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

Allow execution of core and plugin specific JS tests only #16345

Merged
merged 3 commits into from Aug 31, 2020

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Aug 26, 2020

eg by executing http://domain/tests/javascript/?plugin=HeatmapSessionRecording. In the past I always patched the index.php code manually but figured it be easier to have an option for this. That's because some plugin tests might not be compatible with each other as every JS adds different HTML code to the test. Eg when it runs Form Analytics, Heatmaps, Ab Tests, etc all in one go then the tests might not pass but they pass when executed independently. It doesn't fail because of any JS logic but because of the extra HTML they add to the file. It's possible this could be fixed but might be a bit of work. Will see first if I can get them to pass altogether.

Nonetheless sometimes it might be useful to have this opportunity to only add specific tests to the test page. It lets you eg execute tests just like Travis would do (when it runs the tests only for one plugin but not all plugins)

@tsteur tsteur marked this pull request as draft August 26, 2020 01:20
@tsteur tsteur marked this pull request as ready for review August 26, 2020 02:36
@tsteur tsteur added Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Aug 26, 2020
@tsteur tsteur added this to the 4.0.0 milestone Aug 26, 2020
@tsteur
Copy link
Member Author

tsteur commented Aug 27, 2020

note I also now fixed the tracker tests so they work mostly altogether. However, the plugin parameter as introduced by this PR will still be needed when trying to reproduce tests that fail on travis as it basically allows executing the tests just like travis:

  • Core JS tracker tests
  • Tag Manager JS tests
  • The JS tests for a specific plugin

without including any JS tests of other plugins and without including the head.php part of any other tests.

@tsteur
Copy link
Member Author

tsteur commented Aug 31, 2020

fyi I'll merge this one since it's only for tests anyway

@tsteur tsteur merged commit 85d7817 into 4.x-dev Aug 31, 2020
@tsteur tsteur deleted the pluginspecificjstest branch August 31, 2020 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant