Skip to content

Commit

Permalink
fix(multiple): update API to match previous accesible members
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewseguin committed Aug 14, 2023
1 parent 968d89b commit 9cce02f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/material/checkbox/testing/checkbox-harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {coerceBooleanProperty} from '@angular/cdk/coercion';
export class MatCheckboxHarness extends ComponentHarness {
static hostSelector = '.mat-mdc-checkbox';

private _input = this.locatorFor('input');
_input = this.locatorFor('input');
private _label = this.locatorFor('label');
private _inputContainer = this.locatorFor('.mdc-checkbox');

Expand Down
2 changes: 1 addition & 1 deletion src/material/dialog/testing/dialog-opener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {Subscription} from 'rxjs';
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
})
export class MatTestDialogOpener<T, R> implements OnDestroy {
export class MatTestDialogOpener<T = unknown, R = unknown> implements OnDestroy {
/** Component that should be opened with the MatDialog `open` method. */
protected static component: ComponentType<unknown> | undefined;

Expand Down
4 changes: 2 additions & 2 deletions src/material/paginator/testing/paginator-harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export class MatPaginatorHarness extends ComponentHarness {
private _previousButton = this.locatorFor('.mat-mdc-paginator-navigation-previous');
private _firstPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-first');
private _lastPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-last');
private _select = this.locatorForOptional(
_select = this.locatorForOptional(
MatSelectHarness.with({
ancestor: '.mat-mdc-paginator-page-size',
}),
);
private _pageSizeFallback = this.locatorFor('.mat-mdc-paginator-page-size-value');
private _rangeLabel = this.locatorFor('.mat-mdc-paginator-range-label');
_rangeLabel = this.locatorFor('.mat-mdc-paginator-range-label');

/**
* Gets a `HarnessPredicate` that can be used to search for a paginator with specific attributes.
Expand Down
2 changes: 1 addition & 1 deletion src/material/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ export class MatSelect
];

/** Scrolls a particular option into the view. */
private _scrollOptionIntoView(index: number): void {
_scrollOptionIntoView(index: number): void {
const option = this.options.toArray()[index];

if (option) {
Expand Down
8 changes: 4 additions & 4 deletions src/material/slide-toggle/slide-toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ export class MatSlideToggle
protected _focusMonitor: FocusMonitor,
protected _changeDetectorRef: ChangeDetectorRef,
@Attribute('tabindex') tabIndex: string,
@Inject(MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS) private _defaults: MatSlideToggleDefaultOptions,
@Inject(MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS) public defaults: MatSlideToggleDefaultOptions,
@Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,
) {
super(elementRef);
this.tabIndex = parseInt(tabIndex) || 0;
this.color = this.defaultColor = _defaults.color || 'accent';
this.color = this.defaultColor = defaults.color || 'accent';
this._noopAnimations = animationMode === 'NoopAnimations';
this.id = this._uniqueId = `mat-mdc-slide-toggle-${++nextUniqueId}`;
this._hideIcon = _defaults.hideIcon ?? false;
this._hideIcon = defaults.hideIcon ?? false;
this._labelId = this._uniqueId + '-label';
}

Expand Down Expand Up @@ -285,7 +285,7 @@ export class MatSlideToggle
_handleClick() {
this.toggleChange.emit();

if (!this._defaults.disableToggleValue) {
if (!this.defaults.disableToggleValue) {
this.checked = !this.checked;
this._onChange(this.checked);
this.change.emit(new MatSlideToggleChange(this, this.checked));
Expand Down
2 changes: 1 addition & 1 deletion src/material/slide-toggle/testing/slide-toggle-harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {SlideToggleHarnessFilters} from './slide-toggle-harness-filters';
/** Harness for interacting with a mat-slide-toggle in tests. */
export class MatSlideToggleHarness extends ComponentHarness {
private _label = this.locatorFor('label');
private _nativeElement = this.locatorFor('button');
_nativeElement = this.locatorFor('button');
static hostSelector = '.mat-mdc-slide-toggle';

/**
Expand Down

0 comments on commit 9cce02f

Please sign in to comment.