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
Show an error notification in UI when given date/period combination is invalid #16840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left one comment, otherwise code looks good and seems to work locally
I'm assuming the content screenshot changes are due to the getSearchParam change, though I couldn't figure out where exactly it would use the improper date before.
@sgiehl some angularjs tests are failing |
@diosmosis there was a problem with As soon as the request param name was included in another param the method actually returned the wrong value. I've changed the method so it hopefully should work correct now. Let's see if all tests are still passing... |
@@ -260,6 +261,7 @@ | |||
it('should return false if comparison is disabled for the page', function () { | |||
$location.search('category=MyModule2&subcategory=disabledPage2&date=2018-01-02&period=day&segment=&compareDates[]=2018-03-04&comparePeriods[]=week&compareSegments[]=comparedsegment'); | |||
$rootScope.$apply(); | |||
console.log($window.location.href); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi, debug code
@sgiehl given the method was buggy, do you think it might help to have angular unit tests for this method in broadcast? |
@diosmosis added some simple tests |
@sgiehl one screenshot test failure needs to be looked at: https://builds-artifacts.matomo.org/matomo-org/matomo/invaliddate/44416/PeriodSelector_invalid.png then it's good to merge i'd say |
@diosmosis the test should pass now |
@sgiehl there appear to be two more comparison related test failures |
@diosmosis ok. hope this time everything works again 🙈 |
Description:
fixes #16342
Review