diff --git a/core/src/components/card-header/test/basic/e2e.ts b/core/src/components/card-header/test/basic/e2e.ts index 611c4bda17..3ec1cecf60 100644 --- a/core/src/components/card-header/test/basic/e2e.ts +++ b/core/src/components/card-header/test/basic/e2e.ts @@ -5,8 +5,6 @@ test('card-header: basic', async () => { url: '/src/components/card-header/test/basic?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/img/test/basic/e2e.ts b/core/src/components/img/test/basic/e2e.ts index 0d8e74d6a0..2c8f17aa8e 100644 --- a/core/src/components/img/test/basic/e2e.ts +++ b/core/src/components/img/test/basic/e2e.ts @@ -5,8 +5,6 @@ test('img: basic', async () => { url: '/src/components/img/test/basic?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/img/test/standalone/e2e.ts b/core/src/components/img/test/standalone/e2e.ts index 312399521b..a69a98f3f4 100644 --- a/core/src/components/img/test/standalone/e2e.ts +++ b/core/src/components/img/test/standalone/e2e.ts @@ -5,8 +5,6 @@ test('img: standalone', async () => { url: '/src/components/img/test/standalone?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/radio-group/test/standalone/e2e.ts b/core/src/components/radio-group/test/standalone/e2e.ts index 0081956a34..cfe4b7245a 100644 --- a/core/src/components/radio-group/test/standalone/e2e.ts +++ b/core/src/components/radio-group/test/standalone/e2e.ts @@ -5,8 +5,6 @@ test('radio-group: standalone', async () => { url: '/src/components/radio-group/test/standalone?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/range/range.tsx b/core/src/components/range/range.tsx index 495420f33a..b419a31e1e 100644 --- a/core/src/components/range/range.tsx +++ b/core/src/components/range/range.tsx @@ -169,21 +169,10 @@ export class Range implements ComponentInterface { */ @Event() ionBlur!: EventEmitter; - 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; diff --git a/core/src/components/reorder-group/reorder-group.tsx b/core/src/components/reorder-group/reorder-group.tsx index cca3ee9356..a9c630b301 100644 --- a/core/src/components/reorder-group/reorder-group.tsx +++ b/core/src/components/reorder-group/reorder-group.tsx @@ -54,11 +54,9 @@ export class ReorderGroup implements ComponentInterface { async connectedCallback() { const contentEl = this.el.closest('ion-content'); - if (!contentEl) { - console.error(' must be used inside an '); - return; + if (contentEl) { + this.scrollEl = await contentEl.getScrollElement(); } - this.scrollEl = await contentEl.getScrollElement(); this.gesture = (await import('../../utils/gesture')).createGesture({ el: this.el, gestureName: 'reorder', @@ -201,10 +199,7 @@ export class ReorderGroup implements ComponentInterface { const fromIndex = indexForItem(selectedItemEl); if (toIndex === fromIndex) { - selectedItemEl.style.transition = 'transform 200ms ease-in-out'; - selectedItemEl.style.transform = ''; - selectedItemEl.classList.remove(ITEM_REORDER_SELECTED); - setTimeout(() => this.completeSync(), 200); + this.completeSync(); } else { this.ionItemReorder.emit({ from: fromIndex, diff --git a/core/src/components/searchbar/test/basic/e2e.ts b/core/src/components/searchbar/test/basic/e2e.ts index f3df9585af..f4d240ea27 100644 --- a/core/src/components/searchbar/test/basic/e2e.ts +++ b/core/src/components/searchbar/test/basic/e2e.ts @@ -5,8 +5,6 @@ test('searchbar: basic', async () => { url: '/src/components/searchbar/test/basic?ionic:_testing=true' }); - await page.waitFor(250); - const compares = []; compares.push(await page.compareScreenshot()); @@ -39,8 +37,6 @@ test('searchbar:rtl: basic', async () => { url: '/src/components/searchbar/test/basic?ionic:_testing=true&rtl=true' }); - await page.waitFor(250); - const compares = []; compares.push(await page.compareScreenshot()); diff --git a/core/src/components/searchbar/test/standalone/e2e.ts b/core/src/components/searchbar/test/standalone/e2e.ts index 97f4aa471d..40cc94efc4 100644 --- a/core/src/components/searchbar/test/standalone/e2e.ts +++ b/core/src/components/searchbar/test/standalone/e2e.ts @@ -5,8 +5,6 @@ test('searchbar: standalone', async () => { url: '/src/components/searchbar/test/standalone?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); diff --git a/core/src/components/searchbar/test/toolbar/e2e.ts b/core/src/components/searchbar/test/toolbar/e2e.ts index a024ab3690..58e4d00a99 100644 --- a/core/src/components/searchbar/test/toolbar/e2e.ts +++ b/core/src/components/searchbar/test/toolbar/e2e.ts @@ -5,8 +5,6 @@ test('searchbar: toolbar', async () => { url: '/src/components/searchbar/test/toolbar?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/segment/test/basic/e2e.ts b/core/src/components/segment/test/basic/e2e.ts index c026c7afb6..4e89dc11aa 100644 --- a/core/src/components/segment/test/basic/e2e.ts +++ b/core/src/components/segment/test/basic/e2e.ts @@ -5,8 +5,6 @@ test('segment: basic', async () => { url: '/src/components/segment/test/basic?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); @@ -16,8 +14,6 @@ test('segment:rtl: basic', async () => { url: '/src/components/segment/test/basic?ionic:_testing=true&rtl=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/segment/test/custom/e2e.ts b/core/src/components/segment/test/custom/e2e.ts index 61dc6b9f67..b67c5687c8 100644 --- a/core/src/components/segment/test/custom/e2e.ts +++ b/core/src/components/segment/test/custom/e2e.ts @@ -5,8 +5,6 @@ test('segment: custom', async () => { url: '/src/components/segment/test/custom?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/segment/test/modes/e2e.ts b/core/src/components/segment/test/modes/e2e.ts index 5f9d929609..f16f628ab1 100644 --- a/core/src/components/segment/test/modes/e2e.ts +++ b/core/src/components/segment/test/modes/e2e.ts @@ -5,8 +5,6 @@ test('segment: modes', async () => { url: '/src/components/segment/test/modes?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/segment/test/spec/e2e.ts b/core/src/components/segment/test/spec/e2e.ts index 8dbdc13817..13648bb0ef 100644 --- a/core/src/components/segment/test/spec/e2e.ts +++ b/core/src/components/segment/test/spec/e2e.ts @@ -5,8 +5,6 @@ test('segment: spec', async () => { url: '/src/components/segment/test/spec?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); @@ -16,8 +14,6 @@ test('segment:rtl: spec', async () => { url: '/src/components/segment/test/spec?ionic:_testing=true&rtl=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/segment/test/standalone/e2e.ts b/core/src/components/segment/test/standalone/e2e.ts index 55c59c33fb..12178f7424 100644 --- a/core/src/components/segment/test/standalone/e2e.ts +++ b/core/src/components/segment/test/standalone/e2e.ts @@ -5,8 +5,6 @@ test('segment: standalone', async () => { url: '/src/components/segment/test/standalone?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/slides/test/basic/e2e.ts b/core/src/components/slides/test/basic/e2e.ts index 7732ae2ecb..32dc7e630c 100644 --- a/core/src/components/slides/test/basic/e2e.ts +++ b/core/src/components/slides/test/basic/e2e.ts @@ -5,8 +5,6 @@ test('slides: basic', async () => { url: '/src/components/slides/test/basic?ionic:_testing=true' }); - await page.waitFor(500); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/slides/test/image/e2e.ts b/core/src/components/slides/test/image/e2e.ts index 63e1719f0d..e36ecb3d17 100644 --- a/core/src/components/slides/test/image/e2e.ts +++ b/core/src/components/slides/test/image/e2e.ts @@ -5,8 +5,6 @@ test('slides: image', async () => { url: '/src/components/slides/test/image?ionic:_testing=true' }); - await page.waitFor(500); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/slides/test/standalone/e2e.ts b/core/src/components/slides/test/standalone/e2e.ts index 7a8483c5e0..eab3800d02 100644 --- a/core/src/components/slides/test/standalone/e2e.ts +++ b/core/src/components/slides/test/standalone/e2e.ts @@ -5,8 +5,6 @@ test('slides: standalone', async () => { url: '/src/components/slides/test/standalone?ionic:_testing=true' }); - await page.waitFor(500); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/components/textarea/test/basic/e2e.ts b/core/src/components/textarea/test/basic/e2e.ts index 736ae9ccab..3bc1c05971 100644 --- a/core/src/components/textarea/test/basic/e2e.ts +++ b/core/src/components/textarea/test/basic/e2e.ts @@ -9,7 +9,7 @@ test('textarea: basic', async () => { compares.push(await page.compareScreenshot()); - page.waitFor(2000); + await page.waitFor(250); compares.push(await page.compareScreenshot('value changed')); for (const compare of compares) { diff --git a/core/src/components/toggle/test/basic/e2e.ts b/core/src/components/toggle/test/basic/e2e.ts index 6d84528458..14ce9aedc1 100644 --- a/core/src/components/toggle/test/basic/e2e.ts +++ b/core/src/components/toggle/test/basic/e2e.ts @@ -5,8 +5,6 @@ test('toggle: basic', async () => { url: '/src/components/toggle/test/basic?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); @@ -16,8 +14,6 @@ test('toggle:rtl: basic', async () => { url: '/src/components/toggle/test/basic?ionic:_testing=true&rtl=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); }); diff --git a/core/src/themes/test/css-variables/e2e.ts b/core/src/themes/test/css-variables/e2e.ts index a55869b773..96ef67daac 100644 --- a/core/src/themes/test/css-variables/e2e.ts +++ b/core/src/themes/test/css-variables/e2e.ts @@ -5,8 +5,6 @@ test('themes: css-variables', async () => { url: '/src/themes/test/css-variables?ionic:_testing=true' }); - await page.waitFor(250); - const compare = await page.compareScreenshot(); expect(compare).toMatchScreenshot(); });