test(): remove initial waitFor (#19217)

This commit is contained in:
Manu MA
2019-08-30 16:45:13 +02:00
committed by GitHub
parent 4c30878fc7
commit 3d935978b3
20 changed files with 22 additions and 64 deletions

View File

@ -169,21 +169,10 @@ export class Range implements ComponentInterface {
*/
@Event() ionBlur!: EventEmitter<void>;
async connectedCallback() {
connectedCallback() {
this.updateRatio();
this.debounceChanged();
this.emitStyle();
this.gesture = (await import('../../utils/gesture')).createGesture({
el: this.rangeSlider!,
gestureName: 'range',
gesturePriority: 100,
threshold: 0,
onStart: ev => this.onStart(ev),
onMove: ev => this.onMove(ev),
onEnd: ev => this.onEnd(ev),
});
this.gesture.setDisabled(this.disabled);
this.disabledChanged();
}
disconnectedCallback() {
@ -193,6 +182,22 @@ export class Range implements ComponentInterface {
}
}
async componentDidLoad() {
const rangeSlider = this.rangeSlider;
if (rangeSlider) {
this.gesture = (await import('../../utils/gesture')).createGesture({
el: rangeSlider,
gestureName: 'range',
gesturePriority: 100,
threshold: 0,
onStart: ev => this.onStart(ev),
onMove: ev => this.onMove(ev),
onEnd: ev => this.onEnd(ev),
});
this.gesture.setDisabled(this.disabled);
}
}
private handleKeyboard = (knob: KnobName, isIncrease: boolean) => {
let step = this.step;
step = step > 0 ? step : 1;