-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 2 unit tests #14561
✅ Fixes 2 unit tests #14561
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,14 +282,21 @@ describes.fakeWin('VisibilityManagerForDoc', {amp: true}, env => { | |
root.dispose(); | ||
}); | ||
|
||
// TODO(jonkeller, #14336): Fails due to console errors. | ||
it.skip('does not allow min==max, when they are neither 0 nor 100', () => { | ||
it('does not allow min==max, when they are neither 0 nor 100', () => { | ||
let spec = {visiblePercentageThresholds: [[50, 50]]}; | ||
root.listenRoot(spec, null, null, null); | ||
allowConsoleError(() => { | ||
// Expect user().error(TAG, | ||
// 'visiblePercentageThresholds entry invalid min/max value') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
root.listenRoot(spec, null, null, null); | ||
}); | ||
expect(root.models_).to.have.length(0); | ||
root.dispose(); | ||
spec = {visiblePercentageThresholds: [[0, 10], [10, 10], [30, 30]]}; | ||
root.listenRoot(spec, null, null, null); | ||
allowConsoleError(() => { | ||
// On the [10, 10] only, again expect user().error(TAG, | ||
// 'visiblePercentageThresholds entry invalid min/max value') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment should say "[10, 10] and [30, 30] only". I noticed this after it was merged, so corrected in #14576 |
||
root.listenRoot(spec, null, null, null); | ||
}); | ||
expect(root.models_).to.have.length(1); | ||
root.dispose(); | ||
}); | ||
|
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.
Lack of this was causing error at https://github.com/ampproject/amphtml/blob/master/extensions/amp-analytics/0.1/amp-analytics.js#L248