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

Fixes a couple of regressions & tests #17358

Merged
merged 5 commits into from Mar 18, 2021
Merged

Fixes a couple of regressions & tests #17358

merged 5 commits into from Mar 18, 2021

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Mar 18, 2021

Description:

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels Mar 18, 2021
@sgiehl sgiehl added this to the 4.3.0 milestone Mar 18, 2021
return;
var deferred = $q.defer();
deferred.resolve();
return deferred.promise;
Copy link
Member Author

Choose a reason for hiding this comment

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

Without that change the site selector when creating a new user didn't work. UI tests for that were actually failing...

@@ -41,7 +41,7 @@

var params = { 'text': text, 'url': url};
var paramString = '';
for (const param in params) {
for (var param in params) {
Copy link
Member Author

Choose a reason for hiding this comment

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

angularjs tests were failing because of this const usages...

@@ -47,7 +47,7 @@
"ReferBannerTitle": "Don't let your friend's data end up in the wrong hands!",
"ReferBannerLonger": "Refer them to Matomo Analytics now to take back control!",
"ReferBannerEmailShareSubject": "Refer them to Matomo Analytics now to take back control!",
"ReferBannerEmailShareBody": "I choose Matomo, an ethical alternative to Google Analytics that gives me 100% data ownership and protects the data of my website visitors.\r\nI’m sharing this message in the hope that you too will take back the power from Google and get complete ownership of your own data.\r\n\r\nCheck out Matomo at https://matomo.org",
"ReferBannerEmailShareBody": "I choose Matomo, an ethical alternative to Google Analytics that gives me 100%% data ownership and protects the data of my website visitors.\r\nI’m sharing this message in the hope that you too will take back the power from Google and get complete ownership of your own data.\r\n\r\nCheck out Matomo at https://matomo.org",
Copy link
Member Author

Choose a reason for hiding this comment

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

A simple % in translations needs to be escaped with another %. There was actually also one test failing because of this.

$this->userModel->deleteUserOnly('user1');
} catch (\Exception $e) {
// ignore possible errors triggered when the delete user event is posted
}
Copy link
Member Author

Choose a reason for hiding this comment

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

One test didn't work on travis. The deleteUserOnly method fire a event, which fails somewhere when no user is logged in. As it's not relevant in this case, it can be simply ignored.

@@ -26,6 +26,7 @@ describe("SiteSelector", function () {

await page.waitForSelector('.custom_select_ul_list');
await page.waitForNetworkIdle();
await page.click('.websiteSearch');
Copy link
Member Author

Choose a reason for hiding this comment

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

The focused element was changing randomly. This should ensure it's always the same, so the tests won't fail randomly anymore.

Copy link
Member

@diosmosis diosmosis left a comment

Choose a reason for hiding this comment

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

looks good, guess we should check the tests more carefully...

there are still some UI test failures I've seen before, don't know if you want to look at those first, or merge this and someone can fix the others later.

@sgiehl
Copy link
Member Author

sgiehl commented Mar 18, 2021

Will merge this now. and maybe check some of the other failing tests tomorrow if I have some time

@sgiehl sgiehl merged commit f8bb64a into 4.x-dev Mar 18, 2021
@sgiehl sgiehl deleted the fixjs branch March 18, 2021 19:48
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. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants