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

Add UI test for JavaScript tracking. #15567

Merged
merged 6 commits into from Feb 21, 2020
Merged

Add UI test for JavaScript tracking. #15567

merged 6 commits into from Feb 21, 2020

Conversation

diosmosis
Copy link
Member

Forgot that #15374 also contained a UI test for JS tracking so re-creating it. Just changes to tests so adding to 3.13.3 (also updated puppeteer in the samesite PR)

@diosmosis diosmosis added the Needs Review PRs that need a code review label Feb 13, 2020
@diosmosis diosmosis added this to the 3.13.3 milestone Feb 13, 2020
core/Tracker/Response.php Outdated Show resolved Hide resolved

parent::performSetUp($setupEnvironmentOnly);

$this->testEnvironment->overlayUrl = UiTestFixture::getLocalTestSiteUrl();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fixture fails to set up here

PHP Fatal error:  Class 'Piwik\Tests\Fixtures\UiTestFixture' not found in /home/travis/build/matomo-org/matomo/tests/PHPUnit/Fixtures/JSTrackingUIFixture.php on line 46

// visit visitor log for correct date
await page.goto(visitorLogUrl);

expect(await page.screenshot({ fullPage: true })).to.matchImage('visitor_log');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the expected image for that test is missing

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems something doesn't work here. Last processed screenshot shows en empty visitor log:

https://builds-artifacts.matomo.org/matomo-org/matomo/new-js-tracking-test/38545/processed/JSTracker_visitor_log.png

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it works when it runs by itself, but not w/ other tests. Will be fun to debug.

tests/UI/specs/JSTracker_spec.js Outdated Show resolved Hide resolved
@tsteur tsteur modified the milestones: 3.13.3, 3.13.4 Feb 20, 2020
@diosmosis diosmosis merged commit a3ccded into 3.x-dev Feb 21, 2020
@diosmosis diosmosis deleted the new-js-tracking-test branch February 21, 2020 03:23
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Feb 24, 2020
jonasgrilleres pushed a commit to 1024pix/pix-analytics that referenced this pull request Sep 22, 2020
* Add UI test for JavaScript tracking.

* apply some review feedback

* try to fix UI test on travis

* Add missing screenshot.

* Normalize JSTracker UI test result.

* update screenshot
jbuget pushed a commit to 1024pix/pix-analytics that referenced this pull request Sep 26, 2020
* Add UI test for JavaScript tracking.

* apply some review feedback

* try to fix UI test on travis

* Add missing screenshot.

* Normalize JSTracker UI test result.

* update screenshot
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

4 participants