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

test(material-experimental/mdc-slider): add ngModel unit tests #22474

Merged
merged 1 commit into from Apr 14, 2021

Conversation

wagnermaciel
Copy link
Contributor

No description provided.

@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 13, 2021
@wagnermaciel wagnermaciel added the target: feature This PR is targeted for a feature branch (outside of main and semver branches) label Apr 13, 2021
@wagnermaciel wagnermaciel marked this pull request as ready for review April 13, 2021 21:21
@wagnermaciel
Copy link
Contributor Author

@mmalerba I haven't tried removing the custom control value accessor implementation for MatSliderThumb, yet. I'm going to add another commit for it. I'm just leaving this comment so you know I haven't forgotten 👍🏽

@wagnermaciel
Copy link
Contributor Author

wagnermaciel commented Apr 13, 2021

@mmalerba Ok, I went back and checked and it seems we have some custom logic for setDisabledState. Here's a link to an old conversation we had about it - #22016 (comment)

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

LGTM

@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Apr 14, 2021
@wagnermaciel wagnermaciel merged commit 0649866 into angular:mdc-slider Apr 14, 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
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker 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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants