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
test(material-experimental/mdc-slider): add two-way binding unit tests #22470
Merged
wagnermaciel
merged 1 commit into
angular:mdc-slider
from
wagnermaciel:mdc-slider-unit-tests
Apr 13, 2021
Merged
test(material-experimental/mdc-slider): add two-way binding unit tests #22470
wagnermaciel
merged 1 commit into
angular:mdc-slider
from
wagnermaciel:mdc-slider-unit-tests
Apr 13, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
google-cla
bot
added
the
cla: yes
PR author has agreed to Google's Contributor License Agreement
label
Apr 13, 2021
devversion
reviewed
Apr 13, 2021
crisbeto
approved these changes
Apr 13, 2021
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.
LGTM
wagnermaciel
force-pushed
the
mdc-slider-unit-tests
branch
from
April 13, 2021 19:08
3be7626
to
221822b
Compare
wagnermaciel
added
merge safe
target: feature
This PR is targeted for a feature branch (outside of main and semver branches)
labels
Apr 13, 2021
wagnermaciel
added a commit
to wagnermaciel/components
that referenced
this pull request
Apr 29, 2021
wagnermaciel
added a commit
to wagnermaciel/components
that referenced
this pull request
Apr 29, 2021
wagnermaciel
added a commit
to wagnermaciel/components
that referenced
this pull request
Apr 29, 2021
wagnermaciel
added a commit
to wagnermaciel/components
that referenced
this pull request
Apr 29, 2021
mmalerba
pushed a commit
that referenced
this pull request
May 7, 2021
) * feat(material-experimental/mdc-slider): delete old code * clearing the outdated code from mdc-slider * this will also make future commit messages easier to read * build: add mdc-slider to the mdc exports configs skipped packages * feat(material-experimental/mdc-slider): add skeleton code for MatSliderAdapter (#21645) * create slider-adapter.ts * add method stubs for MDCSliderAdapter implementation * add MDCSliderFoundation class variable to MatSlider * feat(material-experimental/mdc-slider): add skeleton code for MatSliderThumb (#21655) * created slider-thumb.ts * created MatSliderThumb directive for the mdc-slider input * feat(material-experimental/mdc-slider): implement MatSlider (#21680) * feat(material-experimental/mdc-slider): implement the SliderAdapter (#21844) * feat(material-experimental/mdc-slider): implement the SliderAdapter * complete the core logic for MatSliderThumb and MatSlider * collapse slider-thumb.ts and slider-adapter.ts into slider.ts * fix(material-experimental/mdc-slider): init step on thumb inputs (#21971) * fix(material-experimental/mdc-slider): init step on thumb inputs * feat(material-experimental/mdc-slider): add slider styles (#21934) * feat(material-experimental/mdc-slider): add slider styles * implement _MatSliderMixinBase * add color input to MatSlider * extend _MatSliderMixinBase from MatSlider * use without-ripple mixin for slider.scss * @include all other mdc-slider mixins except thumb-ripple-color in _slider-theme.scss * implement primary, accent, and warn colors in _slider-theme.scss * feat(material-experimental/mdc-slider): implement slider thumb ripples (#21979) * create MatSliderVisualThumb * create slider-thumb.html & slider-thumb.scss * feat(material-experimental/mdc-slider): implement control value accessor (#22016) * feat(material-experimental/mdc-slider): implement control value accessor * feat(material-experimental/mdc-slider): implement some basic unit tests (#22072) * feat(material-experimental/mdc-slider): implement some basic unit tests * implement unit tests for the standard slider, standard range slider, and for the slider ripple states * add mdc-slider theme to all-theme * use #waitForAsync to wait for foundation to finish initializing & layout * use forwardRef to avoid injection errors that only throw on ci * disable the mat ripple on the slider thumbs to prevent the automatic launch that happens on click/touch the problem is easily reproduced if you undo this change and test it out on a mobile device. * note: we use touch events instead of pointer events when testing on ios because pointerdown, pointerup, and pointermove are not supported * feat(material-experimental/mdc-slider): add unit tests for disabled slider (#22168) * test(material-experimental/mdc-slider): add unit tests for sliders with set min and max * add support for changing the min, max, or step after the component has already been initialized * fix(material-experimental/mdc-slider): fix VE bug * in view engine, MatSliders inputs are not initialized before MatSliderThumbs constructor is called. This means we cannot initialize the slider value attribute in the constructor. To fix this, we are initializing the value attribute in ngOnInit which is still before ngAfterViewInit but after MatSliders inputs are initialized * test(material-experimental/mdc-slider): add unit tests for sliders with values (#22193) * fix(material-experimental/mdc-slider): dedup mdc-slider styles (#22195) * remove mdc-slider theme from theme.scss since it is already included in all-theme now * avoid using deprecated mdc-theme prop-value function in _slider-theme.scss * feat(material-experimental/mdc-slider): add support for rtl/ltr toggle (#22196) * feat(material-experimental/mdc-slider): add support for rtl/ltr toggle * feat(material-experimental/mdc-slider): add support for disabling rip… (#22199) * feat(material-experimental/mdc-slider): add support for disabling ripples * fix(material-experimental/mdc-slider): add slider to mdc_scss_deps_lib (#22216) * fix(material-experimental/mdc-slider): add slider to mdc_scss_deps_lib * test(material-experimental/mdc-slider): add tests for sliders with se… (#22214) * test(material-experimental/mdc-slider): add tests for sliders with set steps * test(material-experimental/mdc-slider): add tests for slider with set… (#22238) * test(material-experimental/mdc-slider): add tests for slider with set displayWith * fix(material-experimental/mdc-slider): trigger change detection when the value indicator text changes * test(material-experimental/mdc-slider): add tests for slider with one-way value binding (#22242) * fix(material-experimental/mdc-slider): fix change events on slider in… (#22286) * fix(material-experimental/mdc-slider): fix change events on slider inputs * create GlobalChangeAndInputListener to handle listening for change events that occur on the document * stop all of the slider inputs change events from reaching users * dispatch our own fake change events from #emitChangeEvent in the slider adapter * use the GlobalChangeAndInputListener for change events instead of adding our own event listener in #registerInputEventHandler * keep track of and unsubscribe from the GlobalChangeAndInputListener in #deregisterInputEventHandler * fix(material-experimental/mdc-slider): fix change and input events on the mdc slider * use #fromEvent to simplify the global change and input listener * go back to dispatching real events instead of using Angular's event emitter system * fix how the global change and input listener is used in the slider adapter * Rename fake event indicator boolean * Simplified change & input event logic to make things more readable * feat(material-experimental/mdc-slider): rebuild the mdc-slider demo (#22445) * add exportAs: matSliderThumb to MatSliderThumb * create focus and blur methods in MatSliderThumb to match the old demo * test(material-experimental/mdc-slider): create e2e tests (#22463) * create basic tests for standard, disabled, and range sliders * test(material-experimental/mdc-slider): add two-way binding unit tests (#22470) * test(material-experimental/mdc-slider): add ngModel unit tests (#22474) * test(material-experimental/mdc-slider): add change handler tests (#22478) * test(material-experimental/mdc-slider): add input handler tests (#22481) * test(material-experimental/mdc-slider): add custom form control tests (#22546) * test(material-experimental/mdc-slider): add custom form control tests * fix bug where setting the disabled state on the overall slider was not disabling the individual slider thumbs control value accessor disabled state. * fix(material-experimental/mdc-slider): avoid using whenStable (#22571) * whenStable was causing tests to pass even when they should have been failing * test(material-experimental/mdc-slider): add directionality tests (#22572) * fix(material-experimental/mdc-slider): keep slider ui in sync with foundation (#22579) * The MDC Foundation stores the bounding client rect when layout is first called. This means that if the position of the slider changes after the initial layout, the slider will break. To fix this broken behavior, we have to keep calling layout. * Added a unit test to ensure layout changes does not break the slider. * fix(material-experimental/mdc-slider): fix unit tests after rebasing * define the width for the unit test component styles * fix decimal step tests that were failing because of the firefox decimal imprecision bug
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
cla: yes
PR author has agreed to Google's Contributor License Agreement
target: feature
This PR is targeted for a feature branch (outside of main and semver branches)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.